From e28186802725f9c62851e400a7406a18ce44a93e Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Tue, 18 Sep 2018 12:42:24 -0700 Subject: [PATCH 01/40] Adding a backup folder called mainnet for build artifacts to separate from truffle migrate process --- deployed/mainnet/Migrations.json | 1385 + deployed/mainnet/Ownable.json | 3323 + deployed/mainnet/SafeMath.json | 2630 + deployed/mainnet/TokenIOAuthority.json | 5066 + .../mainnet/TokenIOCurrencyAuthority.json | 13012 +++ deployed/mainnet/TokenIOERC20.json | 12502 +++ deployed/mainnet/TokenIOFX.json | 2192 + deployed/mainnet/TokenIOFeeContract.json | 6205 ++ deployed/mainnet/TokenIOLib.json | 87990 ++++++++++++++++ deployed/mainnet/TokenIOMerchant.json | 7198 ++ deployed/mainnet/TokenIONameSpace.json | 1297 + deployed/mainnet/TokenIOStorage.json | 8232 ++ 12 files changed, 151032 insertions(+) create mode 100644 deployed/mainnet/Migrations.json create mode 100644 deployed/mainnet/Ownable.json create mode 100644 deployed/mainnet/SafeMath.json create mode 100644 deployed/mainnet/TokenIOAuthority.json create mode 100644 deployed/mainnet/TokenIOCurrencyAuthority.json create mode 100644 deployed/mainnet/TokenIOERC20.json create mode 100644 deployed/mainnet/TokenIOFX.json create mode 100644 deployed/mainnet/TokenIOFeeContract.json create mode 100644 deployed/mainnet/TokenIOLib.json create mode 100644 deployed/mainnet/TokenIOMerchant.json create mode 100644 deployed/mainnet/TokenIONameSpace.json create mode 100644 deployed/mainnet/TokenIOStorage.json diff --git a/deployed/mainnet/Migrations.json b/deployed/mainnet/Migrations.json new file mode 100644 index 0000000..e816147 --- /dev/null +++ b/deployed/mainnet/Migrations.json @@ -0,0 +1,1385 @@ +{ + "contractName": "Migrations", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "last_completed_migration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": false, + "inputs": [ + { + "name": "completed", + "type": "uint256" + } + ], + "name": "setCompleted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "new_address", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058200175751d280e290aa803e109324413a03bf62768201f1dae333300fb6049ffaf0029", + "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058200175751d280e290aa803e109324413a03bf62768201f1dae333300fb6049ffaf0029", + "sourceMap": "25:480:0:-;;;177:50;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;204:5:0;:18;;-1:-1:-1;;;;;;204:18:0;212:10;204:18;;;25:480;;;;;;", + "deployedSourceMap": "25:480:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;338:165;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;338:165:0;;;;;;;;;73:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;73:36:0;;;;;;;;;;;;;;;;;;;;49:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;49:20:0;;;;;;;;;;;;;;;;;;;;;;;231:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;231:103:0;;;;;338:165;400:19;160:5;;;;146:10;:19;142:26;;;433:11;400:45;;451:8;:21;;;473:24;;451:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;451:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;451:47:0;;;;142:26;338:165;;:::o;73:36::-;;;;:::o;49:20::-;;;;;;:::o;231:103::-;160:5;;;;146:10;:19;142:26;;;293:24;:36;;;142:26;231:103;:::o", + "source": "pragma solidity 0.4.24;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Migrations.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 56 + ] + }, + "id": 57, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 56, + "linearizedBaseContracts": [ + 56 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "49:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 5, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "73:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "73:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 13, + "nodeType": "Block", + "src": "136:37:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "146:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "146:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "160:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "146:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12, + "nodeType": "IfStatement", + "src": "142:26:0", + "trueBody": { + "id": 11, + "nodeType": "PlaceholderStatement", + "src": "167:1:0" + } + } + ] + }, + "documentation": null, + "id": 14, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6, + "nodeType": "ParameterList", + "parameters": [], + "src": "133:2:0" + }, + "src": "114:59:0", + "visibility": "internal" + }, + { + "body": { + "id": 22, + "nodeType": "Block", + "src": "198:29:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "204:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "212:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "212:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "204:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21, + "nodeType": "ExpressionStatement", + "src": "204:18:0" + } + ] + }, + "documentation": null, + "id": 23, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 15, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:0" + }, + "payable": false, + "returnParameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [], + "src": "198:0:0" + }, + "scope": 56, + "src": "177:50:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 34, + "nodeType": "Block", + "src": "287:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 32, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 30, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "293:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 31, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "320:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "293:36:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 33, + "nodeType": "ExpressionStatement", + "src": "293:36:0" + } + ] + }, + "documentation": null, + "id": 35, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 28, + "modifierName": { + "argumentTypes": null, + "id": 27, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "276:10:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "276:10:0" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 25, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 35, + "src": "253:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "253:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "252:16:0" + }, + "payable": false, + "returnParameters": { + "id": 29, + "nodeType": "ParameterList", + "parameters": [], + "src": "287:0:0" + }, + "scope": 56, + "src": "231:103:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 54, + "nodeType": "Block", + "src": "394:109:0", + "statements": [ + { + "assignments": [ + 43 + ], + "declarations": [ + { + "constant": false, + "id": 43, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "400:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 42, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 56, + "src": "400:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 47, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "433:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 44, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "422:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$56_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "422:23:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "400:45:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 51, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "473:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 48, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "451:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "451:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:47:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 53, + "nodeType": "ExpressionStatement", + "src": "451:47:0" + } + ] + }, + "documentation": null, + "id": 55, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 40, + "modifierName": { + "argumentTypes": null, + "id": 39, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "383:10:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "383:10:0" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 38, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 37, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "355:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "355:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "354:21:0" + }, + "payable": false, + "returnParameters": { + "id": 41, + "nodeType": "ParameterList", + "parameters": [], + "src": "394:0:0" + }, + "scope": 56, + "src": "338:165:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 57, + "src": "25:480:0" + } + ], + "src": "0:506:0" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 56 + ] + }, + "id": 57, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 56, + "linearizedBaseContracts": [ + 56 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "49:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 5, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "73:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "73:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 13, + "nodeType": "Block", + "src": "136:37:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "146:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "146:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "160:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "146:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12, + "nodeType": "IfStatement", + "src": "142:26:0", + "trueBody": { + "id": 11, + "nodeType": "PlaceholderStatement", + "src": "167:1:0" + } + } + ] + }, + "documentation": null, + "id": 14, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6, + "nodeType": "ParameterList", + "parameters": [], + "src": "133:2:0" + }, + "src": "114:59:0", + "visibility": "internal" + }, + { + "body": { + "id": 22, + "nodeType": "Block", + "src": "198:29:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "204:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "212:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "212:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "204:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21, + "nodeType": "ExpressionStatement", + "src": "204:18:0" + } + ] + }, + "documentation": null, + "id": 23, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 15, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:0" + }, + "payable": false, + "returnParameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [], + "src": "198:0:0" + }, + "scope": 56, + "src": "177:50:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 34, + "nodeType": "Block", + "src": "287:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 32, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 30, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "293:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 31, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "320:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "293:36:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 33, + "nodeType": "ExpressionStatement", + "src": "293:36:0" + } + ] + }, + "documentation": null, + "id": 35, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 28, + "modifierName": { + "argumentTypes": null, + "id": 27, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "276:10:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "276:10:0" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 25, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 35, + "src": "253:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "253:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "252:16:0" + }, + "payable": false, + "returnParameters": { + "id": 29, + "nodeType": "ParameterList", + "parameters": [], + "src": "287:0:0" + }, + "scope": 56, + "src": "231:103:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 54, + "nodeType": "Block", + "src": "394:109:0", + "statements": [ + { + "assignments": [ + 43 + ], + "declarations": [ + { + "constant": false, + "id": 43, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "400:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 42, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 56, + "src": "400:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 47, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "433:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 44, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "422:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$56_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "422:23:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "400:45:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 51, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "473:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 48, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "451:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "451:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:47:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 53, + "nodeType": "ExpressionStatement", + "src": "451:47:0" + } + ] + }, + "documentation": null, + "id": 55, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 40, + "modifierName": { + "argumentTypes": null, + "id": 39, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "383:10:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "383:10:0" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 38, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 37, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "355:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "355:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "354:21:0" + }, + "payable": false, + "returnParameters": { + "id": 41, + "nodeType": "ParameterList", + "parameters": [], + "src": "394:0:0" + }, + "scope": 56, + "src": "338:165:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 57, + "src": "25:480:0" + } + ], + "src": "0:506:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x026a64902d3ed8f1f69d52b9d426f1d51bbbcf6f", + "transactionHash": "0xa0d4bf851c08da7c42d9f432c06eb46c3cd0d8948f211db224a1eab6856b2a48" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.597Z" +} \ No newline at end of file diff --git a/deployed/mainnet/Ownable.json b/deployed/mainnet/Ownable.json new file mode 100644 index 0000000..cc35986 --- /dev/null +++ b/deployed/mainnet/Ownable.json @@ -0,0 +1,3323 @@ +{ + "contractName": "Ownable", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50336000908152602081905260409020805460ff1916600117905561045a8061003a6000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634bbc142c8114610066578063666a34271461009b578063666e1b39146100bc578063f2fde38b146100dd575b600080fd5b34801561007257600080fd5b50610087600160a060020a03600435166100fe565b604080519115158252519081900360200190f35b3480156100a757600080fd5b50610087600160a060020a03600435166101de565b3480156100c857600080fd5b50610087600160a060020a03600435166102bb565b3480156100e957600080fd5b50610087600160a060020a03600435166102d0565b3360009081526020819052604081205460ff16151561018d576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff16151561026d576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff16151561035f576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a03821615156103bf576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff1991821681179092553384529190922080549091169055905600a165627a7a72305820008982c7122c078b3561e82dc528b2b9c23f88189abb0e2866f411c5d2edc7950029", + "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634bbc142c8114610066578063666a34271461009b578063666e1b39146100bc578063f2fde38b146100dd575b600080fd5b34801561007257600080fd5b50610087600160a060020a03600435166100fe565b604080519115158252519081900360200190f35b3480156100a757600080fd5b50610087600160a060020a03600435166101de565b3480156100c857600080fd5b50610087600160a060020a03600435166102bb565b3480156100e957600080fd5b50610087600160a060020a03600435166102d0565b3360009081526020819052604081205460ff16151561018d576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff16151561026d576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff16151561035f576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a03821615156103bf576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff1991821681179092553384529190922080549091169055905600a165627a7a72305820008982c7122c078b3561e82dc528b2b9c23f88189abb0e2866f411c5d2edc7950029", + "sourceMap": "703:2059:1:-;;;1084:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1117:10:1;1111:5;:17;;;;;;;;;;:24;;-1:-1:-1;;1111:24:1;1131:4;1111:24;;;703:2059;;;;;;", + "deployedSourceMap": "703:2059:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2127:185;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;;;;;;;;;;;;;;;;;;;2571:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;1589:291;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2127:185;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;2571:188::-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;1589:291::-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o", + "source": "pragma solidity 0.4.24;\n\n\n\n\n/**\n\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".\n\n\n */\ncontract Ownable {\n\n mapping(address => bool) public owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n event AllowOwnership(address indexed allowedAddress);\n event RevokeOwnership(address indexed allowedAddress);\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n constructor() public {\n owner[msg.sender] = true;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner[msg.sender], \"Error: Transaction sender is not allowed by the contract.\");\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n * @return {\"success\" : \"Returns true when successfully transferred ownership\"}\n */\n function transferOwnership(address newOwner) public onlyOwner returns (bool success) {\n require(newOwner != address(0), \"Error: newOwner cannot be null!\");\n emit OwnershipTransferred(msg.sender, newOwner);\n owner[newOwner] = true;\n owner[msg.sender] = false;\n return true;\n }\n\n /**\n * @dev Allows interface contracts and accounts to access contract methods (e.g. Storage contract)\n * @param allowedAddress The address of new owner\n * @return {\"success\" : \"Returns true when successfully allowed ownership\"}\n */\n function allowOwnership(address allowedAddress) public onlyOwner returns (bool success) {\n owner[allowedAddress] = true;\n emit AllowOwnership(allowedAddress);\n return true;\n }\n\n /**\n * @dev Disallows interface contracts and accounts to access contract methods (e.g. Storage contract)\n * @param allowedAddress The address to disallow ownership\n * @return {\"success\" : \"Returns true when successfully allowed ownership\"}\n */\n function removeOwnership(address allowedAddress) public onlyOwner returns (bool success) {\n owner[allowedAddress] = false;\n emit RevokeOwnership(allowedAddress);\n return true;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "exportedSymbols": { + "Ownable": [ + 184 + ] + }, + "id": 185, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 58, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".", + "fullyImplemented": true, + "id": 184, + "linearizedBaseContracts": [ + 184 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 62, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 184, + "src": "725:37:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 61, + "keyType": { + "id": 59, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "733:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "725:24:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 60, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "744:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 68, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 67, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "794:29:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 63, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "794:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "825:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "825:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "793:57:1" + }, + "src": "767:84:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 72, + "name": "AllowOwnership", + "nodeType": "EventDefinition", + "parameters": { + "id": 71, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 70, + "indexed": true, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 72, + "src": "875:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 69, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "875:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "874:32:1" + }, + "src": "854:53:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 76, + "name": "RevokeOwnership", + "nodeType": "EventDefinition", + "parameters": { + "id": 75, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 74, + "indexed": true, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "932:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 73, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "932:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "931:32:1" + }, + "src": "910:54:1" + }, + { + "body": { + "id": 86, + "nodeType": "Block", + "src": "1105:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 79, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1111:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 82, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 80, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1117:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 81, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1117:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1111:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1131:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1111:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 85, + "nodeType": "ExpressionStatement", + "src": "1111:24:1" + } + ] + }, + "documentation": "@dev The Ownable constructor sets the original `owner` of the contract to the sender\naccount.", + "id": 87, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "1095:2:1" + }, + "payable": false, + "returnParameters": { + "id": 78, + "nodeType": "ParameterList", + "parameters": [], + "src": "1105:0:1" + }, + "scope": 184, + "src": "1084:56:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 98, + "nodeType": "Block", + "src": "1241:105:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 90, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1255:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 93, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 91, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1261:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1261:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1255:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7420616c6c6f7765642062792074686520636f6e74726163742e", + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1274:59:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8291170cda70aa6a33f032b286d45ac3395ac65762e92264c69af22ca29fa73f", + "typeString": "literal_string \"Error: Transaction sender is not allowed by the contract.\"" + }, + "value": "Error: Transaction sender is not allowed by the contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8291170cda70aa6a33f032b286d45ac3395ac65762e92264c69af22ca29fa73f", + "typeString": "literal_string \"Error: Transaction sender is not allowed by the contract.\"" + } + ], + "id": 89, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "1247:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1247:87:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 96, + "nodeType": "ExpressionStatement", + "src": "1247:87:1" + }, + { + "id": 97, + "nodeType": "PlaceholderStatement", + "src": "1340:1:1" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 99, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 88, + "nodeType": "ParameterList", + "parameters": [], + "src": "1238:2:1" + }, + "src": "1220:126:1", + "visibility": "internal" + }, + { + "body": { + "id": 138, + "nodeType": "Block", + "src": "1674:206:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 109, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1688:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1708:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1700:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1700:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1688:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c21", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1712:33:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0cf773df2ba40d551ba87e95013f067aa808666d9d26ad6f662416df58eb7494", + "typeString": "literal_string \"Error: newOwner cannot be null!\"" + }, + "value": "Error: newOwner cannot be null!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0cf773df2ba40d551ba87e95013f067aa808666d9d26ad6f662416df58eb7494", + "typeString": "literal_string \"Error: newOwner cannot be null!\"" + } + ], + "id": 108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "1680:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1680:66:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "1680:66:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 118, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1778:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1778:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 120, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1790:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 117, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1757:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1757:42:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 122, + "nodeType": "EmitStatement", + "src": "1752:47:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 123, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1805:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 125, + "indexExpression": { + "argumentTypes": null, + "id": 124, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1811:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1805:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1823:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1805:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 128, + "nodeType": "ExpressionStatement", + "src": "1805:22:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 129, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1833:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 132, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 130, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1839:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1839:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1833:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1853:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1833:25:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 135, + "nodeType": "ExpressionStatement", + "src": "1833:25:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1871:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 107, + "id": 137, + "nodeType": "Return", + "src": "1864:11:1" + } + ] + }, + "documentation": "@dev Allows the current owner to transfer control of the contract to a newOwner.\n@param newOwner The address to transfer ownership to.\n@return {\"success\" : \"Returns true when successfully transferred ownership\"}", + "id": 139, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 104, + "modifierName": { + "argumentTypes": null, + "id": 103, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1641:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1641:9:1" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 101, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 139, + "src": "1616:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1616:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1615:18:1" + }, + "payable": false, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 139, + "src": "1660:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 105, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1660:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1659:14:1" + }, + "scope": 184, + "src": "1589:291:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 160, + "nodeType": "Block", + "src": "2215:97:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 148, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2221:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 150, + "indexExpression": { + "argumentTypes": null, + "id": 149, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "2227:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2221:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2245:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2221:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2221:28:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 155, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "2275:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 154, + "name": "AllowOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "2260:14:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2260:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "EmitStatement", + "src": "2255:35:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2303:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 147, + "id": 159, + "nodeType": "Return", + "src": "2296:11:1" + } + ] + }, + "documentation": "@dev Allows interface contracts and accounts to access contract methods (e.g. Storage contract)\n@param allowedAddress The address of new owner\n@return {\"success\" : \"Returns true when successfully allowed ownership\"}", + "id": 161, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 144, + "modifierName": { + "argumentTypes": null, + "id": 143, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2182:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2182:9:1" + } + ], + "name": "allowOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 141, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2151:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 140, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2151:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2150:24:1" + }, + "payable": false, + "returnParameters": { + "id": 147, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 146, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2201:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 145, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2201:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2200:14:1" + }, + "scope": 184, + "src": "2127:185:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 182, + "nodeType": "Block", + "src": "2660:99:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 170, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2666:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 172, + "indexExpression": { + "argumentTypes": null, + "id": 171, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "2672:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2666:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2690:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2666:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2666:29:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 177, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "2722:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 176, + "name": "RevokeOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "2706:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2706:31:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 179, + "nodeType": "EmitStatement", + "src": "2701:36:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2750:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 169, + "id": 181, + "nodeType": "Return", + "src": "2743:11:1" + } + ] + }, + "documentation": "@dev Disallows interface contracts and accounts to access contract methods (e.g. Storage contract)\n@param allowedAddress The address to disallow ownership\n@return {\"success\" : \"Returns true when successfully allowed ownership\"}", + "id": 183, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 166, + "modifierName": { + "argumentTypes": null, + "id": 165, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2627:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2627:9:1" + } + ], + "name": "removeOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 163, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "2596:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 162, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2596:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2595:24:1" + }, + "payable": false, + "returnParameters": { + "id": 169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 168, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "2646:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 167, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2646:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2645:14:1" + }, + "scope": 184, + "src": "2571:188:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 185, + "src": "703:2059:1" + } + ], + "src": "0:2763:1" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "exportedSymbols": { + "Ownable": [ + 184 + ] + }, + "id": 185, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 58, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".", + "fullyImplemented": true, + "id": 184, + "linearizedBaseContracts": [ + 184 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 62, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 184, + "src": "725:37:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 61, + "keyType": { + "id": 59, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "733:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "725:24:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 60, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "744:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 68, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 67, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "794:29:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 63, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "794:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "825:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "825:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "793:57:1" + }, + "src": "767:84:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 72, + "name": "AllowOwnership", + "nodeType": "EventDefinition", + "parameters": { + "id": 71, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 70, + "indexed": true, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 72, + "src": "875:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 69, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "875:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "874:32:1" + }, + "src": "854:53:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 76, + "name": "RevokeOwnership", + "nodeType": "EventDefinition", + "parameters": { + "id": 75, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 74, + "indexed": true, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "932:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 73, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "932:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "931:32:1" + }, + "src": "910:54:1" + }, + { + "body": { + "id": 86, + "nodeType": "Block", + "src": "1105:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 79, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1111:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 82, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 80, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1117:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 81, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1117:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1111:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1131:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1111:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 85, + "nodeType": "ExpressionStatement", + "src": "1111:24:1" + } + ] + }, + "documentation": "@dev The Ownable constructor sets the original `owner` of the contract to the sender\naccount.", + "id": 87, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "1095:2:1" + }, + "payable": false, + "returnParameters": { + "id": 78, + "nodeType": "ParameterList", + "parameters": [], + "src": "1105:0:1" + }, + "scope": 184, + "src": "1084:56:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 98, + "nodeType": "Block", + "src": "1241:105:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 90, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1255:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 93, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 91, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1261:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1261:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1255:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7420616c6c6f7765642062792074686520636f6e74726163742e", + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1274:59:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8291170cda70aa6a33f032b286d45ac3395ac65762e92264c69af22ca29fa73f", + "typeString": "literal_string \"Error: Transaction sender is not allowed by the contract.\"" + }, + "value": "Error: Transaction sender is not allowed by the contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8291170cda70aa6a33f032b286d45ac3395ac65762e92264c69af22ca29fa73f", + "typeString": "literal_string \"Error: Transaction sender is not allowed by the contract.\"" + } + ], + "id": 89, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "1247:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1247:87:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 96, + "nodeType": "ExpressionStatement", + "src": "1247:87:1" + }, + { + "id": 97, + "nodeType": "PlaceholderStatement", + "src": "1340:1:1" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 99, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 88, + "nodeType": "ParameterList", + "parameters": [], + "src": "1238:2:1" + }, + "src": "1220:126:1", + "visibility": "internal" + }, + { + "body": { + "id": 138, + "nodeType": "Block", + "src": "1674:206:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 109, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1688:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1708:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1700:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1700:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1688:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c21", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1712:33:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0cf773df2ba40d551ba87e95013f067aa808666d9d26ad6f662416df58eb7494", + "typeString": "literal_string \"Error: newOwner cannot be null!\"" + }, + "value": "Error: newOwner cannot be null!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0cf773df2ba40d551ba87e95013f067aa808666d9d26ad6f662416df58eb7494", + "typeString": "literal_string \"Error: newOwner cannot be null!\"" + } + ], + "id": 108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "1680:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1680:66:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "1680:66:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 118, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1778:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1778:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 120, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1790:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 117, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1757:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1757:42:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 122, + "nodeType": "EmitStatement", + "src": "1752:47:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 123, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1805:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 125, + "indexExpression": { + "argumentTypes": null, + "id": 124, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1811:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1805:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1823:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1805:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 128, + "nodeType": "ExpressionStatement", + "src": "1805:22:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 129, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1833:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 132, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 130, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1839:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1839:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1833:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1853:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1833:25:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 135, + "nodeType": "ExpressionStatement", + "src": "1833:25:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1871:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 107, + "id": 137, + "nodeType": "Return", + "src": "1864:11:1" + } + ] + }, + "documentation": "@dev Allows the current owner to transfer control of the contract to a newOwner.\n@param newOwner The address to transfer ownership to.\n@return {\"success\" : \"Returns true when successfully transferred ownership\"}", + "id": 139, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 104, + "modifierName": { + "argumentTypes": null, + "id": 103, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1641:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1641:9:1" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 101, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 139, + "src": "1616:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1616:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1615:18:1" + }, + "payable": false, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 139, + "src": "1660:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 105, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1660:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1659:14:1" + }, + "scope": 184, + "src": "1589:291:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 160, + "nodeType": "Block", + "src": "2215:97:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 148, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2221:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 150, + "indexExpression": { + "argumentTypes": null, + "id": 149, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "2227:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2221:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2245:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2221:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2221:28:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 155, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "2275:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 154, + "name": "AllowOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "2260:14:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2260:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "EmitStatement", + "src": "2255:35:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2303:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 147, + "id": 159, + "nodeType": "Return", + "src": "2296:11:1" + } + ] + }, + "documentation": "@dev Allows interface contracts and accounts to access contract methods (e.g. Storage contract)\n@param allowedAddress The address of new owner\n@return {\"success\" : \"Returns true when successfully allowed ownership\"}", + "id": 161, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 144, + "modifierName": { + "argumentTypes": null, + "id": 143, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2182:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2182:9:1" + } + ], + "name": "allowOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 141, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2151:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 140, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2151:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2150:24:1" + }, + "payable": false, + "returnParameters": { + "id": 147, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 146, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2201:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 145, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2201:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2200:14:1" + }, + "scope": 184, + "src": "2127:185:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 182, + "nodeType": "Block", + "src": "2660:99:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 170, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2666:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 172, + "indexExpression": { + "argumentTypes": null, + "id": 171, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "2672:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2666:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2690:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2666:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2666:29:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 177, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "2722:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 176, + "name": "RevokeOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "2706:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2706:31:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 179, + "nodeType": "EmitStatement", + "src": "2701:36:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2750:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 169, + "id": 181, + "nodeType": "Return", + "src": "2743:11:1" + } + ] + }, + "documentation": "@dev Disallows interface contracts and accounts to access contract methods (e.g. Storage contract)\n@param allowedAddress The address to disallow ownership\n@return {\"success\" : \"Returns true when successfully allowed ownership\"}", + "id": 183, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 166, + "modifierName": { + "argumentTypes": null, + "id": 165, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2627:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2627:9:1" + } + ], + "name": "removeOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 163, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "2596:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 162, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2596:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2595:24:1" + }, + "payable": false, + "returnParameters": { + "id": 169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 168, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "2646:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 167, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2646:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2645:14:1" + }, + "scope": 184, + "src": "2571:188:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 185, + "src": "703:2059:1" + } + ], + "src": "0:2763:1" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:14:09.109Z" +} \ No newline at end of file diff --git a/deployed/mainnet/SafeMath.json b/deployed/mainnet/SafeMath.json new file mode 100644 index 0000000..59a3efc --- /dev/null +++ b/deployed/mainnet/SafeMath.json @@ -0,0 +1,2630 @@ +{ + "contractName": "SafeMath", + "abi": [], + "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582050f4e221bb4114d8270b88c8af6307ea6c60ecc6f0aaf838d598316e5204a3930029", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582050f4e221bb4114d8270b88c8af6307ea6c60ecc6f0aaf838d598316e5204a3930029", + "sourceMap": "119:1597:2:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", + "deployedSourceMap": "119:1597:2:-;;;;;;;;", + "source": "pragma solidity 0.4.24;\n\n\n/**\n * @title SafeMath\n * @notice Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @notice Multiplies two numbers, throws on overflow.\n * @param a Multiplier\n * @param b Multiplicand\n * @return {\"result\" : \"Returns product\"}\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256 result) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n require(c / a == b, \"Error: Unsafe multiplication operation!\");\n return c;\n }\n\n /**\n * @notice Integer division of two numbers, truncating the quotient.\n * @param a Dividend\n * @param b Divisor\n * @return {\"result\" : \"Returns quotient\"}\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256 result) {\n // @dev require(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // @dev require(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @notice Subtracts two numbers, throws on underflow.\n * @param a Subtrahend\n * @param b Minuend\n * @return {\"result\" : \"Returns difference\"}\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256 result) {\n // @dev throws on overflow (i.e. if subtrahend is greater than minuend)\n require(b <= a, \"Error: Unsafe subtraction operation!\");\n return a - b;\n }\n\n /**\n * @notice Adds two numbers, throws on overflow.\n * @param a First addend\n * @param b Second addend\n * @return {\"result\" : \"Returns summation\"}\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256 result) {\n uint256 c = a + b;\n require(c >= a, \"Error: Unsafe addition operation!\");\n return c;\n }\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 285 + ] + }, + "id": 286, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 186, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@notice Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 285, + "linearizedBaseContracts": [ + 285 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 219, + "nodeType": "Block", + "src": "375:150:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 195, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "385:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "390:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "385:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 201, + "nodeType": "IfStatement", + "src": "381:35:2", + "trueBody": { + "id": 200, + "nodeType": "Block", + "src": "393:23:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "408:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 194, + "id": 199, + "nodeType": "Return", + "src": "401:8:2" + } + ] + } + }, + { + "assignments": [ + 203 + ], + "declarations": [ + { + "constant": false, + "id": 203, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "421:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 202, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "421:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 207, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 204, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "433:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 205, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "437:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "433:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "421:17:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 209, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "452:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 210, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "456:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "452:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 212, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "461:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "452:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665206d756c7469706c69636174696f6e206f7065726174696f6e21", + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "464:41:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49c093c4aaac6a69427fb8661ed09ebf27cf7be118643b83a9b37c894f827a15", + "typeString": "literal_string \"Error: Unsafe multiplication operation!\"" + }, + "value": "Error: Unsafe multiplication operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_49c093c4aaac6a69427fb8661ed09ebf27cf7be118643b83a9b37c894f827a15", + "typeString": "literal_string \"Error: Unsafe multiplication operation!\"" + } + ], + "id": 208, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "444:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "444:62:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 216, + "nodeType": "ExpressionStatement", + "src": "444:62:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 217, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "519:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 194, + "id": 218, + "nodeType": "Return", + "src": "512:8:2" + } + ] + }, + "documentation": "@notice Multiplies two numbers, throws on overflow.\n@param a Multiplier\n@param b Multiplicand\n@return {\"result\" : \"Returns product\"}", + "id": 220, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 188, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "314:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "314:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 190, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "325:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "325:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "313:22:2" + }, + "payable": false, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 193, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "359:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 192, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "359:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "358:16:2" + }, + "scope": 285, + "src": "301:224:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 237, + "nodeType": "Block", + "src": "771:210:2", + "statements": [ + { + "assignments": [ + 230 + ], + "declarations": [ + { + "constant": false, + "id": 230, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "857:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "857:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 234, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 231, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "869:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 232, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "873:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "869:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "857:17:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 235, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "975:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 228, + "id": 236, + "nodeType": "Return", + "src": "968:8:2" + } + ] + }, + "documentation": "@notice Integer division of two numbers, truncating the quotient.\n@param a Dividend\n@param b Divisor\n@return {\"result\" : \"Returns quotient\"}", + "id": 238, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 222, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "710:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "710:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 224, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "721:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "721:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "709:22:2" + }, + "payable": false, + "returnParameters": { + "id": 228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 227, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "755:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 226, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "755:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "754:16:2" + }, + "scope": 285, + "src": "697:284:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 258, + "nodeType": "Block", + "src": "1217:160:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 248, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1307:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 249, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1312:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1307:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665207375627472616374696f6e206f7065726174696f6e21", + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1315:38:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f18cbb1620e3a8d0fe2c5bbe86168dc13c8076938e9197b95da6e0f94a6aec73", + "typeString": "literal_string \"Error: Unsafe subtraction operation!\"" + }, + "value": "Error: Unsafe subtraction operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f18cbb1620e3a8d0fe2c5bbe86168dc13c8076938e9197b95da6e0f94a6aec73", + "typeString": "literal_string \"Error: Unsafe subtraction operation!\"" + } + ], + "id": 247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "1299:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1299:55:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 253, + "nodeType": "ExpressionStatement", + "src": "1299:55:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 254, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1367:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 255, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1371:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1367:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 246, + "id": 257, + "nodeType": "Return", + "src": "1360:12:2" + } + ] + }, + "documentation": "@notice Subtracts two numbers, throws on underflow.\n@param a Subtrahend\n@param b Minuend\n@return {\"result\" : \"Returns difference\"}", + "id": 259, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 243, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1156:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1156:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1167:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1167:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1155:22:2" + }, + "payable": false, + "returnParameters": { + "id": 246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 245, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1201:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1201:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1200:16:2" + }, + "scope": 285, + "src": "1143:234:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 283, + "nodeType": "Block", + "src": "1614:100:2", + "statements": [ + { + "assignments": [ + 269 + ], + "declarations": [ + { + "constant": false, + "id": 269, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1620:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1620:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 273, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 270, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 261, + "src": "1632:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 271, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 263, + "src": "1636:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1632:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1620:17:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 275, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1651:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 276, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 261, + "src": "1656:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1651:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e21", + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1659:35:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dac03c1cef2f037b40233270a73516c3c6e3467d614e4cdde1fac39b0472de4a", + "typeString": "literal_string \"Error: Unsafe addition operation!\"" + }, + "value": "Error: Unsafe addition operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dac03c1cef2f037b40233270a73516c3c6e3467d614e4cdde1fac39b0472de4a", + "typeString": "literal_string \"Error: Unsafe addition operation!\"" + } + ], + "id": 274, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "1643:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1643:52:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 280, + "nodeType": "ExpressionStatement", + "src": "1643:52:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 281, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1708:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 267, + "id": 282, + "nodeType": "Return", + "src": "1701:8:2" + } + ] + }, + "documentation": "@notice Adds two numbers, throws on overflow.\n@param a First addend\n@param b Second addend\n@return {\"result\" : \"Returns summation\"}", + "id": 284, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 261, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1553:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1553:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 263, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1564:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1564:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1552:22:2" + }, + "payable": false, + "returnParameters": { + "id": 267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1598:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 265, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1598:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1597:16:2" + }, + "scope": 285, + "src": "1540:174:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 286, + "src": "119:1597:2" + } + ], + "src": "0:1717:2" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 285 + ] + }, + "id": 286, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 186, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@notice Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 285, + "linearizedBaseContracts": [ + 285 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 219, + "nodeType": "Block", + "src": "375:150:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 195, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "385:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "390:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "385:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 201, + "nodeType": "IfStatement", + "src": "381:35:2", + "trueBody": { + "id": 200, + "nodeType": "Block", + "src": "393:23:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "408:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 194, + "id": 199, + "nodeType": "Return", + "src": "401:8:2" + } + ] + } + }, + { + "assignments": [ + 203 + ], + "declarations": [ + { + "constant": false, + "id": 203, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "421:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 202, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "421:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 207, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 204, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "433:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 205, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "437:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "433:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "421:17:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 209, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "452:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 210, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "456:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "452:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 212, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "461:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "452:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665206d756c7469706c69636174696f6e206f7065726174696f6e21", + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "464:41:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49c093c4aaac6a69427fb8661ed09ebf27cf7be118643b83a9b37c894f827a15", + "typeString": "literal_string \"Error: Unsafe multiplication operation!\"" + }, + "value": "Error: Unsafe multiplication operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_49c093c4aaac6a69427fb8661ed09ebf27cf7be118643b83a9b37c894f827a15", + "typeString": "literal_string \"Error: Unsafe multiplication operation!\"" + } + ], + "id": 208, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "444:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "444:62:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 216, + "nodeType": "ExpressionStatement", + "src": "444:62:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 217, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "519:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 194, + "id": 218, + "nodeType": "Return", + "src": "512:8:2" + } + ] + }, + "documentation": "@notice Multiplies two numbers, throws on overflow.\n@param a Multiplier\n@param b Multiplicand\n@return {\"result\" : \"Returns product\"}", + "id": 220, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 188, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "314:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "314:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 190, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "325:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "325:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "313:22:2" + }, + "payable": false, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 193, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "359:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 192, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "359:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "358:16:2" + }, + "scope": 285, + "src": "301:224:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 237, + "nodeType": "Block", + "src": "771:210:2", + "statements": [ + { + "assignments": [ + 230 + ], + "declarations": [ + { + "constant": false, + "id": 230, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "857:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "857:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 234, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 231, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "869:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 232, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "873:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "869:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "857:17:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 235, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "975:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 228, + "id": 236, + "nodeType": "Return", + "src": "968:8:2" + } + ] + }, + "documentation": "@notice Integer division of two numbers, truncating the quotient.\n@param a Dividend\n@param b Divisor\n@return {\"result\" : \"Returns quotient\"}", + "id": 238, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 222, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "710:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "710:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 224, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "721:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "721:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "709:22:2" + }, + "payable": false, + "returnParameters": { + "id": 228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 227, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "755:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 226, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "755:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "754:16:2" + }, + "scope": 285, + "src": "697:284:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 258, + "nodeType": "Block", + "src": "1217:160:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 248, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1307:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 249, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1312:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1307:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665207375627472616374696f6e206f7065726174696f6e21", + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1315:38:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f18cbb1620e3a8d0fe2c5bbe86168dc13c8076938e9197b95da6e0f94a6aec73", + "typeString": "literal_string \"Error: Unsafe subtraction operation!\"" + }, + "value": "Error: Unsafe subtraction operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f18cbb1620e3a8d0fe2c5bbe86168dc13c8076938e9197b95da6e0f94a6aec73", + "typeString": "literal_string \"Error: Unsafe subtraction operation!\"" + } + ], + "id": 247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "1299:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1299:55:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 253, + "nodeType": "ExpressionStatement", + "src": "1299:55:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 254, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1367:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 255, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1371:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1367:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 246, + "id": 257, + "nodeType": "Return", + "src": "1360:12:2" + } + ] + }, + "documentation": "@notice Subtracts two numbers, throws on underflow.\n@param a Subtrahend\n@param b Minuend\n@return {\"result\" : \"Returns difference\"}", + "id": 259, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 243, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1156:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1156:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1167:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1167:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1155:22:2" + }, + "payable": false, + "returnParameters": { + "id": 246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 245, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1201:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1201:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1200:16:2" + }, + "scope": 285, + "src": "1143:234:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 283, + "nodeType": "Block", + "src": "1614:100:2", + "statements": [ + { + "assignments": [ + 269 + ], + "declarations": [ + { + "constant": false, + "id": 269, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1620:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1620:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 273, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 270, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 261, + "src": "1632:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 271, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 263, + "src": "1636:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1632:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1620:17:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 275, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1651:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 276, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 261, + "src": "1656:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1651:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e21", + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1659:35:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dac03c1cef2f037b40233270a73516c3c6e3467d614e4cdde1fac39b0472de4a", + "typeString": "literal_string \"Error: Unsafe addition operation!\"" + }, + "value": "Error: Unsafe addition operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dac03c1cef2f037b40233270a73516c3c6e3467d614e4cdde1fac39b0472de4a", + "typeString": "literal_string \"Error: Unsafe addition operation!\"" + } + ], + "id": 274, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "1643:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1643:52:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 280, + "nodeType": "ExpressionStatement", + "src": "1643:52:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 281, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1708:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 267, + "id": 282, + "nodeType": "Return", + "src": "1701:8:2" + } + ] + }, + "documentation": "@notice Adds two numbers, throws on overflow.\n@param a First addend\n@param b Second addend\n@return {\"result\" : \"Returns summation\"}", + "id": 284, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 261, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1553:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1553:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 263, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1564:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1564:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1552:22:2" + }, + "payable": false, + "returnParameters": { + "id": 267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1598:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 265, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1598:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1597:16:2" + }, + "scope": 285, + "src": "1540:174:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 286, + "src": "119:1597:2" + } + ], + "src": "0:1717:2" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x2a171070a2a1eb945cda041326a0516d728ac45b", + "transactionHash": "0x3eeafe8ad9a6eba728dcba9ff2676fdae91de48d0a2d37186bdce8505745c918" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.565Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIOAuthority.json b/deployed/mainnet/TokenIOAuthority.json new file mode 100644 index 0000000..139676f --- /dev/null +++ b/deployed/mainnet/TokenIOAuthority.json @@ -0,0 +1,5066 @@ +{ + "contractName": "TokenIOAuthority", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "firmName", + "type": "string" + }, + { + "name": "_authorized", + "type": "bool" + } + ], + "name": "setRegisteredFirm", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "firmName", + "type": "string" + }, + { + "name": "authority", + "type": "address" + }, + { + "name": "_authorized", + "type": "bool" + } + ], + "name": "setRegisteredAuthority", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "authority", + "type": "address" + } + ], + "name": "getFirmFromAuthority", + "outputs": [ + { + "name": "firm", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "firmName", + "type": "string" + } + ], + "name": "isRegisteredFirm", + "outputs": [ + { + "name": "status", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "firmName", + "type": "string" + }, + { + "name": "authority", + "type": "address" + } + ], + "name": "isRegisteredToFirm", + "outputs": [ + { + "name": "registered", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "authority", + "type": "address" + } + ], + "name": "isRegisteredAuthority", + "outputs": [ + { + "name": "registered", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "feeContract", + "type": "address" + } + ], + "name": "setMasterFeeContract", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051602080611d64833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a039094169390931783558154169091179055611cee90819061007690396000f3006080604052600436106100ae5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663339282b781146100b3578063339e2c45146100e857806341ade6b71461014c5780634bbc142c146101a9578063666a3427146101ca578063666e1b39146101eb578063acca2c241461020c578063ee5493b6146102a2578063f03529c3146102fb578063f2fde38b1461031c578063f3f969a01461033d575b600080fd5b3480156100bf57600080fd5b506100d4600160a060020a03600435166103a6565b604080519115158252519081900360200190f35b3480156100f457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d494369492936024939284019190819084018382808284375094975050509235600160a060020a031693506103bf92505050565b34801561015857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d49436949293602493928401919081908401838280828437509497505050509135151592506103da915050565b3480156101b557600080fd5b506100d4600160a060020a036004351661056c565b3480156101d657600080fd5b506100d4600160a060020a0360043516610628565b3480156101f757600080fd5b506100d4600160a060020a03600435166106e1565b34801561021857600080fd5b5061022d600160a060020a03600435166106f6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026757818101518382015260200161024f565b50505050905090810190601f1680156102945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ae57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d49436949293602493928401919081908401838280828437509497506107099650505050505050565b34801561030757600080fd5b506100d4600160a060020a036004351661071c565b34801561032857600080fd5b506100d4600160a060020a0360043516610842565b34801561034957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d494369492936024939284019190819084018382808284375094975050600160a060020a0385351695505050505060200135151561097c565b60006103b960018363ffffffff610aac16565b92915050565b60006103d36001848463ffffffff610c7216565b9392505050565b336000818152602081905260408120549091849160ff168061040957506104096001838363ffffffff610c7216565b15156104ab576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e60448201527f6f742068617665207065726d697373696f6e20666f722074686973206f70657260648201527f6174696f6e210000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b6104bd6001868663ffffffff610e2716565b151561055f576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a204661696c656420746f207265676973746572206669726d207760448201527f6974682073746f7261676520636f6e74726163742120506c656173652063686560648201527f636b20796f757220617267756d656e74732e0000000000000000000000000000608482015290519081900360a40190fd5b600192505b505092915050565b3360009081526020819052604081205460ff1615156105d7576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610693576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60606103b960018363ffffffff61106a16565b60006103b960018363ffffffff61122f16565b3360009081526020819052604081205460ff161515610787576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b61079860018363ffffffff6112ef16565b151561083a576040805160e560020a62461bcd02815260206004820152606060248201527f4572726f723a20556e61626c6520746f20736574206d6173746572206665652060448201527f636f6e74726163742e20506c6561736520656e737572652066656520636f6e7460648201527f72616374206861732074686520636f727265637420706172616d65746572732e608482015290519081900360a40190fd5b506001919050565b3360009081526020819052604081205460ff1615156108ad576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216151561090d576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b336000818152602081905260408120549091859160ff16806109ab57506109ab6001838363ffffffff610c7216565b1515610a4d576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e60448201527f6f742068617665207065726d697373696f6e20666f722074686973206f70657260648201527f6174696f6e210000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b610a60600187878763ffffffff6114e316565b1515610aa05760405160e560020a62461bcd0281526004018080602001828103825260b2815260200180611bb160b2913960c00191505060405180910390fd5b50600195945050505050565b600080610ac284610abd8686611a39565b61106a565b610acc8585611a39565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310610b265780518252601f199092019160209182019101610b07565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610bb15780518252601f199092019160209182019101610b92565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015610c3e57600080fd5b505af1158015610c52573d6000803e3d6000fd5b505050506040513d6020811015610c6857600080fd5b5051949350505050565b60008083610c808685611a39565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310610cda5780518252601f199092019160209182019101610cbb565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610d655780518252601f199092019160209182019101610d46565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050506040513d6020811015610e1c57600080fd5b505195945050505050565b6000808360405160200180807f726567697374657265642e6669726d0000000000000000000000000000000000815250600f0182805190602001908083835b60208310610e855780518252601f199092019160209182019101610e66565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310610ee85780518252601f199092019160209182019101610ec9565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528a151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015610f7d57600080fd5b505af1158015610f91573d6000803e3d6000fd5b505050506040513d6020811015610fa757600080fd5b5051151561105f576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b606060006110788484611a39565b60405160200180807f726567697374657265642e617574686f726974792e6669726d0000000000000081525060190182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061110f5780518252601f1990920191602091820191016110f0565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547f986e791a000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063986e791a9350602480820193600093509182900301818387803b15801561119f57600080fd5b505af11580156111b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156111dc57600080fd5b8101908080516401000000008111156111f457600080fd5b8201602081018481111561120757600080fd5b815164010000000081118282018710171561122157600080fd5b509098975050505050505050565b6000808260405160200180807f726567697374657265642e6669726d0000000000000000000000000000000000815250600f0182805190602001908083835b6020831061128d5780518252601f19909201916020918201910161126e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405180828051906020019080838360208310610bb15780518252601f199092019160209182019101610b92565b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b602083106113615780518252601f199092019160209182019101611342565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b1580156113f757600080fd5b505af115801561140b573d6000803e3d6000fd5b505050506040513d602081101561142157600080fd5b505115156114d9576040805160e560020a62461bcd0281526020600482015260686024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019392505050565b60008060006114f2878761122f565b151561156e576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20606973737565724669726d60206d757374206265207265676960448201527f7374657265642e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b858560405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b602083106115ca5780518252601f1990920191602091820191016115ab565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106116555780518252601f199092019160209182019101611636565b51815160209384036101000a6000190180199092169116179052604080519290940182900382207f726567697374657265642e617574686f726974792e6669726d0000000000000083830152600160a060020a038c166c010000000000000000000000000260398401528451808403602d018152604d9093019485905282519098509195509293508392850191508083835b602083106117065780518252601f1990920191602091820191016116e7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208d547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018a90528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b505050506040513d60208110156117c557600080fd5b5051151561187d576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8654604080517f6e8995500000000000000000000000000000000000000000000000000000000081526004810184815260248201928352895160448301528951600160a060020a0390941693636e8995509386938c9392606490910190602085019080838360005b838110156118fd5781810151838201526020016118e5565b50505050905090810190601f16801561192a5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561194a57600080fd5b505af115801561195e573d6000803e3d6000fd5b505050506040513d602081101561197457600080fd5b50511515611a2c576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019695505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ad65780518252601f199092019160209182019101611ab7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015611b6357600080fd5b505af1158015611b77573d6000803e3d6000fd5b505050506040513d6020811015611b8d57600080fd5b50519050600160a060020a03811615611ba857809250610564565b83925061056456004572726f723a204661696c656420746f20726567697374657220617574686f7269747920666f7220697373756572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e747320616e6420656e73757265206669726d4e616d652069732072656769737465726564206265666f726520616c6c6f77696e6720616e20617574686f72697479206f662073616964206669726d20616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742073746f726167652076616c4572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820c63567ca5f96382038fa1dd4daa39dbde12f257c3f669d7b7afc85f74e1bbffe0029", + "deployedBytecode": "0x6080604052600436106100ae5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663339282b781146100b3578063339e2c45146100e857806341ade6b71461014c5780634bbc142c146101a9578063666a3427146101ca578063666e1b39146101eb578063acca2c241461020c578063ee5493b6146102a2578063f03529c3146102fb578063f2fde38b1461031c578063f3f969a01461033d575b600080fd5b3480156100bf57600080fd5b506100d4600160a060020a03600435166103a6565b604080519115158252519081900360200190f35b3480156100f457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d494369492936024939284019190819084018382808284375094975050509235600160a060020a031693506103bf92505050565b34801561015857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d49436949293602493928401919081908401838280828437509497505050509135151592506103da915050565b3480156101b557600080fd5b506100d4600160a060020a036004351661056c565b3480156101d657600080fd5b506100d4600160a060020a0360043516610628565b3480156101f757600080fd5b506100d4600160a060020a03600435166106e1565b34801561021857600080fd5b5061022d600160a060020a03600435166106f6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026757818101518382015260200161024f565b50505050905090810190601f1680156102945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ae57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d49436949293602493928401919081908401838280828437509497506107099650505050505050565b34801561030757600080fd5b506100d4600160a060020a036004351661071c565b34801561032857600080fd5b506100d4600160a060020a0360043516610842565b34801561034957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d494369492936024939284019190819084018382808284375094975050600160a060020a0385351695505050505060200135151561097c565b60006103b960018363ffffffff610aac16565b92915050565b60006103d36001848463ffffffff610c7216565b9392505050565b336000818152602081905260408120549091849160ff168061040957506104096001838363ffffffff610c7216565b15156104ab576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e60448201527f6f742068617665207065726d697373696f6e20666f722074686973206f70657260648201527f6174696f6e210000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b6104bd6001868663ffffffff610e2716565b151561055f576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a204661696c656420746f207265676973746572206669726d207760448201527f6974682073746f7261676520636f6e74726163742120506c656173652063686560648201527f636b20796f757220617267756d656e74732e0000000000000000000000000000608482015290519081900360a40190fd5b600192505b505092915050565b3360009081526020819052604081205460ff1615156105d7576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610693576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60606103b960018363ffffffff61106a16565b60006103b960018363ffffffff61122f16565b3360009081526020819052604081205460ff161515610787576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b61079860018363ffffffff6112ef16565b151561083a576040805160e560020a62461bcd02815260206004820152606060248201527f4572726f723a20556e61626c6520746f20736574206d6173746572206665652060448201527f636f6e74726163742e20506c6561736520656e737572652066656520636f6e7460648201527f72616374206861732074686520636f727265637420706172616d65746572732e608482015290519081900360a40190fd5b506001919050565b3360009081526020819052604081205460ff1615156108ad576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216151561090d576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b336000818152602081905260408120549091859160ff16806109ab57506109ab6001838363ffffffff610c7216565b1515610a4d576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e60448201527f6f742068617665207065726d697373696f6e20666f722074686973206f70657260648201527f6174696f6e210000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b610a60600187878763ffffffff6114e316565b1515610aa05760405160e560020a62461bcd0281526004018080602001828103825260b2815260200180611bb160b2913960c00191505060405180910390fd5b50600195945050505050565b600080610ac284610abd8686611a39565b61106a565b610acc8585611a39565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310610b265780518252601f199092019160209182019101610b07565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610bb15780518252601f199092019160209182019101610b92565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015610c3e57600080fd5b505af1158015610c52573d6000803e3d6000fd5b505050506040513d6020811015610c6857600080fd5b5051949350505050565b60008083610c808685611a39565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310610cda5780518252601f199092019160209182019101610cbb565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610d655780518252601f199092019160209182019101610d46565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050506040513d6020811015610e1c57600080fd5b505195945050505050565b6000808360405160200180807f726567697374657265642e6669726d0000000000000000000000000000000000815250600f0182805190602001908083835b60208310610e855780518252601f199092019160209182019101610e66565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310610ee85780518252601f199092019160209182019101610ec9565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528a151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015610f7d57600080fd5b505af1158015610f91573d6000803e3d6000fd5b505050506040513d6020811015610fa757600080fd5b5051151561105f576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b606060006110788484611a39565b60405160200180807f726567697374657265642e617574686f726974792e6669726d0000000000000081525060190182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061110f5780518252601f1990920191602091820191016110f0565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547f986e791a000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063986e791a9350602480820193600093509182900301818387803b15801561119f57600080fd5b505af11580156111b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156111dc57600080fd5b8101908080516401000000008111156111f457600080fd5b8201602081018481111561120757600080fd5b815164010000000081118282018710171561122157600080fd5b509098975050505050505050565b6000808260405160200180807f726567697374657265642e6669726d0000000000000000000000000000000000815250600f0182805190602001908083835b6020831061128d5780518252601f19909201916020918201910161126e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405180828051906020019080838360208310610bb15780518252601f199092019160209182019101610b92565b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b602083106113615780518252601f199092019160209182019101611342565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b1580156113f757600080fd5b505af115801561140b573d6000803e3d6000fd5b505050506040513d602081101561142157600080fd5b505115156114d9576040805160e560020a62461bcd0281526020600482015260686024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019392505050565b60008060006114f2878761122f565b151561156e576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20606973737565724669726d60206d757374206265207265676960448201527f7374657265642e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b858560405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b602083106115ca5780518252601f1990920191602091820191016115ab565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106116555780518252601f199092019160209182019101611636565b51815160209384036101000a6000190180199092169116179052604080519290940182900382207f726567697374657265642e617574686f726974792e6669726d0000000000000083830152600160a060020a038c166c010000000000000000000000000260398401528451808403602d018152604d9093019485905282519098509195509293508392850191508083835b602083106117065780518252601f1990920191602091820191016116e7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208d547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018a90528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b505050506040513d60208110156117c557600080fd5b5051151561187d576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8654604080517f6e8995500000000000000000000000000000000000000000000000000000000081526004810184815260248201928352895160448301528951600160a060020a0390941693636e8995509386938c9392606490910190602085019080838360005b838110156118fd5781810151838201526020016118e5565b50505050905090810190601f16801561192a5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561194a57600080fd5b505af115801561195e573d6000803e3d6000fd5b505050506040513d602081101561197457600080fd5b50511515611a2c576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019695505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ad65780518252601f199092019160209182019101611ab7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015611b6357600080fd5b505af1158015611b77573d6000803e3d6000fd5b505050506040513d6020811015611b8d57600080fd5b50519050600160a060020a03811615611ba857809250610564565b83925061056456004572726f723a204661696c656420746f20726567697374657220617574686f7269747920666f7220697373756572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e747320616e6420656e73757265206669726d4e616d652069732072656769737465726564206265666f726520616c6c6f77696e6720616e20617574686f72697479206f662073616964206669726d20616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742073746f726167652076616c4572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820c63567ca5f96382038fa1dd4daa39dbde12f257c3f669d7b7afc85f74e1bbffe0029", + "sourceMap": "871:4829:3:-;;;1214:515;8:9:-1;5:2;;;30:1;27;20:12;5:2;1214:515:3;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1214:515:3;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1592:46:3;;-1:-1:-1;;;;;;1592:46:3;-1:-1:-1;;;;;1592:46:3;;;;;;;;;1698:24;;;;;;;;871:4829;;;;;;;;", + "deployedSourceMap": "871:4829:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4581:198;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4581:198:3;-1:-1:-1;;;;;4581:198:3;;;;;;;;;;;;;;;;;;;;;;;4150:217;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4150:217:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4150:217:3;;-1:-1:-1;;;4150:217:3;;-1:-1:-1;;;;;4150:217:3;;-1:-1:-1;4150:217:3;;-1:-1:-1;;;4150:217:3;1969:384;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1969:384:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1969:384:3;;-1:-1:-1;;;;1969:384:3;;;;;-1:-1:-1;1969:384:3;;-1:-1:-1;;1969:384:3;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;2571:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;3384:142:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3384:142:3;-1:-1:-1;;;;;3384:142:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3384:142:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3698:184;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3698:184:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3698:184:3;;-1:-1:-1;3698:184:3;;-1:-1:-1;;;;;;;3698:184:3;4998:351;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4998:351:3;-1:-1:-1;;;;;4998:351:3;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2677:529:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2677:529:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2677:529:3;;-1:-1:-1;;;;;;;2677:529:3;;;;-1:-1:-1;;;;;2677:529:3;;;;;;;4581:198;4652:15;4736:36;:3;4762:9;4736:36;:25;:36;:::i;:::-;4729:43;4581:198;-1:-1:-1;;4581:198:3:o;4150:217::-;4235:15;4317:43;:3;4340:8;4350:9;4317:43;:22;:43;:::i;:::-;4310:50;4150:217;-1:-1:-1;;;4150:217:3:o;1969:384::-;2062:10;2083:12;5522:16;;;;;;;;;;;2083:12;;2052:8;;5522:16;;;:63;;-1:-1:-1;5542:43:3;:3;5565:8;5575:9;5542:43;:22;:43;:::i;:::-;5514:165;;;;;;;-1:-1:-1;;;;;5514:165:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2175:44;:3;2197:8;2207:11;2175:44;:21;:44;:::i;:::-;2156:169;;;;;;;-1:-1:-1;;;;;2156:169:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2342:4;2335:11;;5689:1;1969:384;;;;;;:::o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;2571:188::-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;3384:142:3:-;3454:11;3484:35;:3;3509:9;3484:35;:24;:35;:::i;3698:184::-;3762:11;3845:30;:3;3866:8;3845:30;:20;:30;:::i;4998:351::-;1261:10:1;5075:12:3;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;5162:37:3;:3;5187:11;5162:37;:24;:37;:::i;:::-;5143:176;;;;;;;-1:-1:-1;;;;;5143:176:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5336:4:3;4998:351;;;:::o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;2677:529:3:-;2794:10;2815:12;5522:16;;;;;;;;;;;2815:12;;2784:8;;5522:16;;;:63;;-1:-1:-1;5542:43:3;:3;5565:8;5575:9;5542:43;:22;:43;:::i;:::-;5514:165;;;;;;;-1:-1:-1;;;;;5514:165:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2916:60;:3;2943:8;2953:9;2964:11;2916:60;:26;:60;:::i;:::-;2897:281;;;;;;-1:-1:-1;;;;;2897:281:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3195:4:3;;2677:529;-1:-1:-1;;;;;2677:529:3:o;50232:346:8:-;50331:15;50354:10;50418:71;50439:4;50445:43;50465:4;50471:16;50445:19;:43::i;:::-;50418:20;:71::i;:::-;50491:43;50511:4;50517:16;50491:19;:43::i;:::-;50377:158;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;50377:158:8;;;;;;;-1:-1:-1;;;;;50377:158:8;-1:-1:-1;;;;;50377:158:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;50377:158:8;;;50367:169;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;50367:169:8;;;;;;;;;;;;50549:12;;:24;;;;;;;;;;;50367:169;;-1:-1:-1;;;;;;50549:12:8;;;;-1:-1:-1;50549:20:8;;-1:-1:-1;50549:24:8;;;;;263:2:-1;;-1:-1;50549:24:8;;;;;;;-1:-1:-1;50549:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;50549:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;50549:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;50549:24:8;;50232:346;-1:-1:-1;;;;50232:346:8:o;49571:301::-;49686:15;49709:10;49773;49785:43;49805:4;49811:16;49785:19;:43::i;:::-;49732:97;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;49732:97:8;;;;;;;-1:-1:-1;;;;;49732:97:8;-1:-1:-1;;;;;49732:97:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;49732:97:8;;;49722:108;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;49722:108:8;;;;;;;;;;;;49843:12;;:24;;;;;;;;;;;49722:108;;-1:-1:-1;;;;;;49843:12:8;;;;-1:-1:-1;49843:20:8;;-1:-1:-1;49843:24:8;;;;;263:2:-1;;-1:-1;49843:24:8;;;;;;;-1:-1:-1;49843:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;49843:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;49843:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;49843:24:8;;49571:301;-1:-1:-1;;;;;49571:301:8:o;46103:387::-;46201:12;46221:10;46280;46244:47;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;46244:47:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;46244:47:8;;;46234:58;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;46234:58:8;;;;;;;;;;;;46313:12;;:34;;;;;;;;;;;;;;;;;;46234:58;;-1:-1:-1;;;;;;46313:12:8;;;;-1:-1:-1;46313:20:8;;-1:-1:-1;46313:34:8;;;;;263:2:-1;;-1:-1;46313:34:8;;;;;;;-1:-1:-1;46313:12:8;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;46313:34:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;46313:34:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;46313:34:8;46298:170;;;;;;;-1:-1:-1;;;;;46298:170:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;46298:170:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;46481:4:8;;46103:387;-1:-1:-1;;;;46103:387:8:o;48373:281::-;48471:17;48496:10;48565:43;48585:4;48591:16;48565:19;:43::i;:::-;48519:90;;;;;;;;;;;;;-1:-1:-1;;;;;48519:90:8;-1:-1:-1;;;;;48519:90:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;48519:90:8;;;48509:101;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;48509:101:8;;;;;;;;;;;;48623:12;;:26;;;;;;;;;;;48509:101;;-1:-1:-1;;;;;;48623:12:8;;;;-1:-1:-1;48623:22:8;;-1:-1:-1;48623:26:8;;;;;-1:-1:-1;;;48623:26:8;;;;;;-1:-1:-1;48623:12:8;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;48623:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;48623:26:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;48623:26:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;48623:26:8;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;-1:-1;48623:26:8;;48373:281;-1:-1:-1;;;;;;;;48373:281:8:o;48948:223::-;49035:15;49058:10;49117;49081:47;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;49081:47:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;49081:47:8;;;49071:58;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;25250:382:8;25342:12;25362:10;25385:39;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;25385:39:8;;;25375:50;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;25375:50:8;;;;;;;;;;;;25446:12;;:44;;;;;;;;;-1:-1:-1;;;;;25446:44:8;;;;;;;;;25375:50;;-1:-1:-1;25446:12:8;;;;;-1:-1:-1;25446:23:8;;-1:-1:-1;25446:44:8;;;;;263:2:-1;;-1:-1;25446:44:8;;;;;;;-1:-1:-1;25446:12:8;:44;;;5:2:-1;;;;30:1;27;20:12;5:2;25446:44:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25446:44:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25446:44:8;25431:179;;;;;;;-1:-1:-1;;;;;25431:179:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25431:179:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25623:4:8;;25250:382;-1:-1:-1;;;25250:382:8:o;47180:822::-;47309:12;47435;47537;47344:34;47361:4;47367:10;47344:16;:34::i;:::-;47329:99;;;;;;;-1:-1:-1;;;;;47329:99:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47501:10;47513:16;47460:70;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;47460:70:8;;;;;;;-1:-1:-1;;;;;47460:70:8;-1:-1:-1;;;;;47460:70:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;47460:70:8;;;47450:81;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;47450:81:8;;;;;;;;;;;;47562:63;;;;;-1:-1:-1;;;;;47562:63:8;;;;;;;;;;26:21:-1;;;22:32;;6:49;;47562:63:8;;;;;;;;47552:74;;47450:81;;-1:-1:-1;47562:63:8;;-1:-1:-1;47562:63:8;;-1:-1:-1;47562:63:8;;47552:74;;;-1:-1:-1;47552:74:8;47562:63;47552:74;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;47552:74:8;;;;;;;;;;;;47648:12;;:36;;;;;;;;;;;;;;;;;;47552:74;;-1:-1:-1;;;;;;47648:12:8;;;;-1:-1:-1;47648:20:8;;-1:-1:-1;47648:36:8;;;;;263:2:-1;;-1:-1;47648:36:8;;;;;;;-1:-1:-1;47648:12:8;:36;;;5:2:-1;;;;30:1;27;20:12;5:2;47648:36:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;47648:36:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;47648:36:8;47633:167;;;;;;;-1:-1:-1;;;;;47633:167:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;47633:167:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47822:12;;:40;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;47822:12:8;;;;:22;;47845:4;;47851:10;;47822:40;;;;;;;;;;;;;:12;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;47822:40:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;47822:40:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;47822:40:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;47822:40:8;47807:171;;;;;;;-1:-1:-1;;;;;47807:171:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;47807:171:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;47993:4:8;;47180:822;-1:-1:-1;;;;;;47180:822:8:o;16402:357::-;16490:25;16523:10;16596:23;16581:7;16546:43;;;;;;;;;;;;;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;;;16546:43:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16546:43:8;;;16536:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16536:54:8;;;;;;;;;;;;16622:12;;:27;;;;;;;;;;;16536:54;;-1:-1:-1;;;;;;16622:12:8;;;;-1:-1:-1;16622:23:8;;-1:-1:-1;16622:27:8;;;;;263:2:-1;;-1:-1;16622:27:8;;;;;;;-1:-1:-1;16622:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16622:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16622:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16622:27:8;;-1:-1:-1;;;;;;16659:22:8;;;16655:100;;16698:15;16691:22;;;;16655:100;16741:7;16734:14;;;", + "source": "pragma solidity 0.4.24;\n\n/*\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n\n/**\n@title TokenIOAuthority - Authority Smart Contract for Token, Inc.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n*/\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\ncontract TokenIOAuthority is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n * @notice Constructor method for Authority contract\n * @param _storageContract Ethereum Address of TokenIOStorage contract\n */\n constructor(address _storageContract) public {\n /*\n * @notice Set the storage contract for the interface\n * @dev This contract will be unable to use the storage constract until\n * @dev contract address is authorized with the storage contract\n * @dev Once authorized, you can setRegisteredFirm and setRegisteredAuthority\n */\n lib.Storage = TokenIOStorage(_storageContract);\n\n /// @dev set owner to contract initiator\n owner[msg.sender] = true;\n }\n\n /**\n * @notice Registers a firm as authorized true/false\n * @param firmName Name of firm\n * @param _authorized Authorization status\n * @return {\"success\" : \"Returns true if lib.setRegisteredFirm succeeds\"}\n */\n function setRegisteredFirm(string firmName, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) {\n /// @notice set firm registration status\n require(\n lib.setRegisteredFirm(firmName, _authorized),\n \"Error: Failed to register firm with storage contract! Please check your arguments.\"\n );\n return true;\n }\n\n /**\n * @notice Registers an authority asoociated with the given firm as true/false\n * @param firmName Name of firm\n * @param authority Address of authority account\n * @param _authorized Authorization status\n * @return {\"success\" : \"Returns true if lib.setRegisteredAuthority succeeds\"}\n */\n function setRegisteredAuthority(string firmName, address authority, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) {\n /// @notice set authority of firm to given status\n require(\n lib.setRegisteredAuthority(firmName, authority, _authorized),\n \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"\n );\n return true;\n }\n\n /**\n * @notice Gets firm asoociated with an authority address\n * @param authority Address of authority account\n * @return {\"firm\" : \"name of firm\"}\n */\n function getFirmFromAuthority(address authority) public view returns (string firm) {\n return lib.getFirmFromAuthority(authority);\n }\n\n /**\n * @notice Gets status of firm registration\n * @param firmName Name of firm\n * @return {\"status\" : \"Returns status of firm registration\"}\n */\n function isRegisteredFirm(string firmName) public view returns (bool status) {\n /// @notice check firm's registration status\n return lib.isRegisteredFirm(firmName);\n }\n\n /**\n * @notice Checks if an authority account is registered to a given firm\n * @param firmName Name of firm\n * @param authority Address of authority account\n * @return {\"registered\" : \"Returns status of account registration to firm\"}\n */\n function isRegisteredToFirm(string firmName, address authority) public view returns (bool registered) {\n /// @notice check if registered to firm\n return lib.isRegisteredToFirm(firmName, authority);\n }\n\n /**\n * @notice Gets status of authority registration\n * @param authority Address of authority account\n * @return { \"registered\" : \"Returns true if account is a registered authority\" }\n */\n function isRegisteredAuthority(address authority) public view returns (bool registered) {\n /// @notice check if registered authority\n return lib.isRegisteredAuthority(authority);\n }\n\n /**\n * @notice Sets contract which specifies fee parameters\n * @param feeContract Address of the fee contract\n * @return { \"success\" : \"Returns true if lib.setMasterFeeContract succeeds\" }\n */\n function setMasterFeeContract(address feeContract) public onlyOwner returns (bool success) {\n /// @notice set master fee contract\n require(\n lib.setMasterFeeContract(feeContract),\n \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"\n );\n return true;\n }\n\n\n modifier onlyAuthority(string firmName, address authority) {\n /// @notice throws if not an owner authority or not registered to the given firm\n require(owner[authority] || lib.isRegisteredToFirm(firmName, authority),\n \"Error: Transaction sender does not have permission for this operation!\"\n );\n _;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOAuthority.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOAuthority.sol", + "exportedSymbols": { + "TokenIOAuthority": [ + 470 + ] + }, + "id": 471, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 287, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 288, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 185, + "src": "788:23:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 289, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 5242, + "src": "812:30:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 290, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 4623, + "src": "843:26:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "900:7:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "900:7:3" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 470, + "linearizedBaseContracts": [ + 470, + 184 + ], + "name": "TokenIOAuthority", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 295, + "libraryName": { + "contractScope": null, + "id": 293, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1004:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "998:37:3", + "typeName": { + "contractScope": null, + "id": 294, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1019:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 297, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 470, + "src": "1040:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 296, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1040:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 317, + "nodeType": "Block", + "src": "1259:470:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 302, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "1592:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1592:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 306, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 299, + "src": "1621:16:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 305, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1606:14:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1606:32:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1592:46:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1592:46:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 310, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1698:5:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 313, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 311, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1704:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1704:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1698:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1698:24:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 316, + "nodeType": "ExpressionStatement", + "src": "1698:24:3" + } + ] + }, + "documentation": "@notice Constructor method for Authority contract\n@param _storageContract Ethereum Address of TokenIOStorage contract", + "id": 318, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 318, + "src": "1226:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1226:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1225:26:3" + }, + "payable": false, + "returnParameters": { + "id": 301, + "nodeType": "ParameterList", + "parameters": [], + "src": "1259:0:3" + }, + "scope": 470, + "src": "1214:515:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 343, + "nodeType": "Block", + "src": "2097:256:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 335, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "2197:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 336, + "name": "_authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 322, + "src": "2207:11:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 333, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2175:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setRegisteredFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3780, + "src": "2175:21:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_bool_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,bool) returns (bool)" + } + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2175:44:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f207265676973746572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e74732e", + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2231:84:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7c061aadab049d8f25969f3d079d42a1e8f36ec72210e2d32fa2967857012c0f", + "typeString": "literal_string \"Error: Failed to register firm with storage contract! Please check your arguments.\"" + }, + "value": "Error: Failed to register firm with storage contract! Please check your arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7c061aadab049d8f25969f3d079d42a1e8f36ec72210e2d32fa2967857012c0f", + "typeString": "literal_string \"Error: Failed to register firm with storage contract! Please check your arguments.\"" + } + ], + "id": 332, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2156:169:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 340, + "nodeType": "ExpressionStatement", + "src": "2156:169:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2342:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 331, + "id": 342, + "nodeType": "Return", + "src": "2335:11:3" + } + ] + }, + "documentation": "@notice Registers a firm as authorized true/false\n@param firmName Name of firm\n@param _authorized Authorization status\n@return {\"success\" : \"Returns true if lib.setRegisteredFirm succeeds\"}", + "id": 344, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 325, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "2052:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 326, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "2062:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2062:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 324, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2038:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2038:35:3" + } + ], + "name": "setRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "1996:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 319, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 322, + "name": "_authorized", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "2013:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 321, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2013:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1995:35:3" + }, + "payable": false, + "returnParameters": { + "id": 331, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 330, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "2083:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 329, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2083:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2082:14:3" + }, + "scope": 470, + "src": "1969:384:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 372, + "nodeType": "Block", + "src": "2829:377:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "2943:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 364, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "2953:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 365, + "name": "_authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 350, + "src": "2964:11:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2916:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 362, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setRegisteredAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3845, + "src": "2916:26:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_bool_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,bool) returns (bool)" + } + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2916:60:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f20726567697374657220617574686f7269747920666f7220697373756572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e747320616e6420656e73757265206669726d4e616d652069732072656769737465726564206265666f726520616c6c6f77696e6720616e20617574686f72697479206f662073616964206669726d", + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2988:180:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2d4a4b60f49ee08372af5e34c3f2336392554fd91a2dbaa0c7da248171f215ec", + "typeString": "literal_string \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"" + }, + "value": "Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2d4a4b60f49ee08372af5e34c3f2336392554fd91a2dbaa0c7da248171f215ec", + "typeString": "literal_string \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"" + } + ], + "id": 360, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2897:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2897:281:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 369, + "nodeType": "ExpressionStatement", + "src": "2897:281:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 359, + "id": 371, + "nodeType": "Return", + "src": "3188:11:3" + } + ] + }, + "documentation": "@notice Registers an authority asoociated with the given firm as true/false\n@param firmName Name of firm\n@param authority Address of authority account\n@param _authorized Authorization status\n@return {\"success\" : \"Returns true if lib.setRegisteredAuthority succeeds\"}", + "id": 373, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 353, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "2784:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "2794:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2794:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 356, + "modifierName": { + "argumentTypes": null, + "id": 352, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2770:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2770:35:3" + } + ], + "name": "setRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 346, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2709:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 345, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2709:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 348, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2726:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 347, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2726:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 350, + "name": "_authorized", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2745:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2708:54:3" + }, + "payable": false, + "returnParameters": { + "id": 359, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 358, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2815:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 357, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2815:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2814:14:3" + }, + "scope": 470, + "src": "2677:529:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 385, + "nodeType": "Block", + "src": "3467:59:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 382, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 375, + "src": "3509:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 380, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "3484:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 381, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFirmFromAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3874, + "src": "3484:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3484:35:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 379, + "id": 384, + "nodeType": "Return", + "src": "3477:42:3" + } + ] + }, + "documentation": "@notice Gets firm asoociated with an authority address\n@param authority Address of authority account\n@return {\"firm\" : \"name of firm\"}", + "id": 386, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFirmFromAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 375, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3414:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 374, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3413:19:3" + }, + "payable": false, + "returnParameters": { + "id": 379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 378, + "name": "firm", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3454:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 377, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3454:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3453:13:3" + }, + "scope": 470, + "src": "3384:142:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 398, + "nodeType": "Block", + "src": "3775:107:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 395, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "3866:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 393, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "3845:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 394, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3900, + "src": "3845:20:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3845:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 392, + "id": 397, + "nodeType": "Return", + "src": "3838:37:3" + } + ] + }, + "documentation": "@notice Gets status of firm registration\n@param firmName Name of firm\n@return {\"status\" : \"Returns status of firm registration\"}", + "id": 399, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 388, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "3724:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 387, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3724:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3723:17:3" + }, + "payable": false, + "returnParameters": { + "id": 392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 391, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "3762:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 390, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3762:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3761:13:3" + }, + "scope": 470, + "src": "3698:184:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 414, + "nodeType": "Block", + "src": "4252:115:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 410, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "4340:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 411, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 403, + "src": "4350:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 408, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "4317:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3932, + "src": "4317:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4317:43:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 407, + "id": 413, + "nodeType": "Return", + "src": "4310:50:3" + } + ] + }, + "documentation": "@notice Checks if an authority account is registered to a given firm\n@param firmName Name of firm\n@param authority Address of authority account\n@return {\"registered\" : \"Returns status of account registration to firm\"}", + "id": 415, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredToFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 404, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 401, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4178:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 400, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4178:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 403, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4195:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 402, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4195:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4177:36:3" + }, + "payable": false, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 406, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4235:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 405, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4235:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4234:17:3" + }, + "scope": 470, + "src": "4150:217:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 427, + "nodeType": "Block", + "src": "4669:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 424, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 417, + "src": "4762:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 422, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "4736:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 423, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3968, + "src": "4736:25:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4736:36:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 421, + "id": 426, + "nodeType": "Return", + "src": "4729:43:3" + } + ] + }, + "documentation": "@notice Gets status of authority registration\n@param authority Address of authority account\n@return { \"registered\" : \"Returns true if account is a registered authority\" }", + "id": 428, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 417, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 428, + "src": "4612:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4612:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4611:19:3" + }, + "payable": false, + "returnParameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 420, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 428, + "src": "4652:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 419, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4652:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4651:17:3" + }, + "scope": 470, + "src": "4581:198:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 447, + "nodeType": "Block", + "src": "5089:260:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 440, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "5187:11:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 438, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "5162:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setMasterFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2673, + "src": "5162:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5162:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206d61737465722066656520636f6e74726163742e20506c6561736520656e737572652066656520636f6e7472616374206861732074686520636f727265637420706172616d65746572732e", + "id": 442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5211:98:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a96b771d97a968a04d199c5b6408cd38e4f78c25aa05fad6c1579ba20e33b4e4", + "typeString": "literal_string \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"" + }, + "value": "Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a96b771d97a968a04d199c5b6408cd38e4f78c25aa05fad6c1579ba20e33b4e4", + "typeString": "literal_string \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"" + } + ], + "id": 437, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5143:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5143:176:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 444, + "nodeType": "ExpressionStatement", + "src": "5143:176:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5336:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 436, + "id": 446, + "nodeType": "Return", + "src": "5329:11:3" + } + ] + }, + "documentation": "@notice Sets contract which specifies fee parameters\n@param feeContract Address of the fee contract\n@return { \"success\" : \"Returns true if lib.setMasterFeeContract succeeds\" }", + "id": 448, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 433, + "modifierName": { + "argumentTypes": null, + "id": 432, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5056:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5056:9:3" + } + ], + "name": "setMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 430, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 448, + "src": "5028:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5028:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5027:21:3" + }, + "payable": false, + "returnParameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 435, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 448, + "src": "5075:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 434, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5075:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5074:14:3" + }, + "scope": 470, + "src": "4998:351:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 468, + "nodeType": "Block", + "src": "5415:282:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 455, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "5522:5:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 457, + "indexExpression": { + "argumentTypes": null, + "id": 456, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "5528:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5522:16:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 460, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "5565:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 461, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "5575:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 458, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "5542:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 459, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3932, + "src": "5542:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5542:43:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5522:63:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e6f742068617665207065726d697373696f6e20666f722074686973206f7065726174696f6e21", + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5597:72:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d3def153e2e51aa28ae18a72fd9db16026b538556464ddd7af6de088c3965fad", + "typeString": "literal_string \"Error: Transaction sender does not have permission for this operation!\"" + }, + "value": "Error: Transaction sender does not have permission for this operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d3def153e2e51aa28ae18a72fd9db16026b538556464ddd7af6de088c3965fad", + "typeString": "literal_string \"Error: Transaction sender does not have permission for this operation!\"" + } + ], + "id": 454, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5514:165:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 466, + "nodeType": "ExpressionStatement", + "src": "5514:165:3" + }, + { + "id": 467, + "nodeType": "PlaceholderStatement", + "src": "5689:1:3" + } + ] + }, + "documentation": null, + "id": 469, + "name": "onlyAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 450, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 469, + "src": "5379:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 449, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5379:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 452, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 469, + "src": "5396:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5396:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5378:36:3" + }, + "src": "5356:341:3", + "visibility": "internal" + } + ], + "scope": 471, + "src": "871:4829:3" + } + ], + "src": "0:5701:3" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOAuthority.sol", + "exportedSymbols": { + "TokenIOAuthority": [ + 470 + ] + }, + "id": 471, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 287, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 288, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 185, + "src": "788:23:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 289, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 5242, + "src": "812:30:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 290, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 4623, + "src": "843:26:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "900:7:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "900:7:3" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 470, + "linearizedBaseContracts": [ + 470, + 184 + ], + "name": "TokenIOAuthority", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 295, + "libraryName": { + "contractScope": null, + "id": 293, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1004:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "998:37:3", + "typeName": { + "contractScope": null, + "id": 294, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1019:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 297, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 470, + "src": "1040:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 296, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1040:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 317, + "nodeType": "Block", + "src": "1259:470:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 302, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "1592:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1592:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 306, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 299, + "src": "1621:16:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 305, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1606:14:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1606:32:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1592:46:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1592:46:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 310, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1698:5:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 313, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 311, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1704:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1704:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1698:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1698:24:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 316, + "nodeType": "ExpressionStatement", + "src": "1698:24:3" + } + ] + }, + "documentation": "@notice Constructor method for Authority contract\n@param _storageContract Ethereum Address of TokenIOStorage contract", + "id": 318, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 318, + "src": "1226:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1226:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1225:26:3" + }, + "payable": false, + "returnParameters": { + "id": 301, + "nodeType": "ParameterList", + "parameters": [], + "src": "1259:0:3" + }, + "scope": 470, + "src": "1214:515:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 343, + "nodeType": "Block", + "src": "2097:256:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 335, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "2197:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 336, + "name": "_authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 322, + "src": "2207:11:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 333, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2175:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setRegisteredFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3780, + "src": "2175:21:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_bool_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,bool) returns (bool)" + } + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2175:44:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f207265676973746572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e74732e", + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2231:84:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7c061aadab049d8f25969f3d079d42a1e8f36ec72210e2d32fa2967857012c0f", + "typeString": "literal_string \"Error: Failed to register firm with storage contract! Please check your arguments.\"" + }, + "value": "Error: Failed to register firm with storage contract! Please check your arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7c061aadab049d8f25969f3d079d42a1e8f36ec72210e2d32fa2967857012c0f", + "typeString": "literal_string \"Error: Failed to register firm with storage contract! Please check your arguments.\"" + } + ], + "id": 332, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2156:169:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 340, + "nodeType": "ExpressionStatement", + "src": "2156:169:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2342:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 331, + "id": 342, + "nodeType": "Return", + "src": "2335:11:3" + } + ] + }, + "documentation": "@notice Registers a firm as authorized true/false\n@param firmName Name of firm\n@param _authorized Authorization status\n@return {\"success\" : \"Returns true if lib.setRegisteredFirm succeeds\"}", + "id": 344, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 325, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "2052:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 326, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "2062:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2062:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 324, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2038:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2038:35:3" + } + ], + "name": "setRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "1996:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 319, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 322, + "name": "_authorized", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "2013:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 321, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2013:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1995:35:3" + }, + "payable": false, + "returnParameters": { + "id": 331, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 330, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "2083:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 329, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2083:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2082:14:3" + }, + "scope": 470, + "src": "1969:384:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 372, + "nodeType": "Block", + "src": "2829:377:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "2943:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 364, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "2953:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 365, + "name": "_authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 350, + "src": "2964:11:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2916:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 362, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setRegisteredAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3845, + "src": "2916:26:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_bool_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,bool) returns (bool)" + } + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2916:60:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f20726567697374657220617574686f7269747920666f7220697373756572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e747320616e6420656e73757265206669726d4e616d652069732072656769737465726564206265666f726520616c6c6f77696e6720616e20617574686f72697479206f662073616964206669726d", + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2988:180:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2d4a4b60f49ee08372af5e34c3f2336392554fd91a2dbaa0c7da248171f215ec", + "typeString": "literal_string \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"" + }, + "value": "Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2d4a4b60f49ee08372af5e34c3f2336392554fd91a2dbaa0c7da248171f215ec", + "typeString": "literal_string \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"" + } + ], + "id": 360, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2897:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2897:281:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 369, + "nodeType": "ExpressionStatement", + "src": "2897:281:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 359, + "id": 371, + "nodeType": "Return", + "src": "3188:11:3" + } + ] + }, + "documentation": "@notice Registers an authority asoociated with the given firm as true/false\n@param firmName Name of firm\n@param authority Address of authority account\n@param _authorized Authorization status\n@return {\"success\" : \"Returns true if lib.setRegisteredAuthority succeeds\"}", + "id": 373, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 353, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "2784:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "2794:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2794:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 356, + "modifierName": { + "argumentTypes": null, + "id": 352, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2770:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2770:35:3" + } + ], + "name": "setRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 346, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2709:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 345, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2709:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 348, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2726:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 347, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2726:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 350, + "name": "_authorized", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2745:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2708:54:3" + }, + "payable": false, + "returnParameters": { + "id": 359, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 358, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2815:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 357, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2815:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2814:14:3" + }, + "scope": 470, + "src": "2677:529:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 385, + "nodeType": "Block", + "src": "3467:59:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 382, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 375, + "src": "3509:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 380, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "3484:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 381, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFirmFromAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3874, + "src": "3484:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3484:35:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 379, + "id": 384, + "nodeType": "Return", + "src": "3477:42:3" + } + ] + }, + "documentation": "@notice Gets firm asoociated with an authority address\n@param authority Address of authority account\n@return {\"firm\" : \"name of firm\"}", + "id": 386, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFirmFromAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 375, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3414:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 374, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3413:19:3" + }, + "payable": false, + "returnParameters": { + "id": 379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 378, + "name": "firm", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3454:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 377, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3454:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3453:13:3" + }, + "scope": 470, + "src": "3384:142:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 398, + "nodeType": "Block", + "src": "3775:107:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 395, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "3866:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 393, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "3845:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 394, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3900, + "src": "3845:20:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3845:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 392, + "id": 397, + "nodeType": "Return", + "src": "3838:37:3" + } + ] + }, + "documentation": "@notice Gets status of firm registration\n@param firmName Name of firm\n@return {\"status\" : \"Returns status of firm registration\"}", + "id": 399, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 388, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "3724:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 387, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3724:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3723:17:3" + }, + "payable": false, + "returnParameters": { + "id": 392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 391, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "3762:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 390, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3762:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3761:13:3" + }, + "scope": 470, + "src": "3698:184:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 414, + "nodeType": "Block", + "src": "4252:115:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 410, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "4340:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 411, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 403, + "src": "4350:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 408, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "4317:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3932, + "src": "4317:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4317:43:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 407, + "id": 413, + "nodeType": "Return", + "src": "4310:50:3" + } + ] + }, + "documentation": "@notice Checks if an authority account is registered to a given firm\n@param firmName Name of firm\n@param authority Address of authority account\n@return {\"registered\" : \"Returns status of account registration to firm\"}", + "id": 415, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredToFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 404, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 401, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4178:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 400, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4178:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 403, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4195:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 402, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4195:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4177:36:3" + }, + "payable": false, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 406, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4235:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 405, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4235:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4234:17:3" + }, + "scope": 470, + "src": "4150:217:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 427, + "nodeType": "Block", + "src": "4669:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 424, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 417, + "src": "4762:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 422, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "4736:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 423, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3968, + "src": "4736:25:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4736:36:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 421, + "id": 426, + "nodeType": "Return", + "src": "4729:43:3" + } + ] + }, + "documentation": "@notice Gets status of authority registration\n@param authority Address of authority account\n@return { \"registered\" : \"Returns true if account is a registered authority\" }", + "id": 428, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 417, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 428, + "src": "4612:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4612:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4611:19:3" + }, + "payable": false, + "returnParameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 420, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 428, + "src": "4652:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 419, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4652:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4651:17:3" + }, + "scope": 470, + "src": "4581:198:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 447, + "nodeType": "Block", + "src": "5089:260:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 440, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "5187:11:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 438, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "5162:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setMasterFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2673, + "src": "5162:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5162:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206d61737465722066656520636f6e74726163742e20506c6561736520656e737572652066656520636f6e7472616374206861732074686520636f727265637420706172616d65746572732e", + "id": 442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5211:98:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a96b771d97a968a04d199c5b6408cd38e4f78c25aa05fad6c1579ba20e33b4e4", + "typeString": "literal_string \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"" + }, + "value": "Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a96b771d97a968a04d199c5b6408cd38e4f78c25aa05fad6c1579ba20e33b4e4", + "typeString": "literal_string \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"" + } + ], + "id": 437, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5143:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5143:176:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 444, + "nodeType": "ExpressionStatement", + "src": "5143:176:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5336:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 436, + "id": 446, + "nodeType": "Return", + "src": "5329:11:3" + } + ] + }, + "documentation": "@notice Sets contract which specifies fee parameters\n@param feeContract Address of the fee contract\n@return { \"success\" : \"Returns true if lib.setMasterFeeContract succeeds\" }", + "id": 448, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 433, + "modifierName": { + "argumentTypes": null, + "id": 432, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5056:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5056:9:3" + } + ], + "name": "setMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 430, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 448, + "src": "5028:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5028:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5027:21:3" + }, + "payable": false, + "returnParameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 435, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 448, + "src": "5075:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 434, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5075:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5074:14:3" + }, + "scope": 470, + "src": "4998:351:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 468, + "nodeType": "Block", + "src": "5415:282:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 455, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "5522:5:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 457, + "indexExpression": { + "argumentTypes": null, + "id": 456, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "5528:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5522:16:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 460, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "5565:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 461, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "5575:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 458, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "5542:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 459, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3932, + "src": "5542:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5542:43:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5522:63:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e6f742068617665207065726d697373696f6e20666f722074686973206f7065726174696f6e21", + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5597:72:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d3def153e2e51aa28ae18a72fd9db16026b538556464ddd7af6de088c3965fad", + "typeString": "literal_string \"Error: Transaction sender does not have permission for this operation!\"" + }, + "value": "Error: Transaction sender does not have permission for this operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d3def153e2e51aa28ae18a72fd9db16026b538556464ddd7af6de088c3965fad", + "typeString": "literal_string \"Error: Transaction sender does not have permission for this operation!\"" + } + ], + "id": 454, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5514:165:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 466, + "nodeType": "ExpressionStatement", + "src": "5514:165:3" + }, + { + "id": 467, + "nodeType": "PlaceholderStatement", + "src": "5689:1:3" + } + ] + }, + "documentation": null, + "id": 469, + "name": "onlyAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 450, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 469, + "src": "5379:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 449, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5379:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 452, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 469, + "src": "5396:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5396:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5378:36:3" + }, + "src": "5356:341:3", + "visibility": "internal" + } + ], + "scope": 471, + "src": "871:4829:3" + } + ], + "src": "0:5701:3" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x4cd9ce52daef9234897d7cba73857347c6b4d11b", + "transactionHash": "0xc4efdffd30c140e223b202b373cdc2b932397898dbcbec9a2d39b05e9d8697a0" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.575Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIOCurrencyAuthority.json b/deployed/mainnet/TokenIOCurrencyAuthority.json new file mode 100644 index 0000000..5b4b9c5 --- /dev/null +++ b/deployed/mainnet/TokenIOCurrencyAuthority.json @@ -0,0 +1,13012 @@ +{ + "contractName": "TokenIOCurrencyAuthority", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "account", + "type": "address" + } + ], + "name": "getTokenBalance", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + } + ], + "name": "getTokenSupply", + "outputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "isAllowed", + "type": "bool" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "freezeAccount", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "isApproved", + "type": "bool" + }, + { + "name": "limit", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "approveKYC", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "limit", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "approveKYCAndDeposit", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "limit", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "setAccountSpendingLimit", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "getAccountSpendingRemaining", + "outputs": [ + { + "name": "spendingRemaining", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "getAccountSpendingLimit", + "outputs": [ + { + "name": "spendingLimit", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "bpsRate", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "setFxBpsRate", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "fxAmount", + "type": "uint256" + } + ], + "name": "getFxUSDAmount", + "outputs": [ + { + "name": "usdAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "originalAccount", + "type": "address" + }, + { + "name": "updatedAccount", + "type": "address" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "approveForwardedAccount", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "deposit", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "withdraw", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5060405160208061457b833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a03909416939093178355815416909117905561450590819061007690396000f3006080604052600436106100d75763ffffffff60e060020a60003504166328e53bb281146100dc57806329db8ec4146101a25780633cdb9762146101d5578063448900141461023957806346e06634146102d65780634bbc142c146103445780635d586bfd1461036557806361e7662b14610412578063666a342714610433578063666e1b391461045457806379662bd5146104755780638a8f1f2514610522578063a0776a591461058b578063e354a3f2146105e4578063e6562fe11461064f578063f2de12fc146106be578063f2fde38b14610719575b600080fd5b3480156100e857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020601f60608a01358b0180359182018390048302840183018552818452989b600160a060020a038b35169b838c01359b958601359a91995097506080909401955091935091820191819084018382808284375094975061073a9650505050505050565b604080519115158252519081900360200190f35b3480156101ae57600080fd5b506101c3600160a060020a0360043516610b8f565b60408051918252519081900360200190f35b3480156101e157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c394369492936024939284019190819084018382808284375094975050509235600160a060020a03169350610ba892505050565b34801561024557600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a909994019750919550918201935091508190840183828082843750949750610bc39650505050505050565b3480156102e257600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261018e94600160a060020a0381351694602480351515956044359536956084949301918190840183828082843750949750610cf19650505050505050565b34801561035057600080fd5b5061018e600160a060020a036004351661108f565b34801561037157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a9199909850606090910196509194509081019250819084018382808284375094975061116f9650505050505050565b34801561041e57600080fd5b506101c3600160a060020a03600435166112fa565b34801561043f57600080fd5b5061018e600160a060020a036004351661130d565b34801561046057600080fd5b5061018e600160a060020a03600435166113ea565b34801561048157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a919990985060609091019650919450908101925081908401838280828437509497506113ff9650505050505050565b34801561052e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506115289650505050505050565b34801561059757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c39436949293602493928401919081908401838280828437509497506116709650505050505050565b3480156105f057600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a031694602480351515953695946064949201919081908401838280828437509497506116839650505050505050565b34801561065b57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a03908116956024803590921695369594606494929301919081908401838280828437509497506117a69650505050505050565b3480156106ca57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c394369492936024939284019190819084018382808284375094975050933594506118ee9350505050565b34801561072557600080fd5b5061018e600160a060020a0360043516611902565b600081336107506001838363ffffffff611a6016565b15156107a8576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b6107bb600188818763ffffffff611c0c16565b151561085d576040805160e560020a62461bcd02815260206004820152605b60248201527f4572726f723a20556e61626c6520746f20617070726f7665206163636f756e7460448201527f2e20506c6561736520636865636b206973737565724669726d20616e6420666960648201527f726d20617574686f726974792061726520726567697374657265640000000000608482015290519081900360a40190fd5b610870600188818763ffffffff611ed916565b1515610912576040805160e560020a62461bcd02815260206004820152605e60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073746160448201527f7475732e20506c6561736520636865636b206973737565724669726d20616e6460648201527f206669726d20617574686f726974792061726520726567697374657265640000608482015290519081900360a40190fd5b61092660018989898863ffffffff61215e16565b15156109c8576040805160e560020a62461bcd02815260206004820152605960248201527f4572726f723a20556e61626c6520746f206465706f7369742066756e64732e2060448201527f506c6561736520636865636b206973737565724669726d20616e64206669726d60648201527f20617574686f7269747920617265207265676973746572656400000000000000608482015290519081900360a40190fd5b6109da6001888763ffffffff6129db16565b1515610aa2576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b610ab960018862015180420163ffffffff612bee16565b1515610b81576040805160e560020a62461bcd02815260206004820152606b60248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720706560448201527f72696f6420666f72206163636f756e742e20506c6561736520636865636b206960648201527f73737565724669726d20616e64206669726d20617574686f726974792061726560848201527f207265676973746572656400000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001979650505050505050565b6000610ba260018363ffffffff612c7f16565b92915050565b6000610bbc6001848463ffffffff612ca416565b9392505050565b60008133610bd96001838363ffffffff611a6016565b1515610c31576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b610c436001878763ffffffff612e0516565b1515610ce5576040805160e560020a62461bcd02815260206004820152605560248201527f4572726f723a20556e61626c6520746f2073657420465820555344206261736960448201527f7320706f696e747320726174652e20506c6561736520656e737572652069737360648201527f7565724669726d20697320617574686f72697a65640000000000000000000000608482015290519081900360a40190fd5b50600195945050505050565b60008133610d076001838363ffffffff611a6016565b1515610d5f576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b610d72600188888763ffffffff611c0c16565b1515610e14576040805160e560020a62461bcd02815260206004820152605b60248201527f4572726f723a20556e61626c6520746f20617070726f7665206163636f756e7460448201527f2e20506c6561736520636865636b206973737565724669726d20616e6420666960648201527f726d20617574686f726974792061726520726567697374657265640000000000608482015290519081900360a40190fd5b610e27600188888763ffffffff611ed916565b1515610ec9576040805160e560020a62461bcd02815260206004820152605e60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073746160448201527f7475732e20506c6561736520636865636b206973737565724669726d20616e6460648201527f206669726d20617574686f726974792061726520726567697374657265640000608482015290519081900360a40190fd5b610edb6001888763ffffffff6129db16565b1515610fa3576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b610fba60018862015180420163ffffffff612bee16565b1515611082576040805160e560020a62461bcd02815260206004820152606b60248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720706560448201527f72696f6420666f72206163636f756e742e20506c6561736520636865636b206960648201527f73737565724669726d20616e64206669726d20617574686f726974792061726560848201527f207265676973746572656400000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019695505050505050565b3360009081526020819052604081205460ff16151561111e576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600081336111856001838363ffffffff611a6016565b15156111dd576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b6111ee60018763ffffffff61300216565b1515611244576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a204163636f756e74206973206e6f742076657269666965642100604482015290519081900360640190fd5b61125860018888888863ffffffff61215e16565b1515611082576040805160e560020a62461bcd02815260206004820152605960248201527f4572726f723a20556e61626c6520746f206465706f7369742066756e64732e2060448201527f506c6561736520636865636b206973737565724669726d20616e64206669726d60648201527f20617574686f7269747920617265207265676973746572656400000000000000608482015290519081900360a40190fd5b6000610ba260018363ffffffff61311916565b3360009081526020819052604081205460ff16151561139c576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b600081336114156001838363ffffffff611a6016565b151561146d576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b61147e60018763ffffffff61300216565b15156114d4576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a204163636f756e74206973206e6f742076657269666965642100604482015290519081900360640190fd5b6114e860018888888863ffffffff61325816565b15156110825760405160e560020a62461bcd0281526004018080602001828103825260868152602001806144546086913960a00191505060405180910390fd5b6000813361153e6001838363ffffffff611a6016565b1515611596576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b6115a86001878763ffffffff6129db16565b1515610ce5576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b6000610ba260018363ffffffff613a2816565b600081336116996001838363ffffffff611a6016565b15156116f1576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b611704600187878763ffffffff611ed916565b1515610ce5576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a20556e61626c6520746f20667265657a65206163636f756e742e60448201527f20506c6561736520636865636b206973737565724669726d20616e642066697260648201527f6d20617574686f72697479206172652072656769737465726564000000000000608482015290519081900360a40190fd5b600081336117bc6001838363ffffffff611a6016565b1515611814576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b6118266001878763ffffffff613ae816565b1515610ce5576040805160e560020a62461bcd02815260206004820152606d60248201527f4572726f723a20556e61626c6520746f2073657420666f72776172646564206160448201527f64647265737320666f72206163636f756e742e20506c6561736520636865636b60648201527f206973737565724669726d20616e64206669726d20617574686f72697479206160848201527f726520726567697374657265640000000000000000000000000000000000000060a482015290519081900360c40190fd5b6000610bbc6001848463ffffffff613c1016565b3360009081526020819052604081205460ff161515611991576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a03821615156119f1576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b60008083611a6e8685613cb4565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310611ac85780518252601f199092019160209182019101611aa9565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310611b4a5780518252601f199092019160209182019101611b2b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015611bd757600080fd5b505af1158015611beb573d6000803e3d6000fd5b505050506040513d6020811015611c0157600080fd5b505195945050505050565b600080611c198686613cb4565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ca75780518252601f199092019160209182019101611c88565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015611d3c57600080fd5b505af1158015611d50573d6000803e3d6000fd5b505050506040513d6020811015611d6657600080fd5b50511515611e1e576040805160e560020a62461bcd02815260206004820152606860248201526000805160206143f483398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b84600160a060020a03167fab56f1457128531bea5d39a6dbdbcdc655f2b2959bd7ee369f6461581aa6444d8585604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611e92578181015183820152602001611e7a565b50505050905090810190601f168015611ebf5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a250600195945050505050565b600080611ee68686613cb4565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611f745780518252601f199092019160209182019101611f55565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b15801561200957600080fd5b505af115801561201d573d6000803e3d6000fd5b505050506040513d602081101561203357600080fd5b505115156120eb576040805160e560020a62461bcd02815260206004820152606860248201526000805160206143f483398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b84600160a060020a03167f1d71109398f40d30b03a3640657b60db5013a5e75026c3db99007b43bede166585856040518083151515158152602001806020018281038252838181518152602001915080519060200190808383600083811015611e92578181015183820152602001611e7a565b6000806000808761216f8a89613cb4565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106121c95780518252601f1990920191602091820191016121aa565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b6020831061224b5780518252601f19909201916020918201910161222c565b51815160001960209485036101000a019081169019919091161790526040519390910183900383207f746f6b656e2e69737375656400000000000000000000000000000000000000008483019081528e519199508e96508b955093602c019250908501908083835b602083106122d25780518252601f1990920191602091820191016122b3565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061231a5780518252601f1990920191602091820191016122fb565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b6020831061237e5780518252601f19909201916020918201910161235f565b51815160209384036101000a60001901801990921691161790526040519190930181900381207f746f6b656e2e737570706c7900000000000000000000000000000000000000008285019081528e519198508e96509450602c90910192850191508083835b602083106124025780518252601f1990920191602091820191016123e3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106124655780518252601f199092019160209182019101612446565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018b90529451909750600160a060020a03909416955063e2a4853a9450889361252093508c92879263bd02d0f5926024808401938290030181600087803b1580156124e857600080fd5b505af11580156124fc573d6000803e3d6000fd5b505050506040513d602081101561251257600080fd5b50519063ffffffff613e2616565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561256857600080fd5b505af115801561257c573d6000803e3d6000fd5b505050506040513d602081101561259257600080fd5b50511515612614576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018590529051600160a060020a039092169163e2a4853a918591612673918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156124e857600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b505050506040513d60208110156126e557600080fd5b50511515612767576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a9184916127c6918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156124e857600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561280e57600080fd5b505af1158015612822573d6000803e3d6000fd5b505050506040513d602081101561283857600080fd5b505115156128ba576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b86600160a060020a03167fb20a35859ac659f96b757a0975ff35141c00728783cc1b222c2fc323ed8a34ea898888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561292f578181015183820152602001612917565b50505050905090810190601f16801561295c5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561298f578181015183820152602001612977565b50505050905090810190601f1680156129bc5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a250600198975050505050505050565b6000808360405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310612a6d5780518252601f199092019160209182019101612a4e565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612b0157600080fd5b505af1158015612b15573d6000803e3d6000fd5b505050506040513d6020811015612b2b57600080fd5b50511515612be3576040805160e560020a62461bcd02815260206004820152606860248201526000805160206143f483398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310612a6d5780518252601f199092019160209182019101612a4e565b6000610bbc612c8e8484613ea9565b612c988585613119565b9063ffffffff613f4b16565b60008083612cb28685613cb4565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310612d0c5780518252601f199092019160209182019101612ced565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310612d8e5780518252601f199092019160209182019101612d6f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015611bd757600080fd5b6000808360405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b0182805190602001908083835b60208310612e635780518252601f199092019160209182019101612e44565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310612ec65780518252601f199092019160209182019101612ea7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612f5a57600080fd5b505af1158015612f6e573d6000803e3d6000fd5b505050506040513d6020811015612f8457600080fd5b50511515612be3576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b600061300e8383613fd0565b151561308a576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a204163636f756e7420646f6573206e6f742068617665204b594360448201527f20617070726f76616c2e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b61309483836140f8565b1515613110576040805160e560020a62461bcd02815260206004820152602481018290527f4572726f723a204163636f756e7420737461747573206973206066616c73656060448201527f2e204163636f756e7420737461747573206d757374206265206074727565602e606482015290519081900360840190fd5b50600192915050565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106131ab5780518252601f19909201916020918201910161318c565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561322257600080fd5b505af1158015613236573d6000803e3d6000fd5b505050506040513d602081101561324c57600080fd5b505191505b5092915050565b600080600080876132698a89613cb4565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106132c35780518252601f1990920191602091820191016132a4565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106133455780518252601f199092019160209182019101613326565b51815160001960209485036101000a019081169019919091161790526040519390910183900383207f746f6b656e2e69737375656400000000000000000000000000000000000000008483019081528e519199508e96508b955093602c019250908501908083835b602083106133cc5780518252601f1990920191602091820191016133ad565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106134145780518252601f1990920191602091820191016133f5565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106134785780518252601f199092019160209182019101613459565b51815160209384036101000a60001901801990921691161790526040519190930181900381207f746f6b656e2e737570706c7900000000000000000000000000000000000000008285019081528e519198508e96509450602c90910192850191508083835b602083106134fc5780518252601f1990920191602091820191016134dd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061355f5780518252601f199092019160209182019101613540565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018b90529451909750600160a060020a03909416955063e2a4853a9450889361361a93508c92879263bd02d0f5926024808401938290030181600087803b1580156135e257600080fd5b505af11580156135f6573d6000803e3d6000fd5b505050506040513d602081101561360c57600080fd5b50519063ffffffff613f4b16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561366257600080fd5b505af1158015613676573d6000803e3d6000fd5b505050506040513d602081101561368c57600080fd5b5051151561370e576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018590529051600160a060020a039092169163e2a4853a91859161376d918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156135e257600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156137b557600080fd5b505af11580156137c9573d6000803e3d6000fd5b505050506040513d60208110156137df57600080fd5b50511515613861576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a9184916138c0918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156135e257600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561390857600080fd5b505af115801561391c573d6000803e3d6000fd5b505050506040513d602081101561393257600080fd5b505115156139b4576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b86600160a060020a03167fbe0071d3ab0eb6dc7f33a38ba50120d775cd62fa123f3b59c193caf48e44bb4c898888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360008381101561292f578181015183820152602001612917565b6000808260405160200180807f746f6b656e2e737570706c790000000000000000000000000000000000000000815250600c0182805190602001908083835b60208310613a865780518252601f199092019160209182019101613a67565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052604051808280519060200190808383602083106131ab5780518252601f19909201916020918201910161318c565b6000808260405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613b7a5780518252601f199092019160209182019101613b5b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038c81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b158015612b0157600080fd5b600080600080613c55876040805190810160405280600481526020017f5553447800000000000000000000000000000000000000000000000000000000815250614192565b9250613c618787614192565b9150613ca982600a0a613c9185600a0a613c9d612710613c91613c848e8e6141ef565b8c9063ffffffff61424c16565b9063ffffffff6142eb16565b9063ffffffff61424c16565b979650505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613d485780518252601f199092019160209182019101613d29565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015613dd557600080fd5b505af1158015613de9573d6000803e3d6000fd5b505050506040513d6020811015613dff57600080fd5b50519050600160a060020a03811615613e1a57809250613e1e565b8392505b505092915050565b600082820183811015610bbc576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008082613eb78585614302565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a02815260140182815260200192505050604051602081830303815290604052604051808280519060200190808383602083106131ab5780518252601f19909201916020918201910161318c565b600082821115613fca576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b600080613fdd8484613cb4565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061406b5780518252601f19909201916020918201910161404c565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b15801561322257600080fd5b6000806141058484613cb4565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083836020831061406b5780518252601f19909201916020918201910161404c565b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e01828051906020019080838360208310613a865780518252601f199092019160209182019101613a67565b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b01828051906020019080838360208310613a865780518252601f199092019160209182019101613a67565b60008083151561425f5760009150613251565b5082820282848281151561426f57fe5b0414610bbc576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008082848115156142f957fe5b04949350505050565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106131ab5780518252601f19909201916020918201910161318c56004572726f723a206973737565724669726d20616e642f6f72206669726d2061756c6c6f776564207065726d697373696f6e7320776974682073746f726167652075652e20506c6561736520656e7375726520636f6e74726163742068617320614572726f723a20556e61626c6520746f207365742073746f726167652076616c636f6e74726163742e000000000000000000000000000000000000000000000074686f7269747920617265206e6f7420726567697374657265640000000000004572726f723a20556e61626c6520746f2077697468647261772066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f7269747920617265207265676973746572656420616e642068617665206973737565642066756e647320746861742063616e2062652077697468647261776ea165627a7a72305820a0eb788fffd99d155740f884f5f313458d7a83f1900c5ff2906357db56c5fd780029", + "deployedBytecode": "0x6080604052600436106100d75763ffffffff60e060020a60003504166328e53bb281146100dc57806329db8ec4146101a25780633cdb9762146101d5578063448900141461023957806346e06634146102d65780634bbc142c146103445780635d586bfd1461036557806361e7662b14610412578063666a342714610433578063666e1b391461045457806379662bd5146104755780638a8f1f2514610522578063a0776a591461058b578063e354a3f2146105e4578063e6562fe11461064f578063f2de12fc146106be578063f2fde38b14610719575b600080fd5b3480156100e857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020601f60608a01358b0180359182018390048302840183018552818452989b600160a060020a038b35169b838c01359b958601359a91995097506080909401955091935091820191819084018382808284375094975061073a9650505050505050565b604080519115158252519081900360200190f35b3480156101ae57600080fd5b506101c3600160a060020a0360043516610b8f565b60408051918252519081900360200190f35b3480156101e157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c394369492936024939284019190819084018382808284375094975050509235600160a060020a03169350610ba892505050565b34801561024557600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a909994019750919550918201935091508190840183828082843750949750610bc39650505050505050565b3480156102e257600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261018e94600160a060020a0381351694602480351515956044359536956084949301918190840183828082843750949750610cf19650505050505050565b34801561035057600080fd5b5061018e600160a060020a036004351661108f565b34801561037157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a9199909850606090910196509194509081019250819084018382808284375094975061116f9650505050505050565b34801561041e57600080fd5b506101c3600160a060020a03600435166112fa565b34801561043f57600080fd5b5061018e600160a060020a036004351661130d565b34801561046057600080fd5b5061018e600160a060020a03600435166113ea565b34801561048157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a919990985060609091019650919450908101925081908401838280828437509497506113ff9650505050505050565b34801561052e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506115289650505050505050565b34801561059757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c39436949293602493928401919081908401838280828437509497506116709650505050505050565b3480156105f057600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a031694602480351515953695946064949201919081908401838280828437509497506116839650505050505050565b34801561065b57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a03908116956024803590921695369594606494929301919081908401838280828437509497506117a69650505050505050565b3480156106ca57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c394369492936024939284019190819084018382808284375094975050933594506118ee9350505050565b34801561072557600080fd5b5061018e600160a060020a0360043516611902565b600081336107506001838363ffffffff611a6016565b15156107a8576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b6107bb600188818763ffffffff611c0c16565b151561085d576040805160e560020a62461bcd02815260206004820152605b60248201527f4572726f723a20556e61626c6520746f20617070726f7665206163636f756e7460448201527f2e20506c6561736520636865636b206973737565724669726d20616e6420666960648201527f726d20617574686f726974792061726520726567697374657265640000000000608482015290519081900360a40190fd5b610870600188818763ffffffff611ed916565b1515610912576040805160e560020a62461bcd02815260206004820152605e60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073746160448201527f7475732e20506c6561736520636865636b206973737565724669726d20616e6460648201527f206669726d20617574686f726974792061726520726567697374657265640000608482015290519081900360a40190fd5b61092660018989898863ffffffff61215e16565b15156109c8576040805160e560020a62461bcd02815260206004820152605960248201527f4572726f723a20556e61626c6520746f206465706f7369742066756e64732e2060448201527f506c6561736520636865636b206973737565724669726d20616e64206669726d60648201527f20617574686f7269747920617265207265676973746572656400000000000000608482015290519081900360a40190fd5b6109da6001888763ffffffff6129db16565b1515610aa2576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b610ab960018862015180420163ffffffff612bee16565b1515610b81576040805160e560020a62461bcd02815260206004820152606b60248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720706560448201527f72696f6420666f72206163636f756e742e20506c6561736520636865636b206960648201527f73737565724669726d20616e64206669726d20617574686f726974792061726560848201527f207265676973746572656400000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001979650505050505050565b6000610ba260018363ffffffff612c7f16565b92915050565b6000610bbc6001848463ffffffff612ca416565b9392505050565b60008133610bd96001838363ffffffff611a6016565b1515610c31576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b610c436001878763ffffffff612e0516565b1515610ce5576040805160e560020a62461bcd02815260206004820152605560248201527f4572726f723a20556e61626c6520746f2073657420465820555344206261736960448201527f7320706f696e747320726174652e20506c6561736520656e737572652069737360648201527f7565724669726d20697320617574686f72697a65640000000000000000000000608482015290519081900360a40190fd5b50600195945050505050565b60008133610d076001838363ffffffff611a6016565b1515610d5f576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b610d72600188888763ffffffff611c0c16565b1515610e14576040805160e560020a62461bcd02815260206004820152605b60248201527f4572726f723a20556e61626c6520746f20617070726f7665206163636f756e7460448201527f2e20506c6561736520636865636b206973737565724669726d20616e6420666960648201527f726d20617574686f726974792061726520726567697374657265640000000000608482015290519081900360a40190fd5b610e27600188888763ffffffff611ed916565b1515610ec9576040805160e560020a62461bcd02815260206004820152605e60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073746160448201527f7475732e20506c6561736520636865636b206973737565724669726d20616e6460648201527f206669726d20617574686f726974792061726520726567697374657265640000608482015290519081900360a40190fd5b610edb6001888763ffffffff6129db16565b1515610fa3576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b610fba60018862015180420163ffffffff612bee16565b1515611082576040805160e560020a62461bcd02815260206004820152606b60248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720706560448201527f72696f6420666f72206163636f756e742e20506c6561736520636865636b206960648201527f73737565724669726d20616e64206669726d20617574686f726974792061726560848201527f207265676973746572656400000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019695505050505050565b3360009081526020819052604081205460ff16151561111e576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600081336111856001838363ffffffff611a6016565b15156111dd576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b6111ee60018763ffffffff61300216565b1515611244576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a204163636f756e74206973206e6f742076657269666965642100604482015290519081900360640190fd5b61125860018888888863ffffffff61215e16565b1515611082576040805160e560020a62461bcd02815260206004820152605960248201527f4572726f723a20556e61626c6520746f206465706f7369742066756e64732e2060448201527f506c6561736520636865636b206973737565724669726d20616e64206669726d60648201527f20617574686f7269747920617265207265676973746572656400000000000000608482015290519081900360a40190fd5b6000610ba260018363ffffffff61311916565b3360009081526020819052604081205460ff16151561139c576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b600081336114156001838363ffffffff611a6016565b151561146d576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b61147e60018763ffffffff61300216565b15156114d4576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a204163636f756e74206973206e6f742076657269666965642100604482015290519081900360640190fd5b6114e860018888888863ffffffff61325816565b15156110825760405160e560020a62461bcd0281526004018080602001828103825260868152602001806144546086913960a00191505060405180910390fd5b6000813361153e6001838363ffffffff611a6016565b1515611596576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b6115a86001878763ffffffff6129db16565b1515610ce5576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b6000610ba260018363ffffffff613a2816565b600081336116996001838363ffffffff611a6016565b15156116f1576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b611704600187878763ffffffff611ed916565b1515610ce5576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a20556e61626c6520746f20667265657a65206163636f756e742e60448201527f20506c6561736520636865636b206973737565724669726d20616e642066697260648201527f6d20617574686f72697479206172652072656769737465726564000000000000608482015290519081900360a40190fd5b600081336117bc6001838363ffffffff611a6016565b1515611814576040805160e560020a62461bcd02815260206004820152603a60248201526000805160206143948339815191526044820152600080516020614434833981519152606482015290519081900360840190fd5b6118266001878763ffffffff613ae816565b1515610ce5576040805160e560020a62461bcd02815260206004820152606d60248201527f4572726f723a20556e61626c6520746f2073657420666f72776172646564206160448201527f64647265737320666f72206163636f756e742e20506c6561736520636865636b60648201527f206973737565724669726d20616e64206669726d20617574686f72697479206160848201527f726520726567697374657265640000000000000000000000000000000000000060a482015290519081900360c40190fd5b6000610bbc6001848463ffffffff613c1016565b3360009081526020819052604081205460ff161515611991576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a03821615156119f1576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b60008083611a6e8685613cb4565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310611ac85780518252601f199092019160209182019101611aa9565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310611b4a5780518252601f199092019160209182019101611b2b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015611bd757600080fd5b505af1158015611beb573d6000803e3d6000fd5b505050506040513d6020811015611c0157600080fd5b505195945050505050565b600080611c198686613cb4565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ca75780518252601f199092019160209182019101611c88565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015611d3c57600080fd5b505af1158015611d50573d6000803e3d6000fd5b505050506040513d6020811015611d6657600080fd5b50511515611e1e576040805160e560020a62461bcd02815260206004820152606860248201526000805160206143f483398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b84600160a060020a03167fab56f1457128531bea5d39a6dbdbcdc655f2b2959bd7ee369f6461581aa6444d8585604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611e92578181015183820152602001611e7a565b50505050905090810190601f168015611ebf5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a250600195945050505050565b600080611ee68686613cb4565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611f745780518252601f199092019160209182019101611f55565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b15801561200957600080fd5b505af115801561201d573d6000803e3d6000fd5b505050506040513d602081101561203357600080fd5b505115156120eb576040805160e560020a62461bcd02815260206004820152606860248201526000805160206143f483398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b84600160a060020a03167f1d71109398f40d30b03a3640657b60db5013a5e75026c3db99007b43bede166585856040518083151515158152602001806020018281038252838181518152602001915080519060200190808383600083811015611e92578181015183820152602001611e7a565b6000806000808761216f8a89613cb4565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106121c95780518252601f1990920191602091820191016121aa565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b6020831061224b5780518252601f19909201916020918201910161222c565b51815160001960209485036101000a019081169019919091161790526040519390910183900383207f746f6b656e2e69737375656400000000000000000000000000000000000000008483019081528e519199508e96508b955093602c019250908501908083835b602083106122d25780518252601f1990920191602091820191016122b3565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061231a5780518252601f1990920191602091820191016122fb565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b6020831061237e5780518252601f19909201916020918201910161235f565b51815160209384036101000a60001901801990921691161790526040519190930181900381207f746f6b656e2e737570706c7900000000000000000000000000000000000000008285019081528e519198508e96509450602c90910192850191508083835b602083106124025780518252601f1990920191602091820191016123e3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106124655780518252601f199092019160209182019101612446565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018b90529451909750600160a060020a03909416955063e2a4853a9450889361252093508c92879263bd02d0f5926024808401938290030181600087803b1580156124e857600080fd5b505af11580156124fc573d6000803e3d6000fd5b505050506040513d602081101561251257600080fd5b50519063ffffffff613e2616565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561256857600080fd5b505af115801561257c573d6000803e3d6000fd5b505050506040513d602081101561259257600080fd5b50511515612614576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018590529051600160a060020a039092169163e2a4853a918591612673918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156124e857600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b505050506040513d60208110156126e557600080fd5b50511515612767576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a9184916127c6918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156124e857600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561280e57600080fd5b505af1158015612822573d6000803e3d6000fd5b505050506040513d602081101561283857600080fd5b505115156128ba576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b86600160a060020a03167fb20a35859ac659f96b757a0975ff35141c00728783cc1b222c2fc323ed8a34ea898888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561292f578181015183820152602001612917565b50505050905090810190601f16801561295c5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561298f578181015183820152602001612977565b50505050905090810190601f1680156129bc5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a250600198975050505050505050565b6000808360405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310612a6d5780518252601f199092019160209182019101612a4e565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612b0157600080fd5b505af1158015612b15573d6000803e3d6000fd5b505050506040513d6020811015612b2b57600080fd5b50511515612be3576040805160e560020a62461bcd02815260206004820152606860248201526000805160206143f483398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310612a6d5780518252601f199092019160209182019101612a4e565b6000610bbc612c8e8484613ea9565b612c988585613119565b9063ffffffff613f4b16565b60008083612cb28685613cb4565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310612d0c5780518252601f199092019160209182019101612ced565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310612d8e5780518252601f199092019160209182019101612d6f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015611bd757600080fd5b6000808360405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b0182805190602001908083835b60208310612e635780518252601f199092019160209182019101612e44565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310612ec65780518252601f199092019160209182019101612ea7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612f5a57600080fd5b505af1158015612f6e573d6000803e3d6000fd5b505050506040513d6020811015612f8457600080fd5b50511515612be3576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b600061300e8383613fd0565b151561308a576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a204163636f756e7420646f6573206e6f742068617665204b594360448201527f20617070726f76616c2e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b61309483836140f8565b1515613110576040805160e560020a62461bcd02815260206004820152602481018290527f4572726f723a204163636f756e7420737461747573206973206066616c73656060448201527f2e204163636f756e7420737461747573206d757374206265206074727565602e606482015290519081900360840190fd5b50600192915050565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106131ab5780518252601f19909201916020918201910161318c565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561322257600080fd5b505af1158015613236573d6000803e3d6000fd5b505050506040513d602081101561324c57600080fd5b505191505b5092915050565b600080600080876132698a89613cb4565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106132c35780518252601f1990920191602091820191016132a4565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106133455780518252601f199092019160209182019101613326565b51815160001960209485036101000a019081169019919091161790526040519390910183900383207f746f6b656e2e69737375656400000000000000000000000000000000000000008483019081528e519199508e96508b955093602c019250908501908083835b602083106133cc5780518252601f1990920191602091820191016133ad565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106134145780518252601f1990920191602091820191016133f5565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106134785780518252601f199092019160209182019101613459565b51815160209384036101000a60001901801990921691161790526040519190930181900381207f746f6b656e2e737570706c7900000000000000000000000000000000000000008285019081528e519198508e96509450602c90910192850191508083835b602083106134fc5780518252601f1990920191602091820191016134dd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061355f5780518252601f199092019160209182019101613540565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018b90529451909750600160a060020a03909416955063e2a4853a9450889361361a93508c92879263bd02d0f5926024808401938290030181600087803b1580156135e257600080fd5b505af11580156135f6573d6000803e3d6000fd5b505050506040513d602081101561360c57600080fd5b50519063ffffffff613f4b16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561366257600080fd5b505af1158015613676573d6000803e3d6000fd5b505050506040513d602081101561368c57600080fd5b5051151561370e576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018590529051600160a060020a039092169163e2a4853a91859161376d918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156135e257600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156137b557600080fd5b505af11580156137c9573d6000803e3d6000fd5b505050506040513d60208110156137df57600080fd5b50511515613861576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a9184916138c0918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156135e257600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561390857600080fd5b505af115801561391c573d6000803e3d6000fd5b505050506040513d602081101561393257600080fd5b505115156139b4576040805160e560020a62461bcd02815260206004820152606960248201526000805160206143f483398151915260448201526000805160206143d483398151915260648201526000805160206143b4833981519152608482015260008051602061441483398151915260a482015290519081900360c40190fd5b86600160a060020a03167fbe0071d3ab0eb6dc7f33a38ba50120d775cd62fa123f3b59c193caf48e44bb4c898888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360008381101561292f578181015183820152602001612917565b6000808260405160200180807f746f6b656e2e737570706c790000000000000000000000000000000000000000815250600c0182805190602001908083835b60208310613a865780518252601f199092019160209182019101613a67565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052604051808280519060200190808383602083106131ab5780518252601f19909201916020918201910161318c565b6000808260405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613b7a5780518252601f199092019160209182019101613b5b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038c81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b158015612b0157600080fd5b600080600080613c55876040805190810160405280600481526020017f5553447800000000000000000000000000000000000000000000000000000000815250614192565b9250613c618787614192565b9150613ca982600a0a613c9185600a0a613c9d612710613c91613c848e8e6141ef565b8c9063ffffffff61424c16565b9063ffffffff6142eb16565b9063ffffffff61424c16565b979650505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613d485780518252601f199092019160209182019101613d29565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015613dd557600080fd5b505af1158015613de9573d6000803e3d6000fd5b505050506040513d6020811015613dff57600080fd5b50519050600160a060020a03811615613e1a57809250613e1e565b8392505b505092915050565b600082820183811015610bbc576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008082613eb78585614302565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a02815260140182815260200192505050604051602081830303815290604052604051808280519060200190808383602083106131ab5780518252601f19909201916020918201910161318c565b600082821115613fca576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b600080613fdd8484613cb4565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061406b5780518252601f19909201916020918201910161404c565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b15801561322257600080fd5b6000806141058484613cb4565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083836020831061406b5780518252601f19909201916020918201910161404c565b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e01828051906020019080838360208310613a865780518252601f199092019160209182019101613a67565b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b01828051906020019080838360208310613a865780518252601f199092019160209182019101613a67565b60008083151561425f5760009150613251565b5082820282848281151561426f57fe5b0414610bbc576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008082848115156142f957fe5b04949350505050565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106131ab5780518252601f19909201916020918201910161318c56004572726f723a206973737565724669726d20616e642f6f72206669726d2061756c6c6f776564207065726d697373696f6e7320776974682073746f726167652075652e20506c6561736520656e7375726520636f6e74726163742068617320614572726f723a20556e61626c6520746f207365742073746f726167652076616c636f6e74726163742e000000000000000000000000000000000000000000000074686f7269747920617265206e6f7420726567697374657265640000000000004572726f723a20556e61626c6520746f2077697468647261772066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f7269747920617265207265676973746572656420616e642068617665206973737565642066756e647320746861742063616e2062652077697468647261776ea165627a7a72305820a0eb788fffd99d155740f884f5f313458d7a83f1900c5ff2906357db56c5fd780029", + "sourceMap": "889:11777:4:-;;;1242:430;8:9:-1;5:2;;;30:1;27;20:12;5:2;1242:430:4;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1242:430:4;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1536:46:4;;-1:-1:-1;;;;;;1536:46:4;-1:-1:-1;;;;;1536:46:4;;;;;;;;;1641:24;;;;;;;;889:11777;;;;;;;;", + "deployedSourceMap": "889:11777:4:-;;;;;;;;;-1:-1:-1;;;889:11777:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5142:1383;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5142:1383:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5142:1383:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5142:1383:4;;;;;;;;;;;;;;;;-1:-1:-1;5142:1383:4;-1:-1:-1;5142:1383:4;;;;;-1:-1:-1;5142:1383:4;;-1:-1:-1;5142:1383:4;;;;;;;;;;;;;;-1:-1:-1;5142:1383:4;;-1:-1:-1;5142:1383:4;;-1:-1:-1;;;;;;;5142:1383:4;;;;;;;;;;;;;;;;;;;7521:161;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7521:161:4;-1:-1:-1;;;;;7521:161:4;;;;;;;;;;;;;;;;;;;;;1913:154;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1913:154:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1913:154:4;;-1:-1:-1;;;1913:154:4;;-1:-1:-1;;;;;1913:154:4;;-1:-1:-1;1913:154:4;;-1:-1:-1;;;1913:154:4;8569:334;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8569:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8569:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8569:334:4;;-1:-1:-1;8569:334:4;;;;-1:-1:-1;8569:334:4;-1:-1:-1;8569:334:4;;;;;;;;;;-1:-1:-1;8569:334:4;;-1:-1:-1;8569:334:4;;-1:-1:-1;;;;;;;8569:334:4;3516:1172;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3516:1172:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3516:1172:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3516:1172:4;;-1:-1:-1;3516:1172:4;;-1:-1:-1;;;;;;;3516:1172:4;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;10557:571:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10557:571:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;10557:571:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10557:571:4;;;;;;;;;;;-1:-1:-1;10557:571:4;;;;;-1:-1:-1;10557:571:4;;-1:-1:-1;10557:571:4;;;;-1:-1:-1;10557:571:4;;;;;;;;;;-1:-1:-1;10557:571:4;;-1:-1:-1;10557:571:4;;-1:-1:-1;;;;;;;10557:571:4;7913:149;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7913:149:4;-1:-1:-1;;;;;7913:149:4;;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;11528:614:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;11528:614:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11528:614:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11528:614:4;;;;;;;;;;;-1:-1:-1;11528:614:4;;;;;-1:-1:-1;11528:614:4;;-1:-1:-1;11528:614:4;;;;-1:-1:-1;11528:614:4;;;;;;;;;;-1:-1:-1;11528:614:4;;-1:-1:-1;11528:614:4;;-1:-1:-1;;;;;;;11528:614:4;6891:377;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6891:377:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6891:377:4;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6891:377:4;;-1:-1:-1;6891:377:4;;-1:-1:-1;;;;;;;6891:377:4;2253:125;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2253:125:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2253:125:4;;-1:-1:-1;2253:125:4;;-1:-1:-1;;;;;;;2253:125:4;2728:450;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2728:450:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2728:450:4;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2728:450:4;;-1:-1:-1;2728:450:4;;-1:-1:-1;;;;;;;2728:450:4;9685:503;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9685:503:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9685:503:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9685:503:4;;-1:-1:-1;9685:503:4;;-1:-1:-1;;;;;;;9685:503:4;9211:153;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9211:153:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9211:153:4;;-1:-1:-1;;9211:153:4;;;-1:-1:-1;9211:153:4;;-1:-1:-1;;;;9211:153:4;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;5142:1383:4;5304:12;5271:10;5283;12520:43;:3;5271:10;5283;12520:43;:22;:43;:::i;:::-;12501:144;;;;;;;-1:-1:-1;;;;;12501:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;;;;;;;;;;;;5438:45;5466:4;5457:7;5466:4;5472:10;5438:45;:18;:45;:::i;:::-;5419:179;;;;;;;-1:-1:-1;;;;;5419:179:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5718:47;5748:4;5739:7;5748:4;5754:10;5718:47;:20;:47;:::i;:::-;5699:184;;;;;;;-1:-1:-1;;;;;5699:184:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5912:50;:3;5924:8;5934:7;5943:6;5951:10;5912:50;:11;:50;:::i;:::-;5893:182;;;;;;;-1:-1:-1;;;;;5893:182:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6104:43;:3;6132:7;6141:5;6104:43;:27;:43;:::i;:::-;6085:200;;;;;;;-1:-1:-1;;;;;6085:200:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6314:52;:3;6343:7;6359:5;6353:3;:11;6314:52;:28;:52;:::i;:::-;6295:202;;;;;;;-1:-1:-1;;;;;6295:202:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6514:4:4;;5142:1383;-1:-1:-1;;;;;;;5142:1383:4:o;7521:161::-;7596:22;7635:40;:3;7667:7;7635:40;:31;:40;:::i;:::-;7628:47;7521:161;-1:-1:-1;;7521:161:4:o;1913:154::-;1993:12;2022:38;:3;2042:8;2052:7;2022:38;:19;:38;:::i;:::-;2015:45;1913:154;-1:-1:-1;;;1913:154:4:o;8569:334::-;8695:12;8662:10;8674;12520:43;:3;8662:10;8674;12520:43;:22;:43;:::i;:::-;12501:144;;;;;;;-1:-1:-1;;;;;12501:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;;;;;;;;;;;;8734:38;:3;8754:8;8764:7;8734:38;:19;:38;:::i;:::-;8717:160;;;;;;;-1:-1:-1;;;;;8717:160:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8892:4:4;;8569:334;-1:-1:-1;;;;;8569:334:4:o;3516:1172::-;3655:12;3622:10;3634;12520:43;:3;3622:10;3634;12520:43;:22;:43;:::i;:::-;12501:144;;;;;;;-1:-1:-1;;;;;12501:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;;;;;;;;;;;;3787:51;:3;3806:7;3815:10;3827;3787:51;:18;:51;:::i;:::-;3768:185;;;;;;;-1:-1:-1;;;;;3768:185:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4067:53;:3;4088:7;4097:10;4109;4067:53;:20;:53;:::i;:::-;4048:190;;;;;;;-1:-1:-1;;;;;4048:190:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4267:43;:3;4295:7;4304:5;4267:43;:27;:43;:::i;:::-;4248:200;;;;;;;-1:-1:-1;;;;;4248:200:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4477:52;:3;4506:7;4522:5;4516:3;:11;4477:52;:28;:52;:::i;:::-;4458:202;;;;;;;-1:-1:-1;;;;;4458:202:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4677:4:4;;3516:1172;-1:-1:-1;;;;;;3516:1172:4:o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;10557:571:4:-;10694:12;10661:10;10673;12520:43;:3;10661:10;10673;12520:43;:22;:43;:::i;:::-;12501:144;;;;;;;-1:-1:-1;;;;;12501:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;;;;;;;;;;;;10737:26;:3;10755:7;10737:26;:17;:26;:::i;:::-;10718:100;;;;;;;-1:-1:-1;;;;;10718:100:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;10937:50;:3;10949:8;10959:7;10968:6;10976:10;10937:50;:11;:50;:::i;:::-;10918:182;;;;;;;-1:-1:-1;;;;;10918:182:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7913:149;7984:18;8019:36;:3;8047:7;8019:36;:27;:36;:::i;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;11528:614:4:-;11666:12;11633:10;11645;12520:43;:3;11633:10;11645;12520:43;:22;:43;:::i;:::-;12501:144;;;;;;;-1:-1:-1;;;;;12501:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;;;;;;;;;;;;11709:26;:3;11727:7;11709:26;:17;:26;:::i;:::-;11690:100;;;;;;;-1:-1:-1;;;;;11690:100:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;11905:51;:3;11918:8;11928:7;11937:6;11945:10;11905:51;:12;:51;:::i;:::-;11886:228;;;;;;-1:-1:-1;;;;;11886:228:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6891:377;7026:12;6993:10;7005;12520:43;:3;6993:10;7005;12520:43;:22;:43;:::i;:::-;12501:144;;;;;;;-1:-1:-1;;;;;12501:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;;;;;;;;;;;;7065:43;:3;7093:7;7102:5;7065:43;:27;:43;:::i;:::-;7048:194;;;;;;;-1:-1:-1;;;;;7048:194:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2253:125;2315:11;2343:28;:3;2362:8;2343:28;:18;:28;:::i;2728:450::-;2857:12;2824:10;2836;12520:43;:3;2824:10;2836;12520:43;:22;:43;:::i;:::-;12501:144;;;;;;;-1:-1:-1;;;;;12501:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;;;;;;;;;;;;2984:52;:3;3005:7;3014:9;3025:10;2984:52;:20;:52;:::i;:::-;2965:185;;;;;;;-1:-1:-1;;;;;2965:185:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9685:503;9840:12;9807:10;9819;12520:43;:3;9807:10;9819;12520:43;:22;:43;:::i;:::-;12501:144;;;;;;;-1:-1:-1;;;;;12501:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;-1:-1:-1;;;;;;;;;;;12501:144:4;;;;;;;;;;;;;;;9971:56;:3;9995:15;10012:14;9971:56;:23;:56;:::i;:::-;9952:208;;;;;;;-1:-1:-1;;;;;9952:208:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9211:153;9288:14;9319:38;:3;9338:8;9348;9319:38;:18;:38;:::i;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;49571:301:8:-;49686:15;49709:10;49773;49785:43;49805:4;49811:16;49785:19;:43::i;:::-;49732:97;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;49732:97:8;;;;;;;-1:-1:-1;;;;;49732:97:8;-1:-1:-1;;;;;49732:97:8;-1:-1:-1;;;49732:97:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;49732:97:8;;;49722:108;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;49722:108:8;;;;;;;;;;;;49843:12;;:24;;;;;;;;;;;49722:108;;-1:-1:-1;;;;;;49843:12:8;;;;-1:-1:-1;49843:20:8;;-1:-1:-1;49843:24:8;;;;;263:2:-1;;-1:-1;49843:24:8;;;;;;;-1:-1:-1;49843:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;49843:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;49843:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;49843:24:8;;49571:301;-1:-1:-1;;;;;49571:301:8:o;12987:563::-;13101:12;13123:10;13178:34;13198:4;13204:7;13178:19;:34::i;:::-;13146:67;;;;;;;;;;;;;-1:-1:-1;;;;;13146:67:8;-1:-1:-1;;;;;13146:67:8;-1:-1:-1;;;13146:67:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;13146:67:8;;;13136:78;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;13136:78:8;;;;;;;;;;;;13239:12;;:36;;;;;;;;;;;;;;;;;;13136:78;;-1:-1:-1;;;;;;13239:12:8;;;;-1:-1:-1;13239:20:8;;-1:-1:-1;13239:36:8;;;;;263:2:-1;;-1:-1;13239:36:8;;;;;;;-1:-1:-1;13239:12:8;:36;;;5:2:-1;;;;30:1;27;20:12;5:2;13239:36:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13239:36:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13239:36:8;13222:177;;;;;;;-1:-1:-1;;;;;13222:177:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13222:177:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13494:7;-1:-1:-1;;;;;13482:44:8;;13503:10;13515;13482:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;13482:44:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13541:4:8;;12987:563;-1:-1:-1;;;;;12987:563:8:o;14216:548::-;14331:12;14351:10;14410:34;14430:4;14436:7;14410:19;:34::i;:::-;14374:71;;;;;;;;;;;;;-1:-1:-1;;;;;14374:71:8;-1:-1:-1;;;;;14374:71:8;-1:-1:-1;;;14374:71:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;14374:71:8;;;14364:82;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;14364:82:8;;;;;;;;;;;;14467:12;;:35;;;;;;;;;;;;;;;;;;14364:82;;-1:-1:-1;;;;;;14467:12:8;;;;-1:-1:-1;14467:20:8;;-1:-1:-1;14467:35:8;;;;;263:2:-1;;-1:-1;14467:35:8;;;;;;;-1:-1:-1;14467:12:8;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;14467:35:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14467:35:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;14467:35:8;14452:170;;;;;;;-1:-1:-1;;;;;14452:170:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14452:170:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14711:7;-1:-1:-1;;;;;14697:45:8;;14720:9;14731:10;14697:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;42572:1077:8;42692:12;42712;42823;42909;42771:8;42781:34;42801:4;42807:7;42781:19;:34::i;:::-;42737:79;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;42737:79:8;;;;;;;-1:-1:-1;;;;;42737:79:8;-1:-1:-1;;;;;42737:79:8;-1:-1:-1;;;42737:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;42737:79:8;;;42727:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;-1:-1;;263:2;259:12;;;254:3;250:22;246:30;340:21;;;311:9;;295:26;;;;377:20;365:33;;42727:90:8;;;;;;;;;;;42848:54;;;;;;;;;42727:90;;-1:-1:-1;42881:8:8;;-1:-1:-1;42891:10:8;;-1:-1:-1;42848:54:8;;;;-1:-1:-1;42848:54:8;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;42848:54:8;;;;;;;;;;-1:-1:-1;42848:54:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;42848:54:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;42848:54:8;;;42838:65;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;42838:65:8;;;;;;;;;;;42934:42;;;;;;;;;42838:65;;-1:-1:-1;42934:42:8;;-1:-1:-1;42934:42:8;-1:-1:-1;42934:42:8;;;;;;;;-1:-1:-1;42934:42:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;42934:42:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;42934:42:8;;;42924:53;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;42924:53:8;;;;;;;;;;;;42993:12;;-1:-1:-1;;;;;43020:26:8;;;;;;;;;;42924:53;;-1:-1:-1;;;;;;42993:12:8;;;;-1:-1:-1;42993:20:8;;-1:-1:-1;43020:26:8;;:38;;-1:-1:-1;43051:6:8;;42993:12;;43020:20;;:26;;;;;;;;;;-1:-1:-1;42993:12:8;43020:26;;;5:2:-1;;;;30:1;27;20:12;5:2;43020:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;43020:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;43020:26:8;;:38;:30;:38;:::i;:::-;42993:66;;;;;-1:-1:-1;;;42993:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;42993:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;42993:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;42993:66:8;42985:190;;;;;;;-1:-1:-1;;;;;42985:190:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;42985:190:8;;;;-1:-1:-1;;;;;;;;;;;42985:190:8;;;;-1:-1:-1;;;;;;;;;;;42985:190:8;;;;-1:-1:-1;;;;;;;;;;;42985:190:8;;;;;;;;;;;;;;;43189:12;;43216:26;;;-1:-1:-1;;;;;43216:26:8;;;;;;;;;;-1:-1:-1;;;;;43189:12:8;;;;:20;;43210:4;;43216:38;;43247:6;;43189:12;;43216:20;;:26;;;;;;;;;;;;;;43189:12;;43216:26;;;5:2:-1;;;;30:1;27;20:12;43216:38:8;43189:66;;;;;-1:-1:-1;;;43189:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;43189:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;43189:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;43189:66:8;43181:190;;;;;;;-1:-1:-1;;;;;43181:190:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;43181:190:8;;;;-1:-1:-1;;;;;;;;;;;43181:190:8;;;;-1:-1:-1;;;;;;;;;;;43181:190:8;;;;-1:-1:-1;;;;;;;;;;;43181:190:8;;;;;;;;;;;;;;;43385:12;;43412:26;;;-1:-1:-1;;;;;43412:26:8;;;;;;;;;;-1:-1:-1;;;;;43385:12:8;;;;:20;;43406:4;;43412:38;;43443:6;;43385:12;;43412:20;;:26;;;;;;;;;;;;;;43385:12;;43412:26;;;5:2:-1;;;;30:1;27;20:12;43412:38:8;43385:66;;;;;-1:-1:-1;;;43385:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;43385:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;43385:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;43385:66:8;43377:190;;;;;;;-1:-1:-1;;;;;43377:190:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;43377:190:8;;;;-1:-1:-1;;;;;;;;;;;43377:190:8;;;;-1:-1:-1;;;;;;;;;;;43377:190:8;;;;-1:-1:-1;;;;;;;;;;;43377:190:8;;;;;;;;;;;;;;;43597:7;-1:-1:-1;;;;;43579:46:8;;43587:8;43606:6;43614:10;43579:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;43579:46:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43579:46:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;43579:46:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43639:4:8;;42572:1077;-1:-1:-1;;;;;;;;42572:1077:8:o;58087:377::-;58186:12;58206:10;58272:7;58229:51;;;;;;;;;;;;;-1:-1:-1;;;;;58229:51:8;-1:-1:-1;;;;;58229:51:8;-1:-1:-1;;;58229:51:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;58229:51:8;;;58219:62;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;58219:62:8;;;;;;;;;;;;58295:12;;:31;;;;;;;;;;;;;;;;;58219:62;;-1:-1:-1;;;;;;58295:12:8;;;;-1:-1:-1;58295:20:8;;-1:-1:-1;58295:31:8;;;;;263:2:-1;;-1:-1;58295:31:8;;;;;;;-1:-1:-1;58295:12:8;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;58295:31:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;58295:31:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;58295:31:8;58287:154;;;;;;;-1:-1:-1;;;;;58287:154:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58287:154:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;58455:4:8;;58087:377;-1:-1:-1;;;;58087:377:8:o;56628:379::-;56729:12;56749:10;56814:7;56772:50;;;;;;;;;;;;;-1:-1:-1;;;;;56772:50:8;-1:-1:-1;;;;;56772:50:8;-1:-1:-1;;;56772:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;56772:50:8;;;56762:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;62552:218:8;62648:19;62682:83;62725:39;62750:4;62756:7;62725:24;:39::i;:::-;62682:38;62706:4;62712:7;62682:23;:38::i;:::-;:42;:83;:42;:83;:::i;28791:266::-;28892:12;28912:10;28969:8;28979:34;28999:4;29005:7;28979:19;:34::i;:::-;28935:79;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;28935:79:8;;;;;;;-1:-1:-1;;;;;28935:79:8;-1:-1:-1;;;;;28935:79:8;-1:-1:-1;;;28935:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;28935:79:8;;;28925:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;28925:90:8;;;;;;;;;;;;29028:12;;-1:-1:-1;;;;;29028:24:8;;;;;;;;;;28925:90;;-1:-1:-1;;;;;;29028:12:8;;;;-1:-1:-1;29028:20:8;;-1:-1:-1;29028:24:8;;;;;263:2:-1;;-1:-1;29028:24:8;;;;;;;-1:-1:-1;29028:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;63256:314:8;63349:12;63369:10;63424:8;63392:41;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;63392:41:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;63392:41:8;;;63382:52;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;63382:52:8;;;;;;;;;;;;63455:12;;:33;;;;;;;;;;;;;;;;;63382:52;;-1:-1:-1;;;;;;63455:12:8;;;;-1:-1:-1;63455:20:8;;-1:-1:-1;63455:33:8;;;;;263:2:-1;;-1:-1;63455:33:8;;;;;;;-1:-1:-1;63455:12:8;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;63455:33:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;63455:33:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;63455:33:8;63440:107;;;;;;;-1:-1:-1;;;;;63440:107:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33117:359;33199:13;33235:29;33250:4;33256:7;33235:14;:29::i;:::-;33220:102;;;;;;;-1:-1:-1;;;;;33220:102:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33343:31;33360:4;33366:7;33343:16;:31::i;:::-;33328:126;;;;;;;-1:-1:-1;;;;;33328:126:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33467:4:8;33117:359;;;;:::o;58785:227::-;58877:10;58895;58961:7;58918:51;;;;;;;;;;;;;-1:-1:-1;;;;;58918:51:8;-1:-1:-1;;;;;58918:51:8;-1:-1:-1;;;58918:51:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;58918:51:8;;;58908:62;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;58908:62:8;;;;;;;;;;;;58983:12;;-1:-1:-1;;;;;58983:24:8;;;;;;;;;;58908:62;;-1:-1:-1;;;;;;58983:12:8;;;;-1:-1:-1;58983:20:8;;-1:-1:-1;58983:24:8;;;;;263:2:-1;;-1:-1;58983:24:8;;;;;;;-1:-1:-1;58983:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;58983:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;58983:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;58983:24:8;;-1:-1:-1;58785:227:8;;;;;;:::o;44345:1137::-;44466:12;44486;44597;44721;44545:8;44555:34;44575:4;44581:7;44555:19;:34::i;:::-;44511:79;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;44511:79:8;;;;;;;-1:-1:-1;;;;;44511:79:8;-1:-1:-1;;;;;44511:79:8;-1:-1:-1;;;44511:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;44511:79:8;;;44501:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;-1:-1;;263:2;259:12;;;254:3;250:22;246:30;340:21;;;311:9;;295:26;;;;377:20;365:33;;44501:90:8;;;;;;;;;;;44622:54;;;;;;;;;44501:90;;-1:-1:-1;44655:8:8;;-1:-1:-1;44665:10:8;;-1:-1:-1;44622:54:8;;;;-1:-1:-1;44622:54:8;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;44622:54:8;;;;;;;;;;-1:-1:-1;44622:54:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;44622:54:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;44622:54:8;;;44612:65;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;44612:65:8;;;;;;;;;;;44746:42;;;;;;;;;44612:65;;-1:-1:-1;44746:42:8;;-1:-1:-1;44746:42:8;-1:-1:-1;44746:42:8;;;;;;;;-1:-1:-1;44746:42:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;44746:42:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;44746:42:8;;;44736:53;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;44736:53:8;;;;;;;;;;;;44811:12;;-1:-1:-1;;;;;44838:26:8;;;;;;;;;;44736:53;;-1:-1:-1;;;;;;44811:12:8;;;;-1:-1:-1;44811:20:8;;-1:-1:-1;44838:26:8;;:38;;-1:-1:-1;44869:6:8;;44811:12;;44838:20;;:26;;;;;;;;;;-1:-1:-1;44811:12:8;44838:26;;;5:2:-1;;;;30:1;27;20:12;5:2;44838:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;44838:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;44838:26:8;;:38;:30;:38;:::i;:::-;44811:66;;;;;-1:-1:-1;;;44811:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;44811:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;44811:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;44811:66:8;44796:197;;;;;;;-1:-1:-1;;;;;44796:197:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;44796:197:8;;;;-1:-1:-1;;;;;;;;;;;44796:197:8;;;;-1:-1:-1;;;;;;;;;;;44796:197:8;;;;-1:-1:-1;;;;;;;;;;;44796:197:8;;;;;;;;;;;;;;;45014:12;;45041:26;;;-1:-1:-1;;;;;45041:26:8;;;;;;;;;;-1:-1:-1;;;;;45014:12:8;;;;:20;;45035:4;;45041:38;;45072:6;;45014:12;;45041:20;;:26;;;;;;;;;;;;;;45014:12;;45041:26;;;5:2:-1;;;;30:1;27;20:12;45041:38:8;45014:66;;;;;-1:-1:-1;;;45014:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;45014:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;45014:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;45014:66:8;44999:197;;;;;;;-1:-1:-1;;;;;44999:197:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;44999:197:8;;;;-1:-1:-1;;;;;;;;;;;44999:197:8;;;;-1:-1:-1;;;;;;;;;;;44999:197:8;;;;-1:-1:-1;;;;;;;;;;;44999:197:8;;;;;;;;;;;;;;;45217:12;;45244:26;;;-1:-1:-1;;;;;45244:26:8;;;;;;;;;;-1:-1:-1;;;;;45217:12:8;;;;:20;;45238:4;;45244:38;;45275:6;;45217:12;;45244:20;;:26;;;;;;;;;;;;;;45217:12;;45244:26;;;5:2:-1;;;;30:1;27;20:12;45244:38:8;45217:66;;;;;-1:-1:-1;;;45217:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;45217:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;45217:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;45217:66:8;45202:197;;;;;;;-1:-1:-1;;;;;45202:197:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;45202:197:8;;;;-1:-1:-1;;;;;;;;;;;45202:197:8;;;;-1:-1:-1;;;;;;;;;;;45202:197:8;;;;-1:-1:-1;;;;;;;;;;;45202:197:8;;;;;;;;;;;;;;;45430:7;-1:-1:-1;;;;;45411:47:8;;45420:8;45439:6;45447:10;45411:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;27457:210:8;27540:11;27559:10;27615:8;27582:42;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;27582:42:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;27582:42:8;;;27572:53;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;15518:420:8;15635:12;15655:10;15713:16;15678:52;;;;;;;;;;;;;-1:-1:-1;;;;;15678:52:8;-1:-1:-1;;;;;15678:52:8;-1:-1:-1;;;15678:52:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;15678:52:8;;;15668:63;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;15668:63:8;;;;;;;;;;;;15752:12;;:44;;;;;;;;;-1:-1:-1;;;;;15752:44:8;;;;;;;;;15668:63;;-1:-1:-1;15752:12:8;;;;;-1:-1:-1;15752:23:8;;-1:-1:-1;15752:44:8;;;;;263:2:-1;;-1:-1;15752:44:8;;;;;;;-1:-1:-1;15752:12:8;:44;;;5:2:-1;;;;30:1;27;20:12;64447:441:8;64545:11;64564:16;64619:15;64743:14;64583:30;64600:4;64583:30;;;;;;;;;;;;;;;;;;:16;:30::i;:::-;64564:49;;64637:32;64654:4;64660:8;64637:16;:32::i;:::-;64619:50;;64760:101;64850:10;64846:2;:14;64761:79;64828:11;64824:2;:15;64762:56;64812:5;64762:45;64775:31;64791:4;64797:8;64775:15;:31::i;:::-;64762:8;;:45;:12;:45;:::i;:::-;:49;:56;:49;:56;:::i;:::-;64761:62;:79;:62;:79;:::i;64760:101::-;64743:118;64447:441;-1:-1:-1;;;;;;;64447:441:8:o;16402:357::-;16490:25;16523:10;16596:23;16581:7;16546:43;;;;;;;;;;;;;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;16546:43:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16546:43:8;;;16536:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16536:54:8;;;;;;;;;;;;16622:12;;:27;;;;;;;;;;;16536:54;;-1:-1:-1;;;;;;16622:12:8;;;;-1:-1:-1;16622:23:8;;-1:-1:-1;16622:27:8;;;;;263:2:-1;;-1:-1;16622:27:8;;;;;;;-1:-1:-1;16622:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16622:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16622:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16622:27:8;;-1:-1:-1;;;;;;16659:22:8;;;16655:100;;16698:15;16691:22;;;;16655:100;16741:7;16734:14;;16655:100;16402:357;;;;;;:::o;1540:174:2:-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61915:271:8;62008:11;62027:10;62094:7;62103:39;62128:4;62134:7;62103:24;:39::i;:::-;62050:93;;;;;;;;;;;;;-1:-1:-1;;;;;62050:93:8;-1:-1:-1;;;;;62050:93:8;-1:-1:-1;;;62050:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;62050:93:8;;;62040:104;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;1143:234:2;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;17162:239:8:-;17245:11;17266:10;17321:34;17341:4;17347:7;17321:19;:34::i;:::-;17289:67;;;;;;;;;;;;;-1:-1:-1;;;;;17289:67:8;-1:-1:-1;;;;;17289:67:8;-1:-1:-1;;;17289:67:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;17289:67:8;;;17279:78;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;17279:78:8;;;;;;;;;;;;17372:12;;:24;;;;;;;;;;;17279:78;;-1:-1:-1;;;;;;17372:12:8;;;;-1:-1:-1;17372:20:8;;-1:-1:-1;17372:24:8;;;;;263:2:-1;;-1:-1;17372:24:8;;;;;;;-1:-1:-1;17372:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;17810:241:8;17895:11;17914:10;17973:34;17993:4;17999:7;17973:19;:34::i;:::-;17937:71;;;;;;;;;;;;;-1:-1:-1;;;;;17937:71:8;-1:-1:-1;;;;;17937:71:8;-1:-1:-1;;;17937:71:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;17937:71:8;;;17927:82;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;21585:221:8;21670:18;21696:10;21754:8;21719:44;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;63878:211:8;63962:12;63982:10;64037:8;64005:41;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;301:224:2;359:14;;385:6;;381:35;;;408:1;401:8;;;;381:35;-1:-1:-1;433:5:2;;;437:1;433;:5;452;;;;;;;;:10;444:62;;;;;-1:-1:-1;;;;;444:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;697:284;755:14;857:9;873:1;869;:5;;;;;;;;;697:284;-1:-1:-1;;;;697:284:2:o;57486:228:8:-;57579:11;57598:10;57663:7;57621:50;;;;;;;;;;;;;-1:-1:-1;;;;;57621:50:8;-1:-1:-1;;;;;57621:50:8;-1:-1:-1;;;57621:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;57621:50:8;;;57611:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;", + "source": "pragma solidity 0.4.24;\n\n\n/*\n\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\n/*\n@title TokenIOCurrencyAuthority - Currency Authority Smart Contract for Token, Inc.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n*/\n\ncontract TokenIOCurrencyAuthority is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage */\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n * @notice Constructor method for CurrencyAuthority contract\n * @param _storageContract Address of TokenIOStorage contract\n */\n constructor(address _storageContract) public {\n /**\n * @notice Set the storage contract for the interface\n * @dev This contract will be unable to use the storage constract until\n * @dev Contract address is authorized with the storage contract\n */\n lib.Storage = TokenIOStorage(_storageContract);\n\n // @dev set owner to contract initiator\n owner[msg.sender] = true;\n }\n\n /**\n * @notice Gets balance of sepcified account for a given currency\n * @param currency Currency symbol 'USDx'\n * @param account Sepcified account address\n * @return { \"balance\": \"Returns account balance\"}\n */\n function getTokenBalance(string currency, address account) public view returns (uint balance) {\n return lib.getTokenBalance(currency, account);\n }\n\n /**\n * @notice Gets total supply of specified currency\n * @param currency Currency symbol 'USDx'\n * @return { \"supply\": \"Returns total supply of currency\"}\n */\n function getTokenSupply(string currency) public view returns (uint supply) {\n return lib.getTokenSupply(currency);\n }\n\n /**\n * @notice Updates account status. false: frozen, true: un-frozen\n * @param account Sepcified account address\n * @param isAllowed Frozen status\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function freezeAccount(address account, bool isAllowed, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n // @notice updates account status\n // @dev !!! mutates storage state\n require(\n lib.setAccountStatus(account, isAllowed, issuerFirm),\n \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Sets approval status of specified account\n * @param account Sepcified account address\n * @param isApproved Frozen status\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function approveKYC(address account, bool isApproved, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n // @notice updates kyc approval status\n // @dev !!! mutates storage state\n require(\n lib.setKYCApproval(account, isApproved, issuerFirm),\n \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"\n );\n // @notice updates account statuss\n // @dev !!! mutates storage state\n require(\n lib.setAccountStatus(account, isApproved, issuerFirm),\n \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.setAccountSpendingLimit(account, limit),\n \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.setAccountSpendingPeriod(account, (now + 86400)),\n \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Approves account and deposits specified amount of given currency\n * @param currency Currency symbol of amount to be deposited;\n * @param account Ethereum address of account holder;\n * @param amount Deposit amount for account holder;\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function approveKYCAndDeposit(string currency, address account, uint amount, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n /// @notice updates kyc approval status\n /// @dev !!! mutates storage state\n require(\n lib.setKYCApproval(account, true, issuerFirm),\n \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"\n );\n /// @notice updates kyc approval status\n /// @dev !!! mutates storage state\n require(\n lib.setAccountStatus(account, true, issuerFirm),\n \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.deposit(currency, account, amount, issuerFirm),\n \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.setAccountSpendingLimit(account, limit),\n \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.setAccountSpendingPeriod(account, (now + 86400)),\n \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Sets the spending limit for a given account\n * @param account Ethereum address of account holder;\n * @param limit Spending limit amount for account;\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function setAccountSpendingLimit(address account, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n require(\n lib.setAccountSpendingLimit(account, limit),\n \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Returns the periodic remaining spending amount for an account\n * @param account Ethereum address of account holder;\n * @return {\"spendingRemaining\" : \"Returns the remaining spending amount for the account\"}\n */\n function getAccountSpendingRemaining(address account) public view returns (uint spendingRemaining) {\n return lib.getAccountSpendingRemaining(account);\n }\n\n /**\n * @notice Return the spending limit for an account\n * @param account Ethereum address of account holder\n * @return {\"spendingLimit\" : \"Returns the remaining daily spending limit of the account\"}\n */\n function getAccountSpendingLimit(address account) public view returns (uint spendingLimit) {\n return lib.getAccountSpendingLimit(account);\n }\n\n /**\n * @notice Set the foreign currency exchange rate to USD in basis points\n * @dev NOTE: This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param bpsRate Basis point rate of foreign currency exchange rate to USD\n * @param issuerFirm Firm setting the foreign currency exchange\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function setFxBpsRate(string currency, uint bpsRate, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n require(\n lib.setFxUSDBPSRate(currency, bpsRate),\n \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"\n );\n return true;\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param fxAmount Amount of foreign currency to exchange into USD\n * @return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDAmount(string currency, uint fxAmount) public view returns (uint usdAmount) {\n return lib.getFxUSDAmount(currency, fxAmount);\n }\n\n /**\n * @notice Updates to new forwarded account\n * @param originalAccount [address]\n * @param updatedAccount [address]\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function approveForwardedAccount(address originalAccount, address updatedAccount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n // @notice updatesa forwarded account\n // @dev !!! mutates storage state\n require(\n lib.setForwardedAccount(originalAccount, updatedAccount),\n \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Issues a specified account to recipient account of a given currency\n * @param currency [string] currency symbol\n * @param amount [uint] issuance amount\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function deposit(string currency, address account, uint amount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n require(\n lib.verifyAccount(account),\n \"Error: Account is not verified!\"\n );\n // @notice depositing tokens to account\n // @dev !!! mutates storage state\n require(\n lib.deposit(currency, account, amount, issuerFirm),\n \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Withdraws a specified amount of tokens of a given currency\n * @param currency Currency symbol\n * @param account Ethereum address of account holder\n * @param amount Issuance amount\n * @param issuerFirm Name of the issuer firm with authority on account holder\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function withdraw(string currency, address account, uint amount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n require(\n lib.verifyAccount(account),\n \"Error: Account is not verified!\"\n );\n // @notice withdrawing from account\n // @dev !!! mutates storage state\n require(\n lib.withdraw(currency, account, amount, issuerFirm),\n \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"\n );\n return true;\n }\n\n /**\n * @notice Ensure only authorized currency firms and authorities can modify protected methods\n * @dev authority must be registered to an authorized firm to use protected methods\n */\n modifier onlyAuthority(string firmName, address authority) {\n // @notice throws if authority account is not registred to the given firm\n require(\n lib.isRegisteredToFirm(firmName, authority),\n \"Error: issuerFirm and/or firm authority are not registered\"\n );\n _;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOCurrencyAuthority.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOCurrencyAuthority.sol", + "exportedSymbols": { + "TokenIOCurrencyAuthority": [ + 922 + ] + }, + "id": 923, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 472, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 473, + "nodeType": "ImportDirective", + "scope": 923, + "sourceUnit": 185, + "src": "524:23:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 474, + "nodeType": "ImportDirective", + "scope": 923, + "sourceUnit": 5242, + "src": "548:30:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 475, + "nodeType": "ImportDirective", + "scope": 923, + "sourceUnit": 4623, + "src": "579:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 476, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "926:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 477, + "nodeType": "InheritanceSpecifier", + "src": "926:7:4" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 922, + "linearizedBaseContracts": [ + 922, + 184 + ], + "name": "TokenIOCurrencyAuthority", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 480, + "libraryName": { + "contractScope": null, + "id": 478, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1033:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1027:37:4", + "typeName": { + "contractScope": null, + "id": 479, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1048:15:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 482, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 922, + "src": "1069:19:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 481, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1069:15:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "1287:385:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "1536:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 489, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1536:11:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 491, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "1565:16:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 490, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1550:14:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1550:32:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1536:46:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 494, + "nodeType": "ExpressionStatement", + "src": "1536:46:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 495, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1641:5:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 498, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 496, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1647:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1647:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1641:17:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1661:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1641:24:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "1641:24:4" + } + ] + }, + "documentation": "@notice Constructor method for CurrencyAuthority contract\n@param _storageContract Address of TokenIOStorage contract", + "id": 503, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 484, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 503, + "src": "1254:24:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 483, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1254:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1253:26:4" + }, + "payable": false, + "returnParameters": { + "id": 486, + "nodeType": "ParameterList", + "parameters": [], + "src": "1287:0:4" + }, + "scope": 922, + "src": "1242:430:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 518, + "nodeType": "Block", + "src": "2007:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 514, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 505, + "src": "2042:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 515, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 507, + "src": "2052:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 512, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2022:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 513, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2832, + "src": "2022:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2022:38:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 511, + "id": 517, + "nodeType": "Return", + "src": "2015:45:4" + } + ] + }, + "documentation": "@notice Gets balance of sepcified account for a given currency\n@param currency Currency symbol 'USDx'\n@param account Sepcified account address\n@return { \"balance\": \"Returns account balance\"}", + "id": 519, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 505, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1938:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 504, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1938:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 507, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1955:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1955:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1937:34:4" + }, + "payable": false, + "returnParameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 510, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1993:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 509, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1993:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1992:14:4" + }, + "scope": 922, + "src": "1913:154:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 531, + "nodeType": "Block", + "src": "2328:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 528, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 521, + "src": "2362:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 526, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2343:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 527, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 2762, + "src": "2343:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2343:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 525, + "id": 530, + "nodeType": "Return", + "src": "2336:35:4" + } + ] + }, + "documentation": "@notice Gets total supply of specified currency\n@param currency Currency symbol 'USDx'\n@return { \"supply\": \"Returns total supply of currency\"}", + "id": 532, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 521, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "2277:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 520, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2277:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2276:17:4" + }, + "payable": false, + "returnParameters": { + "id": 525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "2315:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2315:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2314:13:4" + }, + "scope": 922, + "src": "2253:125:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 560, + "nodeType": "Block", + "src": "2871:307:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 551, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 534, + "src": "3005:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 552, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "3014:9:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 553, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "3025:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 549, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2984:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 550, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2226, + "src": "2984:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2984:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20667265657a65206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3048:92:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f197396b05ade1cce611708853992e455bcadbeffc759d9c87bb519e9c019f7", + "typeString": "literal_string \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to freeze account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f197396b05ade1cce611708853992e455bcadbeffc759d9c87bb519e9c019f7", + "typeString": "literal_string \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 548, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2965:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2965:185:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 557, + "nodeType": "ExpressionStatement", + "src": "2965:185:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3167:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 547, + "id": 559, + "nodeType": "Return", + "src": "3160:11:4" + } + ] + }, + "documentation": "@notice Updates account status. false: frozen, true: un-frozen\n@param account Sepcified account address\n@param isAllowed Frozen status\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 561, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 541, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "2824:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 542, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "2836:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2836:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 544, + "modifierName": { + "argumentTypes": null, + "id": 540, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "2810:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2810:37:4" + } + ], + "name": "freezeAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 534, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2751:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2751:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 536, + "name": "isAllowed", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2768:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 535, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2768:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 538, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2784:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 537, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2784:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2750:52:4" + }, + "payable": false, + "returnParameters": { + "id": 547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 546, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2857:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 545, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2857:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2856:14:4" + }, + "scope": 922, + "src": "2728:450:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 622, + "nodeType": "Block", + "src": "3669:1019:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 582, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "3806:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 583, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "3815:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 584, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "3827:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 580, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "3787:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 581, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setKYCApproval", + "nodeType": "MemberAccess", + "referencedDeclaration": 2181, + "src": "3787:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3787:51:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f7665206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3850:93:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to approve account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 579, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "3768:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3768:185:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 588, + "nodeType": "ExpressionStatement", + "src": "3768:185:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 592, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4088:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 593, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "4097:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 594, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "4109:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 590, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4067:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 591, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2226, + "src": "4067:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4067:53:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207374617475732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4132:96:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set account status. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 589, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4048:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4048:190:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 598, + "nodeType": "ExpressionStatement", + "src": "4048:190:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 602, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 603, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 567, + "src": "4304:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 600, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4267:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 601, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "4267:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4267:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4322:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 599, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4248:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4248:200:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 607, + "nodeType": "ExpressionStatement", + "src": "4248:200:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 611, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4506:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 612, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "4516:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4522:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "src": "4516:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 615, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4515:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 609, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4477:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "4477:28:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4477:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720706572696f6420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4541:109:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4458:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4458:202:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 619, + "nodeType": "ExpressionStatement", + "src": "4458:202:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4677:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 578, + "id": 621, + "nodeType": "Return", + "src": "4670:11:4" + } + ] + }, + "documentation": "@notice Sets approval status of specified account\n@param account Sepcified account address\n@param isApproved Frozen status\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 623, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 572, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "3622:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "3634:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3634:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 575, + "modifierName": { + "argumentTypes": null, + "id": 571, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "3608:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3608:37:4" + } + ], + "name": "approveKYC", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 563, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3536:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 562, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3536:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 565, + "name": "isApproved", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3553:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3553:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 567, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3570:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 566, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3570:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 569, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3582:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 568, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3582:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3535:65:4" + }, + "payable": false, + "returnParameters": { + "id": 578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 577, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3655:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 576, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3655:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3654:14:4" + }, + "scope": 922, + "src": "3516:1172:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 697, + "nodeType": "Block", + "src": "5318:1207:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 646, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5457:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5466:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "id": 648, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5472:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 644, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5438:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 645, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setKYCApproval", + "nodeType": "MemberAccess", + "referencedDeclaration": 2181, + "src": "5438:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5438:45:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f7665206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5495:93:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to approve account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 643, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5419:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5419:179:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 652, + "nodeType": "ExpressionStatement", + "src": "5419:179:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 656, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5739:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5748:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "id": 658, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5754:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 654, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5718:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 655, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2226, + "src": "5718:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5718:47:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207374617475732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5777:96:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set account status. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 653, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5699:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5699:184:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 662, + "nodeType": "ExpressionStatement", + "src": "5699:184:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 666, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "5924:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 667, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5934:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 668, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 629, + "src": "5943:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 669, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5951:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 664, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5912:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 3635, + "src": "5912:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5912:50:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f206465706f7369742066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5974:91:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 663, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5893:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5893:182:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 673, + "nodeType": "ExpressionStatement", + "src": "5893:182:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "6132:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 631, + "src": "6141:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 675, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "6104:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 676, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "6104:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6104:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6159:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 674, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:200:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 682, + "nodeType": "ExpressionStatement", + "src": "6085:200:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 686, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "6343:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 687, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "6353:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6359:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "src": "6353:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 690, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6352:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 684, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "6314:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 685, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "6314:28:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6314:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720706572696f6420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6378:109:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 683, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:202:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 694, + "nodeType": "ExpressionStatement", + "src": "6295:202:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6514:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 642, + "id": 696, + "nodeType": "Return", + "src": "6507:11:4" + } + ] + }, + "documentation": "@notice Approves account and deposits specified amount of given currency\n@param currency Currency symbol of amount to be deposited;\n@param account Ethereum address of account holder;\n@param amount Deposit amount for account holder;\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 698, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 636, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5271:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 637, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "5283:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5283:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 639, + "modifierName": { + "argumentTypes": null, + "id": 635, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "5257:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5257:37:4" + } + ], + "name": "approveKYCAndDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 634, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 625, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5172:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 624, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5172:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 627, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5189:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 626, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5189:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 629, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5206:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 628, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5206:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 631, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5219:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 630, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5219:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 633, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5231:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 632, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5231:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5171:78:4" + }, + "payable": false, + "returnParameters": { + "id": 642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 641, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5304:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 640, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5304:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5303:14:4" + }, + "scope": 922, + "src": "5142:1383:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 725, + "nodeType": "Block", + "src": "7040:228:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 717, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "7093:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 718, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 702, + "src": "7102:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 715, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "7065:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 716, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "7065:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7065:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7118:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "7048:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7048:194:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 722, + "nodeType": "ExpressionStatement", + "src": "7048:194:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7257:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 713, + "id": 724, + "nodeType": "Return", + "src": "7250:11:4" + } + ] + }, + "documentation": "@notice Sets the spending limit for a given account\n@param account Ethereum address of account holder;\n@param limit Spending limit amount for account;\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 726, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 707, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "6993:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 708, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "7005:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7005:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 710, + "modifierName": { + "argumentTypes": null, + "id": 706, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "6979:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6979:37:4" + } + ], + "name": "setAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 700, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6924:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6924:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 702, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6941:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 701, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6941:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 704, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6953:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 703, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6953:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6923:48:4" + }, + "payable": false, + "returnParameters": { + "id": 713, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 712, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "7026:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 711, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7026:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7025:14:4" + }, + "scope": 922, + "src": "6891:377:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 738, + "nodeType": "Block", + "src": "7620:62:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 735, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 728, + "src": "7667:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 733, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "7635:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 734, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getAccountSpendingRemaining", + "nodeType": "MemberAccess", + "referencedDeclaration": 4508, + "src": "7635:31:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7635:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 732, + "id": 737, + "nodeType": "Return", + "src": "7628:47:4" + } + ] + }, + "documentation": "@notice Returns the periodic remaining spending amount for an account\n@param account Ethereum address of account holder;\n@return {\"spendingRemaining\" : \"Returns the remaining spending amount for the account\"}", + "id": 739, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingRemaining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 729, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 728, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 739, + "src": "7558:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 727, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7558:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7557:17:4" + }, + "payable": false, + "returnParameters": { + "id": 732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 731, + "name": "spendingRemaining", + "nodeType": "VariableDeclaration", + "scope": 739, + "src": "7596:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 730, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7596:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7595:24:4" + }, + "scope": 922, + "src": "7521:161:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 751, + "nodeType": "Block", + "src": "8004:58:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 748, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 741, + "src": "8047:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 746, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "8019:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 747, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4334, + "src": "8019:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8019:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 745, + "id": 750, + "nodeType": "Return", + "src": "8012:43:4" + } + ] + }, + "documentation": "@notice Return the spending limit for an account\n@param account Ethereum address of account holder\n@return {\"spendingLimit\" : \"Returns the remaining daily spending limit of the account\"}", + "id": 752, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 741, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "7946:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 740, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7946:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7945:17:4" + }, + "payable": false, + "returnParameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 744, + "name": "spendingLimit", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "7984:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 743, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7984:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7983:20:4" + }, + "scope": 922, + "src": "7913:149:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 779, + "nodeType": "Block", + "src": "8709:194:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 771, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 754, + "src": "8754:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 772, + "name": "bpsRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "8764:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 769, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "8734:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFxUSDBPSRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4542, + "src": "8734:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8734:38:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742046582055534420626173697320706f696e747320726174652e20506c6561736520656e73757265206973737565724669726d20697320617574686f72697a6564", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8782:87:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb75f554926078abd19b386958c530b812c30dcf00b22d8f88e84ef51c06cb71", + "typeString": "literal_string \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"" + }, + "value": "Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb75f554926078abd19b386958c530b812c30dcf00b22d8f88e84ef51c06cb71", + "typeString": "literal_string \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"" + } + ], + "id": 768, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8717:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8717:160:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 776, + "nodeType": "ExpressionStatement", + "src": "8717:160:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8892:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 767, + "id": 778, + "nodeType": "Return", + "src": "8885:11:4" + } + ] + }, + "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev NOTE: This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@param issuerFirm Firm setting the foreign currency exchange\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 780, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 761, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 758, + "src": "8662:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 762, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "8674:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8674:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 764, + "modifierName": { + "argumentTypes": null, + "id": 760, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "8648:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8648:37:4" + } + ], + "name": "setFxBpsRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 754, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8591:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 753, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8591:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 756, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8608:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 755, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8608:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 758, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8622:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 757, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8622:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8590:50:4" + }, + "payable": false, + "returnParameters": { + "id": 767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 766, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8695:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 765, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8695:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8694:14:4" + }, + "scope": 922, + "src": "8569:334:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 795, + "nodeType": "Block", + "src": "9304:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 791, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "9338:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 792, + "name": "fxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 784, + "src": "9348:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 789, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "9319:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFxUSDAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4621, + "src": "9319:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9319:38:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 788, + "id": 794, + "nodeType": "Return", + "src": "9312:45:4" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", + "id": 796, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 782, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9235:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 781, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9235:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 784, + "name": "fxAmount", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9252:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 783, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9252:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9234:32:4" + }, + "payable": false, + "returnParameters": { + "id": 788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 787, + "name": "usdAmount", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9288:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9288:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9287:16:4" + }, + "scope": 922, + "src": "9211:153:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 823, + "nodeType": "Block", + "src": "9854:334:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 815, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 798, + "src": "9995:15:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 816, + "name": "updatedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 800, + "src": "10012:14:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 813, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "9971:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setForwardedAccount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2260, + "src": "9971:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) returns (bool)" + } + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9971:56:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420666f72776172646564206164647265737320666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10039:111:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6961bf7e2117bb8ea6b863d500e7333e3944d065ba6c8fa1114eacec3e93704", + "typeString": "literal_string \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e6961bf7e2117bb8ea6b863d500e7333e3944d065ba6c8fa1114eacec3e93704", + "typeString": "literal_string \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 812, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "9952:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9952:208:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 820, + "nodeType": "ExpressionStatement", + "src": "9952:208:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10177:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 811, + "id": 822, + "nodeType": "Return", + "src": "10170:11:4" + } + ] + }, + "documentation": "@notice Updates to new forwarded account\n@param originalAccount [address]\n@param updatedAccount [address]\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 824, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 802, + "src": "9807:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 806, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "9819:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9819:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 808, + "modifierName": { + "argumentTypes": null, + "id": 804, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "9793:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9793:37:4" + } + ], + "name": "approveForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 798, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9718:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9718:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 800, + "name": "updatedAccount", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9743:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 799, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9743:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 802, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9767:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 801, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9767:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9717:68:4" + }, + "payable": false, + "returnParameters": { + "id": 811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 810, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9840:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 809, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9840:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9839:14:4" + }, + "scope": 922, + "src": "9685:503:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 863, + "nodeType": "Block", + "src": "10708:420:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 845, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "10755:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 843, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "10737:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "verifyAccount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3062, + "src": "10737:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10737:26:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656421", + "id": 847, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10775:33:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a5e279d14000afe880d344db24ac101f5a640f2f3904eb122eb002d05df8832c", + "typeString": "literal_string \"Error: Account is not verified!\"" + }, + "value": "Error: Account is not verified!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a5e279d14000afe880d344db24ac101f5a640f2f3904eb122eb002d05df8832c", + "typeString": "literal_string \"Error: Account is not verified!\"" + } + ], + "id": 842, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "10718:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10718:100:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 849, + "nodeType": "ExpressionStatement", + "src": "10718:100:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 853, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "10949:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 854, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "10959:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 855, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "10968:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 856, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "10976:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 851, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "10937:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 3635, + "src": "10937:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10937:50:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f206465706f7369742066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10999:91:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 850, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "10918:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10918:182:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 860, + "nodeType": "ExpressionStatement", + "src": "10918:182:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11117:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 841, + "id": 862, + "nodeType": "Return", + "src": "11110:11:4" + } + ] + }, + "documentation": "@notice Issues a specified account to recipient account of a given currency\n@param currency [string] currency symbol\n@param amount [uint] issuance amount\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 864, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 835, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "10661:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "10673:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10673:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 838, + "modifierName": { + "argumentTypes": null, + "id": 834, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "10647:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10647:37:4" + } + ], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 833, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 826, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10574:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 825, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10574:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 828, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10591:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10591:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 830, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10608:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 829, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10608:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 832, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10621:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 831, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10621:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10573:66:4" + }, + "payable": false, + "returnParameters": { + "id": 841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 840, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10694:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 839, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10694:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10693:14:4" + }, + "scope": 922, + "src": "10557:571:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 903, + "nodeType": "Block", + "src": "11680:462:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 885, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 868, + "src": "11727:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 883, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "11709:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "verifyAccount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3062, + "src": "11709:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11709:26:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656421", + "id": 887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11747:33:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a5e279d14000afe880d344db24ac101f5a640f2f3904eb122eb002d05df8832c", + "typeString": "literal_string \"Error: Account is not verified!\"" + }, + "value": "Error: Account is not verified!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a5e279d14000afe880d344db24ac101f5a640f2f3904eb122eb002d05df8832c", + "typeString": "literal_string \"Error: Account is not verified!\"" + } + ], + "id": 882, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "11690:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11690:100:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 889, + "nodeType": "ExpressionStatement", + "src": "11690:100:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 893, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "11918:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 894, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 868, + "src": "11928:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 895, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 870, + "src": "11937:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 896, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "11945:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 891, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "11905:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 892, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 3746, + "src": "11905:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11905:51:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2077697468647261772066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f7269747920617265207265676973746572656420616e642068617665206973737565642066756e647320746861742063616e2062652077697468647261776e", + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11968:136:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6e626bbbdfa2315c15e2b539714496598c6d0294b7989222c4553c1a4a17622", + "typeString": "literal_string \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"" + }, + "value": "Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d6e626bbbdfa2315c15e2b539714496598c6d0294b7989222c4553c1a4a17622", + "typeString": "literal_string \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"" + } + ], + "id": 890, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "11886:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11886:228:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "11886:228:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12131:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 881, + "id": 902, + "nodeType": "Return", + "src": "12124:11:4" + } + ] + }, + "documentation": "@notice Withdraws a specified amount of tokens of a given currency\n@param currency Currency symbol\n@param account Ethereum address of account holder\n@param amount Issuance amount\n@param issuerFirm Name of the issuer firm with authority on account holder\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 904, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 875, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "11633:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "11645:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11645:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 878, + "modifierName": { + "argumentTypes": null, + "id": 874, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "11619:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11619:37:4" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 866, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11546:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 865, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11546:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 868, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11563:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11563:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 870, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11580:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 869, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11580:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 872, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11593:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 871, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11593:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11545:66:4" + }, + "payable": false, + "returnParameters": { + "id": 881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 880, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11666:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 879, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11666:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11665:14:4" + }, + "scope": 922, + "src": "11528:614:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 920, + "nodeType": "Block", + "src": "12409:254:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "12543:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 914, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 908, + "src": "12553:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 911, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "12520:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 912, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3932, + "src": "12520:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12520:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a206973737565724669726d20616e642f6f72206669726d20617574686f7269747920617265206e6f742072656769737465726564", + "id": 916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12575:60:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_462b4c77bf54838ec38a464948b1a941796aa7d982a63221057f242b5bb9741d", + "typeString": "literal_string \"Error: issuerFirm and/or firm authority are not registered\"" + }, + "value": "Error: issuerFirm and/or firm authority are not registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_462b4c77bf54838ec38a464948b1a941796aa7d982a63221057f242b5bb9741d", + "typeString": "literal_string \"Error: issuerFirm and/or firm authority are not registered\"" + } + ], + "id": 910, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "12501:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12501:144:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 918, + "nodeType": "ExpressionStatement", + "src": "12501:144:4" + }, + { + "id": 919, + "nodeType": "PlaceholderStatement", + "src": "12655:1:4" + } + ] + }, + "documentation": "@notice Ensure only authorized currency firms and authorities can modify protected methods\n@dev authority must be registered to an authorized firm to use protected methods", + "id": 921, + "name": "onlyAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 909, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 906, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 921, + "src": "12373:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 905, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12373:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 908, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 921, + "src": "12390:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12390:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12372:36:4" + }, + "src": "12350:313:4", + "visibility": "internal" + } + ], + "scope": 923, + "src": "889:11777:4" + } + ], + "src": "0:12667:4" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOCurrencyAuthority.sol", + "exportedSymbols": { + "TokenIOCurrencyAuthority": [ + 922 + ] + }, + "id": 923, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 472, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 473, + "nodeType": "ImportDirective", + "scope": 923, + "sourceUnit": 185, + "src": "524:23:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 474, + "nodeType": "ImportDirective", + "scope": 923, + "sourceUnit": 5242, + "src": "548:30:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 475, + "nodeType": "ImportDirective", + "scope": 923, + "sourceUnit": 4623, + "src": "579:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 476, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "926:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 477, + "nodeType": "InheritanceSpecifier", + "src": "926:7:4" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 922, + "linearizedBaseContracts": [ + 922, + 184 + ], + "name": "TokenIOCurrencyAuthority", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 480, + "libraryName": { + "contractScope": null, + "id": 478, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1033:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1027:37:4", + "typeName": { + "contractScope": null, + "id": 479, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1048:15:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 482, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 922, + "src": "1069:19:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 481, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1069:15:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "1287:385:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "1536:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 489, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1536:11:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 491, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "1565:16:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 490, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1550:14:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1550:32:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1536:46:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 494, + "nodeType": "ExpressionStatement", + "src": "1536:46:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 495, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1641:5:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 498, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 496, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1647:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1647:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1641:17:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1661:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1641:24:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "1641:24:4" + } + ] + }, + "documentation": "@notice Constructor method for CurrencyAuthority contract\n@param _storageContract Address of TokenIOStorage contract", + "id": 503, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 484, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 503, + "src": "1254:24:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 483, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1254:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1253:26:4" + }, + "payable": false, + "returnParameters": { + "id": 486, + "nodeType": "ParameterList", + "parameters": [], + "src": "1287:0:4" + }, + "scope": 922, + "src": "1242:430:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 518, + "nodeType": "Block", + "src": "2007:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 514, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 505, + "src": "2042:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 515, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 507, + "src": "2052:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 512, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2022:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 513, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2832, + "src": "2022:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2022:38:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 511, + "id": 517, + "nodeType": "Return", + "src": "2015:45:4" + } + ] + }, + "documentation": "@notice Gets balance of sepcified account for a given currency\n@param currency Currency symbol 'USDx'\n@param account Sepcified account address\n@return { \"balance\": \"Returns account balance\"}", + "id": 519, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 505, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1938:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 504, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1938:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 507, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1955:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1955:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1937:34:4" + }, + "payable": false, + "returnParameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 510, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1993:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 509, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1993:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1992:14:4" + }, + "scope": 922, + "src": "1913:154:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 531, + "nodeType": "Block", + "src": "2328:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 528, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 521, + "src": "2362:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 526, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2343:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 527, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 2762, + "src": "2343:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2343:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 525, + "id": 530, + "nodeType": "Return", + "src": "2336:35:4" + } + ] + }, + "documentation": "@notice Gets total supply of specified currency\n@param currency Currency symbol 'USDx'\n@return { \"supply\": \"Returns total supply of currency\"}", + "id": 532, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 521, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "2277:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 520, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2277:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2276:17:4" + }, + "payable": false, + "returnParameters": { + "id": 525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "2315:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2315:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2314:13:4" + }, + "scope": 922, + "src": "2253:125:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 560, + "nodeType": "Block", + "src": "2871:307:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 551, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 534, + "src": "3005:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 552, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "3014:9:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 553, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "3025:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 549, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2984:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 550, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2226, + "src": "2984:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2984:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20667265657a65206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3048:92:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f197396b05ade1cce611708853992e455bcadbeffc759d9c87bb519e9c019f7", + "typeString": "literal_string \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to freeze account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f197396b05ade1cce611708853992e455bcadbeffc759d9c87bb519e9c019f7", + "typeString": "literal_string \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 548, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2965:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2965:185:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 557, + "nodeType": "ExpressionStatement", + "src": "2965:185:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3167:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 547, + "id": 559, + "nodeType": "Return", + "src": "3160:11:4" + } + ] + }, + "documentation": "@notice Updates account status. false: frozen, true: un-frozen\n@param account Sepcified account address\n@param isAllowed Frozen status\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 561, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 541, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "2824:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 542, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "2836:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2836:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 544, + "modifierName": { + "argumentTypes": null, + "id": 540, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "2810:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2810:37:4" + } + ], + "name": "freezeAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 534, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2751:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2751:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 536, + "name": "isAllowed", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2768:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 535, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2768:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 538, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2784:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 537, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2784:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2750:52:4" + }, + "payable": false, + "returnParameters": { + "id": 547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 546, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2857:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 545, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2857:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2856:14:4" + }, + "scope": 922, + "src": "2728:450:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 622, + "nodeType": "Block", + "src": "3669:1019:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 582, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "3806:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 583, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "3815:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 584, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "3827:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 580, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "3787:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 581, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setKYCApproval", + "nodeType": "MemberAccess", + "referencedDeclaration": 2181, + "src": "3787:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3787:51:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f7665206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3850:93:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to approve account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 579, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "3768:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3768:185:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 588, + "nodeType": "ExpressionStatement", + "src": "3768:185:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 592, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4088:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 593, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "4097:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 594, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "4109:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 590, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4067:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 591, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2226, + "src": "4067:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4067:53:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207374617475732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4132:96:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set account status. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 589, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4048:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4048:190:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 598, + "nodeType": "ExpressionStatement", + "src": "4048:190:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 602, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 603, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 567, + "src": "4304:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 600, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4267:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 601, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "4267:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4267:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4322:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 599, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4248:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4248:200:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 607, + "nodeType": "ExpressionStatement", + "src": "4248:200:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 611, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4506:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 612, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "4516:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4522:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "src": "4516:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 615, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4515:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 609, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4477:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "4477:28:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4477:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720706572696f6420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4541:109:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4458:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4458:202:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 619, + "nodeType": "ExpressionStatement", + "src": "4458:202:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4677:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 578, + "id": 621, + "nodeType": "Return", + "src": "4670:11:4" + } + ] + }, + "documentation": "@notice Sets approval status of specified account\n@param account Sepcified account address\n@param isApproved Frozen status\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 623, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 572, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "3622:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "3634:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3634:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 575, + "modifierName": { + "argumentTypes": null, + "id": 571, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "3608:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3608:37:4" + } + ], + "name": "approveKYC", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 563, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3536:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 562, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3536:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 565, + "name": "isApproved", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3553:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3553:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 567, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3570:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 566, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3570:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 569, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3582:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 568, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3582:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3535:65:4" + }, + "payable": false, + "returnParameters": { + "id": 578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 577, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3655:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 576, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3655:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3654:14:4" + }, + "scope": 922, + "src": "3516:1172:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 697, + "nodeType": "Block", + "src": "5318:1207:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 646, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5457:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5466:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "id": 648, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5472:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 644, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5438:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 645, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setKYCApproval", + "nodeType": "MemberAccess", + "referencedDeclaration": 2181, + "src": "5438:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5438:45:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f7665206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5495:93:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to approve account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 643, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5419:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5419:179:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 652, + "nodeType": "ExpressionStatement", + "src": "5419:179:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 656, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5739:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5748:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "id": 658, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5754:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 654, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5718:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 655, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2226, + "src": "5718:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5718:47:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207374617475732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5777:96:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set account status. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 653, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5699:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5699:184:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 662, + "nodeType": "ExpressionStatement", + "src": "5699:184:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 666, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "5924:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 667, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5934:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 668, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 629, + "src": "5943:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 669, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5951:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 664, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5912:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 3635, + "src": "5912:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5912:50:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f206465706f7369742066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5974:91:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 663, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5893:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5893:182:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 673, + "nodeType": "ExpressionStatement", + "src": "5893:182:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "6132:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 631, + "src": "6141:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 675, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "6104:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 676, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "6104:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6104:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6159:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 674, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:200:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 682, + "nodeType": "ExpressionStatement", + "src": "6085:200:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 686, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "6343:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 687, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "6353:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6359:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "src": "6353:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 690, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6352:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 684, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "6314:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 685, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "6314:28:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6314:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720706572696f6420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6378:109:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 683, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:202:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 694, + "nodeType": "ExpressionStatement", + "src": "6295:202:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6514:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 642, + "id": 696, + "nodeType": "Return", + "src": "6507:11:4" + } + ] + }, + "documentation": "@notice Approves account and deposits specified amount of given currency\n@param currency Currency symbol of amount to be deposited;\n@param account Ethereum address of account holder;\n@param amount Deposit amount for account holder;\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 698, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 636, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5271:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 637, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "5283:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5283:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 639, + "modifierName": { + "argumentTypes": null, + "id": 635, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "5257:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5257:37:4" + } + ], + "name": "approveKYCAndDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 634, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 625, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5172:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 624, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5172:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 627, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5189:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 626, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5189:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 629, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5206:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 628, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5206:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 631, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5219:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 630, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5219:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 633, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5231:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 632, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5231:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5171:78:4" + }, + "payable": false, + "returnParameters": { + "id": 642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 641, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5304:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 640, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5304:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5303:14:4" + }, + "scope": 922, + "src": "5142:1383:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 725, + "nodeType": "Block", + "src": "7040:228:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 717, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "7093:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 718, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 702, + "src": "7102:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 715, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "7065:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 716, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "7065:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7065:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7118:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "7048:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7048:194:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 722, + "nodeType": "ExpressionStatement", + "src": "7048:194:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7257:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 713, + "id": 724, + "nodeType": "Return", + "src": "7250:11:4" + } + ] + }, + "documentation": "@notice Sets the spending limit for a given account\n@param account Ethereum address of account holder;\n@param limit Spending limit amount for account;\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 726, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 707, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "6993:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 708, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "7005:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7005:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 710, + "modifierName": { + "argumentTypes": null, + "id": 706, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "6979:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6979:37:4" + } + ], + "name": "setAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 700, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6924:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6924:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 702, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6941:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 701, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6941:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 704, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6953:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 703, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6953:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6923:48:4" + }, + "payable": false, + "returnParameters": { + "id": 713, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 712, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "7026:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 711, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7026:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7025:14:4" + }, + "scope": 922, + "src": "6891:377:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 738, + "nodeType": "Block", + "src": "7620:62:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 735, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 728, + "src": "7667:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 733, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "7635:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 734, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getAccountSpendingRemaining", + "nodeType": "MemberAccess", + "referencedDeclaration": 4508, + "src": "7635:31:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7635:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 732, + "id": 737, + "nodeType": "Return", + "src": "7628:47:4" + } + ] + }, + "documentation": "@notice Returns the periodic remaining spending amount for an account\n@param account Ethereum address of account holder;\n@return {\"spendingRemaining\" : \"Returns the remaining spending amount for the account\"}", + "id": 739, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingRemaining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 729, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 728, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 739, + "src": "7558:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 727, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7558:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7557:17:4" + }, + "payable": false, + "returnParameters": { + "id": 732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 731, + "name": "spendingRemaining", + "nodeType": "VariableDeclaration", + "scope": 739, + "src": "7596:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 730, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7596:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7595:24:4" + }, + "scope": 922, + "src": "7521:161:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 751, + "nodeType": "Block", + "src": "8004:58:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 748, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 741, + "src": "8047:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 746, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "8019:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 747, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4334, + "src": "8019:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8019:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 745, + "id": 750, + "nodeType": "Return", + "src": "8012:43:4" + } + ] + }, + "documentation": "@notice Return the spending limit for an account\n@param account Ethereum address of account holder\n@return {\"spendingLimit\" : \"Returns the remaining daily spending limit of the account\"}", + "id": 752, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 741, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "7946:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 740, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7946:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7945:17:4" + }, + "payable": false, + "returnParameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 744, + "name": "spendingLimit", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "7984:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 743, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7984:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7983:20:4" + }, + "scope": 922, + "src": "7913:149:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 779, + "nodeType": "Block", + "src": "8709:194:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 771, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 754, + "src": "8754:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 772, + "name": "bpsRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "8764:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 769, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "8734:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFxUSDBPSRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4542, + "src": "8734:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8734:38:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742046582055534420626173697320706f696e747320726174652e20506c6561736520656e73757265206973737565724669726d20697320617574686f72697a6564", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8782:87:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb75f554926078abd19b386958c530b812c30dcf00b22d8f88e84ef51c06cb71", + "typeString": "literal_string \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"" + }, + "value": "Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb75f554926078abd19b386958c530b812c30dcf00b22d8f88e84ef51c06cb71", + "typeString": "literal_string \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"" + } + ], + "id": 768, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8717:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8717:160:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 776, + "nodeType": "ExpressionStatement", + "src": "8717:160:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8892:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 767, + "id": 778, + "nodeType": "Return", + "src": "8885:11:4" + } + ] + }, + "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev NOTE: This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@param issuerFirm Firm setting the foreign currency exchange\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 780, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 761, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 758, + "src": "8662:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 762, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "8674:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8674:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 764, + "modifierName": { + "argumentTypes": null, + "id": 760, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "8648:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8648:37:4" + } + ], + "name": "setFxBpsRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 754, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8591:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 753, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8591:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 756, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8608:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 755, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8608:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 758, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8622:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 757, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8622:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8590:50:4" + }, + "payable": false, + "returnParameters": { + "id": 767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 766, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8695:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 765, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8695:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8694:14:4" + }, + "scope": 922, + "src": "8569:334:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 795, + "nodeType": "Block", + "src": "9304:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 791, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "9338:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 792, + "name": "fxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 784, + "src": "9348:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 789, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "9319:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFxUSDAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4621, + "src": "9319:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9319:38:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 788, + "id": 794, + "nodeType": "Return", + "src": "9312:45:4" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", + "id": 796, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 782, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9235:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 781, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9235:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 784, + "name": "fxAmount", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9252:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 783, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9252:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9234:32:4" + }, + "payable": false, + "returnParameters": { + "id": 788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 787, + "name": "usdAmount", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9288:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9288:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9287:16:4" + }, + "scope": 922, + "src": "9211:153:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 823, + "nodeType": "Block", + "src": "9854:334:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 815, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 798, + "src": "9995:15:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 816, + "name": "updatedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 800, + "src": "10012:14:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 813, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "9971:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setForwardedAccount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2260, + "src": "9971:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) returns (bool)" + } + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9971:56:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420666f72776172646564206164647265737320666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10039:111:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6961bf7e2117bb8ea6b863d500e7333e3944d065ba6c8fa1114eacec3e93704", + "typeString": "literal_string \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e6961bf7e2117bb8ea6b863d500e7333e3944d065ba6c8fa1114eacec3e93704", + "typeString": "literal_string \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 812, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "9952:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9952:208:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 820, + "nodeType": "ExpressionStatement", + "src": "9952:208:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10177:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 811, + "id": 822, + "nodeType": "Return", + "src": "10170:11:4" + } + ] + }, + "documentation": "@notice Updates to new forwarded account\n@param originalAccount [address]\n@param updatedAccount [address]\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 824, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 802, + "src": "9807:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 806, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "9819:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9819:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 808, + "modifierName": { + "argumentTypes": null, + "id": 804, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "9793:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9793:37:4" + } + ], + "name": "approveForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 798, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9718:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9718:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 800, + "name": "updatedAccount", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9743:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 799, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9743:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 802, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9767:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 801, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9767:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9717:68:4" + }, + "payable": false, + "returnParameters": { + "id": 811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 810, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9840:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 809, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9840:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9839:14:4" + }, + "scope": 922, + "src": "9685:503:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 863, + "nodeType": "Block", + "src": "10708:420:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 845, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "10755:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 843, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "10737:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "verifyAccount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3062, + "src": "10737:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10737:26:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656421", + "id": 847, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10775:33:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a5e279d14000afe880d344db24ac101f5a640f2f3904eb122eb002d05df8832c", + "typeString": "literal_string \"Error: Account is not verified!\"" + }, + "value": "Error: Account is not verified!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a5e279d14000afe880d344db24ac101f5a640f2f3904eb122eb002d05df8832c", + "typeString": "literal_string \"Error: Account is not verified!\"" + } + ], + "id": 842, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "10718:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10718:100:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 849, + "nodeType": "ExpressionStatement", + "src": "10718:100:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 853, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "10949:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 854, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "10959:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 855, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "10968:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 856, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "10976:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 851, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "10937:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 3635, + "src": "10937:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10937:50:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f206465706f7369742066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10999:91:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 850, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "10918:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10918:182:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 860, + "nodeType": "ExpressionStatement", + "src": "10918:182:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11117:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 841, + "id": 862, + "nodeType": "Return", + "src": "11110:11:4" + } + ] + }, + "documentation": "@notice Issues a specified account to recipient account of a given currency\n@param currency [string] currency symbol\n@param amount [uint] issuance amount\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 864, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 835, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "10661:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "10673:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10673:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 838, + "modifierName": { + "argumentTypes": null, + "id": 834, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "10647:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10647:37:4" + } + ], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 833, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 826, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10574:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 825, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10574:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 828, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10591:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10591:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 830, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10608:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 829, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10608:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 832, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10621:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 831, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10621:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10573:66:4" + }, + "payable": false, + "returnParameters": { + "id": 841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 840, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "10694:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 839, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10694:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10693:14:4" + }, + "scope": 922, + "src": "10557:571:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 903, + "nodeType": "Block", + "src": "11680:462:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 885, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 868, + "src": "11727:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 883, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "11709:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "verifyAccount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3062, + "src": "11709:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11709:26:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656421", + "id": 887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11747:33:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a5e279d14000afe880d344db24ac101f5a640f2f3904eb122eb002d05df8832c", + "typeString": "literal_string \"Error: Account is not verified!\"" + }, + "value": "Error: Account is not verified!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a5e279d14000afe880d344db24ac101f5a640f2f3904eb122eb002d05df8832c", + "typeString": "literal_string \"Error: Account is not verified!\"" + } + ], + "id": 882, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "11690:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11690:100:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 889, + "nodeType": "ExpressionStatement", + "src": "11690:100:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 893, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "11918:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 894, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 868, + "src": "11928:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 895, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 870, + "src": "11937:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 896, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "11945:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 891, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "11905:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 892, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 3746, + "src": "11905:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11905:51:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2077697468647261772066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f7269747920617265207265676973746572656420616e642068617665206973737565642066756e647320746861742063616e2062652077697468647261776e", + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11968:136:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6e626bbbdfa2315c15e2b539714496598c6d0294b7989222c4553c1a4a17622", + "typeString": "literal_string \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"" + }, + "value": "Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d6e626bbbdfa2315c15e2b539714496598c6d0294b7989222c4553c1a4a17622", + "typeString": "literal_string \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"" + } + ], + "id": 890, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "11886:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11886:228:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "11886:228:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12131:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 881, + "id": 902, + "nodeType": "Return", + "src": "12124:11:4" + } + ] + }, + "documentation": "@notice Withdraws a specified amount of tokens of a given currency\n@param currency Currency symbol\n@param account Ethereum address of account holder\n@param amount Issuance amount\n@param issuerFirm Name of the issuer firm with authority on account holder\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 904, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 875, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "11633:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "11645:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11645:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 878, + "modifierName": { + "argumentTypes": null, + "id": 874, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "11619:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11619:37:4" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 866, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11546:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 865, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11546:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 868, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11563:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11563:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 870, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11580:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 869, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11580:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 872, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11593:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 871, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11593:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11545:66:4" + }, + "payable": false, + "returnParameters": { + "id": 881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 880, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 904, + "src": "11666:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 879, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11666:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11665:14:4" + }, + "scope": 922, + "src": "11528:614:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 920, + "nodeType": "Block", + "src": "12409:254:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "12543:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 914, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 908, + "src": "12553:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 911, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "12520:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 912, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3932, + "src": "12520:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12520:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a206973737565724669726d20616e642f6f72206669726d20617574686f7269747920617265206e6f742072656769737465726564", + "id": 916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12575:60:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_462b4c77bf54838ec38a464948b1a941796aa7d982a63221057f242b5bb9741d", + "typeString": "literal_string \"Error: issuerFirm and/or firm authority are not registered\"" + }, + "value": "Error: issuerFirm and/or firm authority are not registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_462b4c77bf54838ec38a464948b1a941796aa7d982a63221057f242b5bb9741d", + "typeString": "literal_string \"Error: issuerFirm and/or firm authority are not registered\"" + } + ], + "id": 910, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "12501:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12501:144:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 918, + "nodeType": "ExpressionStatement", + "src": "12501:144:4" + }, + { + "id": 919, + "nodeType": "PlaceholderStatement", + "src": "12655:1:4" + } + ] + }, + "documentation": "@notice Ensure only authorized currency firms and authorities can modify protected methods\n@dev authority must be registered to an authorized firm to use protected methods", + "id": 921, + "name": "onlyAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 909, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 906, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 921, + "src": "12373:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 905, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12373:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 908, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 921, + "src": "12390:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12390:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12372:36:4" + }, + "src": "12350:313:4", + "visibility": "internal" + } + ], + "scope": 923, + "src": "889:11777:4" + } + ], + "src": "0:12667:4" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x768bcf023aa517054a0349939069802a006ce350", + "transactionHash": "0x8e118b66ccaf743981c281fd7ba96ccee443d525ef2f0d0c3d308bc2583a10e1" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.604Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIOERC20.json b/deployed/mainnet/TokenIOERC20.json new file mode 100644 index 0000000..028fe13 --- /dev/null +++ b/deployed/mainnet/TokenIOERC20.json @@ -0,0 +1,12502 @@ +{ + "contractName": "TokenIOERC20", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_tla", + "type": "string" + }, + { + "name": "_version", + "type": "string" + }, + { + "name": "_decimals", + "type": "uint256" + }, + { + "name": "_feeContract", + "type": "address" + }, + { + "name": "_fxUSDBPSRate", + "type": "uint256" + } + ], + "name": "setParams", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "_name", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "_symbol", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "tla", + "outputs": [ + { + "name": "_tla", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "version", + "outputs": [ + { + "name": "_version", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "_decimals", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getFeeParams", + "outputs": [ + { + "name": "bps", + "type": "uint256" + }, + { + "name": "min", + "type": "uint256" + }, + { + "name": "max", + "type": "uint256" + }, + { + "name": "flat", + "type": "uint256" + }, + { + "name": "feeMsg", + "type": "bytes" + }, + { + "name": "feeAccount", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateFees", + "outputs": [ + { + "name": "fees", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deprecateInterface", + "outputs": [ + { + "name": "deprecated", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051602080615539833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a0390941693909317835581541690911790556154c390819061007690396000f3006080604052600436106100ed5763ffffffff60e060020a60003504166306fdde0381146100f2578063095ea7b31461017c57806318160ddd146101b457806323b872dd146101db578063313ce567146102055780634bbc142c1461021a57806352238fdd1461023b57806354fd4d5014610253578063666a342714610268578063666e1b39146102895780636b0235a0146102aa57806370a08231146102bf57806395d89b41146102e0578063a9059cbb146102f5578063be6fc18114610319578063dd62ed3e146103db578063e052f0c814610402578063ebe6ba071461052a578063f2fde38b1461053f575b600080fd5b3480156100fe57600080fd5b50610107610560565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610141578181015183820152602001610129565b50505050905090810190601f16801561016e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018857600080fd5b506101a0600160a060020a0360043516602435610578565b604080519115158252519081900360200190f35b3480156101c057600080fd5b506101c96106e9565b60408051918252519081900360200190f35b3480156101e757600080fd5b506101a0600160a060020a036004358116906024351660443561070d565b34801561021157600080fd5b506101c9610842565b34801561022657600080fd5b506101a0600160a060020a0360043516610866565b34801561024757600080fd5b506101c9600435610922565b34801561025f57600080fd5b5061010761094d565b34801561027457600080fd5b506101a0600160a060020a0360043516610960565b34801561029557600080fd5b506101a0600160a060020a0360043516610a19565b3480156102b657600080fd5b50610107610a2e565b3480156102cb57600080fd5b506101c9600160a060020a0360043516610a41565b3480156102ec57600080fd5b50610107610a66565b34801561030157600080fd5b506101a0600160a060020a0360043516602435610a79565b34801561032557600080fd5b5061032e610bde565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b8381101561039b578181015183820152602001610383565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3480156103e757600080fd5b506101c9600160a060020a0360043581169060243516610c63565b34801561040e57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101a094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975050843595505050506020820135600160a060020a031691604001359050610c90565b34801561053657600080fd5b506101a061110c565b34801561054b57600080fd5b506101a0600160a060020a0360043516611209565b606061057360013063ffffffff61134316565b905090565b600061058b60013063ffffffff6114f816565b15610606576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b6106186001848463ffffffff61164b16565b15156106e0576040805160e560020a62461bcd02815260206004820152607560248201527f4572726f723a20556e61626c6520746f20617070726f766520616c6c6f77616e60448201527f636520666f72207370656e6465722e20506c6561736520656e7375726520737060648201527f656e646572206973206e6f74206e756c6c20616e6420646f6573206e6f74206860848201527f61766520612066726f7a656e2062616c616e63652e000000000000000000000060a482015290519081900360c40190fd5b50600192915050565b60006105736106ff60013063ffffffff611d1c16565b60019063ffffffff611dae16565b600061072060013063ffffffff6114f816565b1561079b576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b6107f86107af60013063ffffffff611d1c16565b60408051808201909152600381527f307830000000000000000000000000000000000000000000000000000000000060208201526001919087908790879063ffffffff611ee616565b15156108385760405160e560020a62461bcd0281526004018080602001828103825260828152602001806153766082913960a00191505060405180910390fd5b5060019392505050565b600061057361085860013063ffffffff611d1c16565b60019063ffffffff6121ce16565b3360009081526020819052604081205460ff1615156108d1576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600061094761093860013063ffffffff61222b16565b6001908463ffffffff6123a616565b92915050565b606061057360013063ffffffff61289716565b3360009081526020819052604081205460ff1615156109cb576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b606061057360013063ffffffff61292916565b6000610947610a5760013063ffffffff611d1c16565b6001908463ffffffff6129bb16565b606061057360013063ffffffff611d1c16565b6000610a8c60013063ffffffff6114f816565b15610b07576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b610b62610b1b60013063ffffffff611d1c16565b60408051808201909152600381527f30783000000000000000000000000000000000000000000000000000000000006020820152600191908690869063ffffffff612b3f16565b15156106e0576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732e60448201527f20506c6561736520636865636b20796f757220706172616d65746572732e0000606482015290519081900360840190fd5b600080808060608180610bf860013063ffffffff61222b16565b9050610c0b60018263ffffffff612e0416565b610c1c60018363ffffffff612e9516565b610c2d60018463ffffffff612f2616565b610c3e60018563ffffffff612fb716565b610c4f60018663ffffffff61304816565b939b929a5090985096509094509092509050565b6000610c89610c7960013063ffffffff611d1c16565b600190858563ffffffff61316b16565b9392505050565b3360009081526020819052604081205460ff161515610cfb576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b610d0c60018963ffffffff61332b16565b1515610d88576040805160e560020a62461bcd02815260206004820152603860248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e206e616d652e60448201527f20506c6561736520636865636b20617267756d656e74732e0000000000000000606482015290519081900360840190fd5b610d9960018863ffffffff61358416565b1515610e15576040805160e560020a62461bcd02815260206004820152603a60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e2073796d626f60448201527f6c2e20506c6561736520636865636b20617267756d656e74732e000000000000606482015290519081900360840190fd5b610e2660018763ffffffff6135ff16565b1515610ea2576040805160e560020a62461bcd02815260206004820152603760248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20544c412e2060448201527f506c6561736520636865636b20617267756d656e74732e000000000000000000606482015290519081900360840190fd5b610eb360018663ffffffff61367d16565b1515610f2f576040805160e560020a62461bcd02815260206004820152603b60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20766572736960448201527f6f6e2e20506c6561736520636865636b20617267756d656e74732e0000000000606482015290519081900360840190fd5b610f416001888663ffffffff6136fb16565b1515610fbd576040805160e560020a62461bcd02815260206004820152603c60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20646563696d60448201527f616c732e20506c6561736520636865636b20617267756d656e74732e00000000606482015290519081900360840190fd5b610fce60018463ffffffff61392716565b151561104a576040805160e560020a62461bcd02815260206004820152603a60248201527f4572726f723a20556e61626c6520746f207365742066656520636f6e7472616360448201527f742e20506c6561736520636865636b20617267756d656e74732e000000000000606482015290519081900360840190fd5b61105c6001888463ffffffff613a3c16565b15156110fe576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a20556e61626c6520746f2073657420667820555344206261736960448201527f7320706f696e747320726174652e20506c6561736520636865636b206172677560648201527f6d656e74732e0000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b506001979650505050505050565b3360009081526020819052604081205460ff161515611177576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b61118860013063ffffffff613c2316565b1515611203576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e61626c6520746f2064657072656361746520636f6e747260448201527f6163742100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600190565b3360009081526020819052604081205460ff161515611274576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a03821615156112d4576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b606060008260405160200180807f746f6b656e2e6e616d6500000000000000000000000000000000000000000000815250600a0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106113d65780518252601f1990920191602091820191016113b7565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547f986e791a000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063986e791a9350602480820193600093509182900301818387803b15801561146657600080fd5b505af115801561147a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156114a357600080fd5b8101908080516401000000008111156114bb57600080fd5b820160208101848111156114ce57600080fd5b81516401000000008111828201871017156114e857600080fd5b50909550505050505b5092915050565b6000808260405160200180807f6465706372656361746564000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061158a5780518252601f19909201916020918201910161156b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b505050506040513d602081101561164157600080fd5b5051949350505050565b600060608180600160a060020a03861615156116d7576040805160e560020a62461bcd02815260206004820152602860248201527f4572726f723a20607370656e6465726020616464726573732063616e6e6f742060448201527f6265206e756c6c2e000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6116e18730611d1c565b92506116f787846116f28a8a613dc3565b613f31565b15611772576040805160e560020a62461bcd02815260206004820152603660248201527f4572726f723a205370656e646572206d757374206e6f7420686176652061206660448201527f726f7a656e2062616c616e6365206469726563746c7900000000000000000000606482015290519081900360840190fd5b8261177d8833613dc3565b6117878989613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b602083106117e15780518252601f1990920191602091820191016117c2565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b602083106118825780518252601f199092019160209182019101611863565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150826118bc8833613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b602083106119045780518252601f1990920191602091820191016118e5565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106119865780518252601f199092019160209182019101611967565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208d5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b1580156119fd57600080fd5b505af1158015611a11573d6000803e3d6000fd5b505050506040513d6020811015611a2757600080fd5b50511580611a33575084155b1515611ad5576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283060448201527f29206265666f72652073657474696e6720616e207570646174656420616c6c6f60648201527f77616e636520666f72207370656e6465722e0000000000000000000000000000608482015290519081900360a40190fd5b86546040805160e060020a63bd02d0f50281526004810184905290518792600160a060020a03169163bd02d0f59160248083019260209291908290030181600087803b158015611b2457600080fd5b505af1158015611b38573d6000803e3d6000fd5b505050506040513d6020811015611b4e57600080fd5b50511015611bcc576040805160e560020a62461bcd02815260206004820152603860248201527f4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d60448201527f73672e73656e64657220746f6b656e2062616c616e63652e0000000000000000606482015290519081900360840190fd5b86546040805160e160020a637152429d02815260048101859052602481018890529051600160a060020a039092169163e2a4853a916044808201926020929091908290030181600087803b158015611c2357600080fd5b505af1158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b50511515611ccf576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b604080518681529051600160a060020a0388169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a35060019695505050505050565b606060008260405160200180807f746f6b656e2e73796d626f6c0000000000000000000000000000000000000000815250600c0182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b6000808260405160200180807f746f6b656e2e737570706c790000000000000000000000000000000000000000815250600c0182805190602001908083835b60208310611e0c5780518252601f199092019160209182019101611ded565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310611e6f5780518252601f199092019160209182019101611e50565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561161757600080fd5b60008080600160a060020a0386161515611f70576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b611f7a893061222b565b9150611f878983876123a6565b9050611f9e8988611f998c8c8a613f98565b614030565b151561201a576040805160e560020a62461bcd02815260206004820152602d60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073706560448201527f6e64696e6720616d6f756e742e00000000000000000000000000000000000000606482015290519081900360840190fd5b61202889898989898961435e565b15156120a4576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b6120bb89898985856120b68f89613048565b61435e565b1515612137576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b61214389898988614a26565b15156121bf576040805160e560020a62461bcd02815260206004820152602e60248201527f4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e6360448201527f6520666f72207370656e6465722e000000000000000000000000000000000000606482015290519081900360840190fd5b50600198975050505050505050565b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e01828051906020019080838360208310611e0c5780518252601f199092019160209182019101611ded565b60008060008360405160200180807f6665652e6163636f756e74000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122bf5780518252601f1990920191602091820191016122a0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561234c57600080fd5b505af1158015612360573d6000803e3d6000fd5b505050506040513d602081101561237657600080fd5b50519050600160a060020a038116151561239a5761239385614cb0565b925061239e565b8092505b505092915050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b602083106124415780518252601f199092019160209182019101612422565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156124a257600080fd5b505af11580156124b6573d6000803e3d6000fd5b505050506040513d60208110156124cc57600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b602083106125625780518252601f199092019160209182019101612543565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156125c357600080fd5b505af11580156125d7573d6000803e3d6000fd5b505050506040513d60208110156125ed57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106126835780518252601f199092019160209182019101612664565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156126e457600080fd5b505af11580156126f8573d6000803e3d6000fd5b505050506040513d602081101561270e57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106127a45780518252601f199092019160209182019101612785565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561280557600080fd5b505af1158015612819573d6000803e3d6000fd5b505050506040513d602081101561282f57600080fd5b505191506128658261285961271061284d8b8863ffffffff614de216565b9063ffffffff614e8116565b9063ffffffff614e9816565b9050848111156128775784955061288b565b838110156128875783955061288b565b8095505b50505050509392505050565b606060008260405160200180807f746f6b656e2e76657273696f6e00000000000000000000000000000000000000815250600d0182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b606060008260405160200180807f746f6b656e2e746c61000000000000000000000000000000000000000000000081525060090182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b600080836129c98685613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b60208310612a115780518252601f1990920191602091820191016129f2565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310612a935780518252601f199092019160209182019101612a74565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015612b0a57600080fd5b505af1158015612b1e573d6000803e3d6000fd5b505050506040513d6020811015612b3457600080fd5b505195945050505050565b60008080600160a060020a0386161515612bc9576040805160e560020a62461bcd02815260206004820152602360248201527f4572726f723a2060746f6020616464726573732063616e6e6f74206265206e7560448201527f6c6c2e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008511612c47576040805160e560020a62461bcd02815260206004820152602960248201527f4572726f723a2060616d6f756e7460206d75737420626520677265617465722060448201527f7468616e207a65726f0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b612c51883061222b565b9150612c5e8883876123a6565b9050612c708833611f998b8b8a613f98565b1515612cec576040805160e560020a62461bcd02815260206004820152603160248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d60448201527f6f756e7420666f72206163636f756e742e000000000000000000000000000000606482015290519081900360840190fd5b612cfa88883389898961435e565b1515612d76576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b612d8888883385856120b68e89613048565b15156110fe576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106130db5780518252601f1990920191602091820191016130bc565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b15801561146657600080fd5b600080846131798786613dc3565b6131838886613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b602083106131dd5780518252601f1990920191602091820191016131be565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b6020831061327e5780518252601f19909201916020918201910161325f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b1580156132f557600080fd5b505af1158015613309573d6000803e3d6000fd5b505050506040513d602081101561331f57600080fd5b50519695505050505050565b604080517f746f6b656e2e6e616d6500000000000000000000000000000000000000000000602080830191909152606060020a3002602a8301528251601e818403018152603e909201928390528151600093849392909182918401908083835b602083106133aa5780518252601f19909201916020918201910161338b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f6e89955000000000000000000000000000000000000000000000000000000000845260048401828152602485019687528b5160448601528b51929950600160a060020a039091169750636e899550965088958b9550909390926064909101919085019080838360005b8381101561345557818101518382015260200161343d565b50505050905090810190601f1680156134825780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156134a257600080fd5b505af11580156134b6573d6000803e3d6000fd5b505050506040513d60208110156134cc57600080fd5b50511515610838576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b604080517f746f6b656e2e73796d626f6c0000000000000000000000000000000000000000602080830191909152606060020a3002602c83015282518083038201815291830192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b604080517f746f6b656e2e746c610000000000000000000000000000000000000000000000602080830191909152606060020a300260298301528251601d818403018152603d90920192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b604080517f746f6b656e2e76657273696f6e00000000000000000000000000000000000000602080830191909152606060020a3002602d83015282516021818403018152604190920192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b6000808360405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e0182805190602001908083835b602083106137595780518252601f19909201916020918201910161373a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106137bc5780518252601f19909201916020918201910161379d565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e160020a637152429d02845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b15801561383a57600080fd5b505af115801561384e573d6000803e3d6000fd5b505050506040513d602081101561386457600080fd5b5051151561391c576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b604080517f6665652e6163636f756e74000000000000000000000000000000000000000000602080830191909152606060020a3002602b8301528251601f818403018152603f909201928390528151600093849392909182918401908083835b602083106139a65780518252601f199092019160209182019101613987565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b1580156134a257600080fd5b6000808360405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b0182805190602001908083835b60208310613a9a5780518252601f199092019160209182019101613a7b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310613afd5780518252601f199092019160209182019101613ade565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e160020a637152429d02845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015613b7b57600080fd5b505af1158015613b8f573d6000803e3d6000fd5b505050506040513d6020811015613ba557600080fd5b5051151561391c576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b600080600160a060020a0383161515613cac576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a2063616e6e6f74206465707265636174652061206e756c6c206160448201527f6464726573732e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080517f6465706372656361746564000000000000000000000000000000000000000000602080830191909152606060020a600160a060020a03871602602b8301528251601f818403018152603f90920192839052815191929182918401908083835b60208310613d2f5780518252601f199092019160209182019101613d10565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fabfdcced00000000000000000000000000000000000000000000000000000000845260048401829052600160248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b1580156134a257600080fd5b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613e575780518252601f199092019160209182019101613e38565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015613ee457600080fd5b505af1158015613ef8573d6000803e3d6000fd5b505050506040513d6020811015613f0e57600080fd5b50519050600160a060020a03811615613f295780925061239e565b83925061239e565b60008083613f3f8685613dc3565b60405160200180807f746f6b656e2e66726f7a656e0000000000000000000000000000000000000000815250600c01838051906020019080838360208310612a115780518252601f1990920191602091820191016129f2565b600080600080613fdd876040805190810160405280600481526020017f55534478000000000000000000000000000000000000000000000000000000008152506121ce565b9250613fe987876121ce565b915061402582600a0a61284d85600a0a61401961271061284d61400c8e8e614f1b565b8c9063ffffffff614de216565b9063ffffffff614de216565b979650505050505050565b600080600061403f8686614f78565b15156140bb576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6140c984612859888861505b565b9150816140d687876150fd565b1015614152576040805160e560020a62461bcd02815260206004820152603360248201527f4572726f723a204163636f756e742063616e6e6f74206578636565642069747360448201527f206461696c79207370656e64206c696d69742e00000000000000000000000000606482015290519081900360840190fd5b8461415d878761518e565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106141f25780518252601f1990920191602091820191016141d3565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e160020a637152429d02845260048401829052602484018a90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b15801561427057600080fd5b505af1158015614284573d6000803e3d6000fd5b505050506040513d602081101561429a57600080fd5b50511515614352576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b50600195945050505050565b60008080600160a060020a03861615156143e8576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876143f38a89613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b6020831061443b5780518252601f19909201916020918201910161441c565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106144bd5780518252601f19909201916020918201910161449e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150876144f78a88613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b6020831061453f5780518252601f199092019160209182019101614520565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106145c15780518252601f1990920191602091820191016145a2565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063e2a4853a9450879361467c93508b92879263bd02d0f5926024808401938290030181600087803b15801561464457600080fd5b505af1158015614658573d6000803e3d6000fd5b505050506040513d602081101561466e57600080fd5b50519063ffffffff61521f16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156146c457600080fd5b505af11580156146d8573d6000803e3d6000fd5b505050506040513d60208110156146ee57600080fd5b50511515614770576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a918491614807918a91869163bd02d0f59160248083019260209291908290030181600087803b1580156147cf57600080fd5b505af11580156147e3573d6000803e3d6000fd5b505050506040513d60208110156147f957600080fd5b50519063ffffffff614e9816565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561484f57600080fd5b505af1158015614863573d6000803e3d6000fd5b505050506040513d602081101561487957600080fd5b505115156148fb576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561497a578181015183820152602001614962565b50505050905090810190601f1680156149a75780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156149da5781810151838201526020016149c2565b50505050905090810190601f168015614a075780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b60008084614a348786613dc3565b614a3e8833613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b60208310614a985780518252601f199092019160209182019101614a79565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b60208310614b395780518252601f199092019160209182019101614b1a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063e2a4853a94508693614bbc93508992879263bd02d0f5926024808401938290030181600087803b15801561464457600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015614c0457600080fd5b505af1158015614c18573d6000803e3d6000fd5b505050506040513d6020811015614c2e57600080fd5b50511515614352576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b60208310614d225780518252601f199092019160209182019101614d03565b51815160209384036101000a60001901801990921691161790526040805192909401829003822089547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015614daf57600080fd5b505af1158015614dc3573d6000803e3d6000fd5b505050506040513d6020811015614dd957600080fd5b50519392505050565b600080831515614df557600091506114f1565b50828202828482811515614e0557fe5b0414610c89576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808284811515614e8f57fe5b04949350505050565b600082820183811015610c89576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b01828051906020019080838360208310611e0c5780518252601f199092019160209182019101611ded565b6000806000614f87858561518e565b915042821115614f9a576001925061239e565b5062015180614fd68585614fd1614fc48561401960016128598361284d428d63ffffffff61521f16565b869063ffffffff614e9816565b6152a4565b1515615052576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6001925061239e565b60008082615069858561518e565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a0281526014018281526020019250505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b60008282111561529e576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106137bc5780518252601f19909201916020918201910161379d560020616c6c6f7765642062792074686520636f6e74726163742e00000000000000746f6b656e2e62616c616e6365000000000000000000000000000000000000004572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d657465727320616e6420656e7375726520746865207370656e646572206861732074686520617070726f76656420616d6f756e74206f662066756e647320746f207472616e736665722e6c6c6f776564207065726d697373696f6e7320776974682073746f726167652075652e20506c6561736520656e7375726520636f6e74726163742068617320614572726f723a20556e61626c6520746f207365742073746f726167652076616c636f6e74726163742e00000000000000000000000000000000000000000000004572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a723058207cce3078f9e1d6ccbd29221a1b29da975e1ee315480c0b1b3e064c66dc6348ec0029", + "deployedBytecode": "0x6080604052600436106100ed5763ffffffff60e060020a60003504166306fdde0381146100f2578063095ea7b31461017c57806318160ddd146101b457806323b872dd146101db578063313ce567146102055780634bbc142c1461021a57806352238fdd1461023b57806354fd4d5014610253578063666a342714610268578063666e1b39146102895780636b0235a0146102aa57806370a08231146102bf57806395d89b41146102e0578063a9059cbb146102f5578063be6fc18114610319578063dd62ed3e146103db578063e052f0c814610402578063ebe6ba071461052a578063f2fde38b1461053f575b600080fd5b3480156100fe57600080fd5b50610107610560565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610141578181015183820152602001610129565b50505050905090810190601f16801561016e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018857600080fd5b506101a0600160a060020a0360043516602435610578565b604080519115158252519081900360200190f35b3480156101c057600080fd5b506101c96106e9565b60408051918252519081900360200190f35b3480156101e757600080fd5b506101a0600160a060020a036004358116906024351660443561070d565b34801561021157600080fd5b506101c9610842565b34801561022657600080fd5b506101a0600160a060020a0360043516610866565b34801561024757600080fd5b506101c9600435610922565b34801561025f57600080fd5b5061010761094d565b34801561027457600080fd5b506101a0600160a060020a0360043516610960565b34801561029557600080fd5b506101a0600160a060020a0360043516610a19565b3480156102b657600080fd5b50610107610a2e565b3480156102cb57600080fd5b506101c9600160a060020a0360043516610a41565b3480156102ec57600080fd5b50610107610a66565b34801561030157600080fd5b506101a0600160a060020a0360043516602435610a79565b34801561032557600080fd5b5061032e610bde565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b8381101561039b578181015183820152602001610383565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3480156103e757600080fd5b506101c9600160a060020a0360043581169060243516610c63565b34801561040e57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101a094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975050843595505050506020820135600160a060020a031691604001359050610c90565b34801561053657600080fd5b506101a061110c565b34801561054b57600080fd5b506101a0600160a060020a0360043516611209565b606061057360013063ffffffff61134316565b905090565b600061058b60013063ffffffff6114f816565b15610606576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b6106186001848463ffffffff61164b16565b15156106e0576040805160e560020a62461bcd02815260206004820152607560248201527f4572726f723a20556e61626c6520746f20617070726f766520616c6c6f77616e60448201527f636520666f72207370656e6465722e20506c6561736520656e7375726520737060648201527f656e646572206973206e6f74206e756c6c20616e6420646f6573206e6f74206860848201527f61766520612066726f7a656e2062616c616e63652e000000000000000000000060a482015290519081900360c40190fd5b50600192915050565b60006105736106ff60013063ffffffff611d1c16565b60019063ffffffff611dae16565b600061072060013063ffffffff6114f816565b1561079b576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b6107f86107af60013063ffffffff611d1c16565b60408051808201909152600381527f307830000000000000000000000000000000000000000000000000000000000060208201526001919087908790879063ffffffff611ee616565b15156108385760405160e560020a62461bcd0281526004018080602001828103825260828152602001806153766082913960a00191505060405180910390fd5b5060019392505050565b600061057361085860013063ffffffff611d1c16565b60019063ffffffff6121ce16565b3360009081526020819052604081205460ff1615156108d1576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600061094761093860013063ffffffff61222b16565b6001908463ffffffff6123a616565b92915050565b606061057360013063ffffffff61289716565b3360009081526020819052604081205460ff1615156109cb576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b606061057360013063ffffffff61292916565b6000610947610a5760013063ffffffff611d1c16565b6001908463ffffffff6129bb16565b606061057360013063ffffffff611d1c16565b6000610a8c60013063ffffffff6114f816565b15610b07576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b610b62610b1b60013063ffffffff611d1c16565b60408051808201909152600381527f30783000000000000000000000000000000000000000000000000000000000006020820152600191908690869063ffffffff612b3f16565b15156106e0576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732e60448201527f20506c6561736520636865636b20796f757220706172616d65746572732e0000606482015290519081900360840190fd5b600080808060608180610bf860013063ffffffff61222b16565b9050610c0b60018263ffffffff612e0416565b610c1c60018363ffffffff612e9516565b610c2d60018463ffffffff612f2616565b610c3e60018563ffffffff612fb716565b610c4f60018663ffffffff61304816565b939b929a5090985096509094509092509050565b6000610c89610c7960013063ffffffff611d1c16565b600190858563ffffffff61316b16565b9392505050565b3360009081526020819052604081205460ff161515610cfb576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b610d0c60018963ffffffff61332b16565b1515610d88576040805160e560020a62461bcd02815260206004820152603860248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e206e616d652e60448201527f20506c6561736520636865636b20617267756d656e74732e0000000000000000606482015290519081900360840190fd5b610d9960018863ffffffff61358416565b1515610e15576040805160e560020a62461bcd02815260206004820152603a60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e2073796d626f60448201527f6c2e20506c6561736520636865636b20617267756d656e74732e000000000000606482015290519081900360840190fd5b610e2660018763ffffffff6135ff16565b1515610ea2576040805160e560020a62461bcd02815260206004820152603760248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20544c412e2060448201527f506c6561736520636865636b20617267756d656e74732e000000000000000000606482015290519081900360840190fd5b610eb360018663ffffffff61367d16565b1515610f2f576040805160e560020a62461bcd02815260206004820152603b60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20766572736960448201527f6f6e2e20506c6561736520636865636b20617267756d656e74732e0000000000606482015290519081900360840190fd5b610f416001888663ffffffff6136fb16565b1515610fbd576040805160e560020a62461bcd02815260206004820152603c60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20646563696d60448201527f616c732e20506c6561736520636865636b20617267756d656e74732e00000000606482015290519081900360840190fd5b610fce60018463ffffffff61392716565b151561104a576040805160e560020a62461bcd02815260206004820152603a60248201527f4572726f723a20556e61626c6520746f207365742066656520636f6e7472616360448201527f742e20506c6561736520636865636b20617267756d656e74732e000000000000606482015290519081900360840190fd5b61105c6001888463ffffffff613a3c16565b15156110fe576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a20556e61626c6520746f2073657420667820555344206261736960448201527f7320706f696e747320726174652e20506c6561736520636865636b206172677560648201527f6d656e74732e0000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b506001979650505050505050565b3360009081526020819052604081205460ff161515611177576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b61118860013063ffffffff613c2316565b1515611203576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e61626c6520746f2064657072656361746520636f6e747260448201527f6163742100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600190565b3360009081526020819052604081205460ff161515611274576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a03821615156112d4576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b606060008260405160200180807f746f6b656e2e6e616d6500000000000000000000000000000000000000000000815250600a0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106113d65780518252601f1990920191602091820191016113b7565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547f986e791a000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063986e791a9350602480820193600093509182900301818387803b15801561146657600080fd5b505af115801561147a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156114a357600080fd5b8101908080516401000000008111156114bb57600080fd5b820160208101848111156114ce57600080fd5b81516401000000008111828201871017156114e857600080fd5b50909550505050505b5092915050565b6000808260405160200180807f6465706372656361746564000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061158a5780518252601f19909201916020918201910161156b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b505050506040513d602081101561164157600080fd5b5051949350505050565b600060608180600160a060020a03861615156116d7576040805160e560020a62461bcd02815260206004820152602860248201527f4572726f723a20607370656e6465726020616464726573732063616e6e6f742060448201527f6265206e756c6c2e000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6116e18730611d1c565b92506116f787846116f28a8a613dc3565b613f31565b15611772576040805160e560020a62461bcd02815260206004820152603660248201527f4572726f723a205370656e646572206d757374206e6f7420686176652061206660448201527f726f7a656e2062616c616e6365206469726563746c7900000000000000000000606482015290519081900360840190fd5b8261177d8833613dc3565b6117878989613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b602083106117e15780518252601f1990920191602091820191016117c2565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b602083106118825780518252601f199092019160209182019101611863565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150826118bc8833613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b602083106119045780518252601f1990920191602091820191016118e5565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106119865780518252601f199092019160209182019101611967565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208d5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b1580156119fd57600080fd5b505af1158015611a11573d6000803e3d6000fd5b505050506040513d6020811015611a2757600080fd5b50511580611a33575084155b1515611ad5576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283060448201527f29206265666f72652073657474696e6720616e207570646174656420616c6c6f60648201527f77616e636520666f72207370656e6465722e0000000000000000000000000000608482015290519081900360a40190fd5b86546040805160e060020a63bd02d0f50281526004810184905290518792600160a060020a03169163bd02d0f59160248083019260209291908290030181600087803b158015611b2457600080fd5b505af1158015611b38573d6000803e3d6000fd5b505050506040513d6020811015611b4e57600080fd5b50511015611bcc576040805160e560020a62461bcd02815260206004820152603860248201527f4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d60448201527f73672e73656e64657220746f6b656e2062616c616e63652e0000000000000000606482015290519081900360840190fd5b86546040805160e160020a637152429d02815260048101859052602481018890529051600160a060020a039092169163e2a4853a916044808201926020929091908290030181600087803b158015611c2357600080fd5b505af1158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b50511515611ccf576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b604080518681529051600160a060020a0388169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a35060019695505050505050565b606060008260405160200180807f746f6b656e2e73796d626f6c0000000000000000000000000000000000000000815250600c0182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b6000808260405160200180807f746f6b656e2e737570706c790000000000000000000000000000000000000000815250600c0182805190602001908083835b60208310611e0c5780518252601f199092019160209182019101611ded565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310611e6f5780518252601f199092019160209182019101611e50565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561161757600080fd5b60008080600160a060020a0386161515611f70576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b611f7a893061222b565b9150611f878983876123a6565b9050611f9e8988611f998c8c8a613f98565b614030565b151561201a576040805160e560020a62461bcd02815260206004820152602d60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073706560448201527f6e64696e6720616d6f756e742e00000000000000000000000000000000000000606482015290519081900360840190fd5b61202889898989898961435e565b15156120a4576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b6120bb89898985856120b68f89613048565b61435e565b1515612137576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b61214389898988614a26565b15156121bf576040805160e560020a62461bcd02815260206004820152602e60248201527f4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e6360448201527f6520666f72207370656e6465722e000000000000000000000000000000000000606482015290519081900360840190fd5b50600198975050505050505050565b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e01828051906020019080838360208310611e0c5780518252601f199092019160209182019101611ded565b60008060008360405160200180807f6665652e6163636f756e74000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122bf5780518252601f1990920191602091820191016122a0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561234c57600080fd5b505af1158015612360573d6000803e3d6000fd5b505050506040513d602081101561237657600080fd5b50519050600160a060020a038116151561239a5761239385614cb0565b925061239e565b8092505b505092915050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b602083106124415780518252601f199092019160209182019101612422565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156124a257600080fd5b505af11580156124b6573d6000803e3d6000fd5b505050506040513d60208110156124cc57600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b602083106125625780518252601f199092019160209182019101612543565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156125c357600080fd5b505af11580156125d7573d6000803e3d6000fd5b505050506040513d60208110156125ed57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106126835780518252601f199092019160209182019101612664565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156126e457600080fd5b505af11580156126f8573d6000803e3d6000fd5b505050506040513d602081101561270e57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106127a45780518252601f199092019160209182019101612785565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561280557600080fd5b505af1158015612819573d6000803e3d6000fd5b505050506040513d602081101561282f57600080fd5b505191506128658261285961271061284d8b8863ffffffff614de216565b9063ffffffff614e8116565b9063ffffffff614e9816565b9050848111156128775784955061288b565b838110156128875783955061288b565b8095505b50505050509392505050565b606060008260405160200180807f746f6b656e2e76657273696f6e00000000000000000000000000000000000000815250600d0182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b606060008260405160200180807f746f6b656e2e746c61000000000000000000000000000000000000000000000081525060090182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b600080836129c98685613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b60208310612a115780518252601f1990920191602091820191016129f2565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310612a935780518252601f199092019160209182019101612a74565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015612b0a57600080fd5b505af1158015612b1e573d6000803e3d6000fd5b505050506040513d6020811015612b3457600080fd5b505195945050505050565b60008080600160a060020a0386161515612bc9576040805160e560020a62461bcd02815260206004820152602360248201527f4572726f723a2060746f6020616464726573732063616e6e6f74206265206e7560448201527f6c6c2e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008511612c47576040805160e560020a62461bcd02815260206004820152602960248201527f4572726f723a2060616d6f756e7460206d75737420626520677265617465722060448201527f7468616e207a65726f0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b612c51883061222b565b9150612c5e8883876123a6565b9050612c708833611f998b8b8a613f98565b1515612cec576040805160e560020a62461bcd02815260206004820152603160248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d60448201527f6f756e7420666f72206163636f756e742e000000000000000000000000000000606482015290519081900360840190fd5b612cfa88883389898961435e565b1515612d76576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b612d8888883385856120b68e89613048565b15156110fe576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106130db5780518252601f1990920191602091820191016130bc565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b15801561146657600080fd5b600080846131798786613dc3565b6131838886613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b602083106131dd5780518252601f1990920191602091820191016131be565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b6020831061327e5780518252601f19909201916020918201910161325f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b1580156132f557600080fd5b505af1158015613309573d6000803e3d6000fd5b505050506040513d602081101561331f57600080fd5b50519695505050505050565b604080517f746f6b656e2e6e616d6500000000000000000000000000000000000000000000602080830191909152606060020a3002602a8301528251601e818403018152603e909201928390528151600093849392909182918401908083835b602083106133aa5780518252601f19909201916020918201910161338b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f6e89955000000000000000000000000000000000000000000000000000000000845260048401828152602485019687528b5160448601528b51929950600160a060020a039091169750636e899550965088958b9550909390926064909101919085019080838360005b8381101561345557818101518382015260200161343d565b50505050905090810190601f1680156134825780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156134a257600080fd5b505af11580156134b6573d6000803e3d6000fd5b505050506040513d60208110156134cc57600080fd5b50511515610838576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b604080517f746f6b656e2e73796d626f6c0000000000000000000000000000000000000000602080830191909152606060020a3002602c83015282518083038201815291830192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b604080517f746f6b656e2e746c610000000000000000000000000000000000000000000000602080830191909152606060020a300260298301528251601d818403018152603d90920192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b604080517f746f6b656e2e76657273696f6e00000000000000000000000000000000000000602080830191909152606060020a3002602d83015282516021818403018152604190920192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b6000808360405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e0182805190602001908083835b602083106137595780518252601f19909201916020918201910161373a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106137bc5780518252601f19909201916020918201910161379d565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e160020a637152429d02845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b15801561383a57600080fd5b505af115801561384e573d6000803e3d6000fd5b505050506040513d602081101561386457600080fd5b5051151561391c576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b604080517f6665652e6163636f756e74000000000000000000000000000000000000000000602080830191909152606060020a3002602b8301528251601f818403018152603f909201928390528151600093849392909182918401908083835b602083106139a65780518252601f199092019160209182019101613987565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b1580156134a257600080fd5b6000808360405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b0182805190602001908083835b60208310613a9a5780518252601f199092019160209182019101613a7b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310613afd5780518252601f199092019160209182019101613ade565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e160020a637152429d02845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015613b7b57600080fd5b505af1158015613b8f573d6000803e3d6000fd5b505050506040513d6020811015613ba557600080fd5b5051151561391c576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b600080600160a060020a0383161515613cac576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a2063616e6e6f74206465707265636174652061206e756c6c206160448201527f6464726573732e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080517f6465706372656361746564000000000000000000000000000000000000000000602080830191909152606060020a600160a060020a03871602602b8301528251601f818403018152603f90920192839052815191929182918401908083835b60208310613d2f5780518252601f199092019160209182019101613d10565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fabfdcced00000000000000000000000000000000000000000000000000000000845260048401829052600160248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b1580156134a257600080fd5b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613e575780518252601f199092019160209182019101613e38565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015613ee457600080fd5b505af1158015613ef8573d6000803e3d6000fd5b505050506040513d6020811015613f0e57600080fd5b50519050600160a060020a03811615613f295780925061239e565b83925061239e565b60008083613f3f8685613dc3565b60405160200180807f746f6b656e2e66726f7a656e0000000000000000000000000000000000000000815250600c01838051906020019080838360208310612a115780518252601f1990920191602091820191016129f2565b600080600080613fdd876040805190810160405280600481526020017f55534478000000000000000000000000000000000000000000000000000000008152506121ce565b9250613fe987876121ce565b915061402582600a0a61284d85600a0a61401961271061284d61400c8e8e614f1b565b8c9063ffffffff614de216565b9063ffffffff614de216565b979650505050505050565b600080600061403f8686614f78565b15156140bb576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6140c984612859888861505b565b9150816140d687876150fd565b1015614152576040805160e560020a62461bcd02815260206004820152603360248201527f4572726f723a204163636f756e742063616e6e6f74206578636565642069747360448201527f206461696c79207370656e64206c696d69742e00000000000000000000000000606482015290519081900360840190fd5b8461415d878761518e565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106141f25780518252601f1990920191602091820191016141d3565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e160020a637152429d02845260048401829052602484018a90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b15801561427057600080fd5b505af1158015614284573d6000803e3d6000fd5b505050506040513d602081101561429a57600080fd5b50511515614352576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b50600195945050505050565b60008080600160a060020a03861615156143e8576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876143f38a89613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b6020831061443b5780518252601f19909201916020918201910161441c565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106144bd5780518252601f19909201916020918201910161449e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150876144f78a88613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b6020831061453f5780518252601f199092019160209182019101614520565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106145c15780518252601f1990920191602091820191016145a2565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063e2a4853a9450879361467c93508b92879263bd02d0f5926024808401938290030181600087803b15801561464457600080fd5b505af1158015614658573d6000803e3d6000fd5b505050506040513d602081101561466e57600080fd5b50519063ffffffff61521f16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156146c457600080fd5b505af11580156146d8573d6000803e3d6000fd5b505050506040513d60208110156146ee57600080fd5b50511515614770576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a918491614807918a91869163bd02d0f59160248083019260209291908290030181600087803b1580156147cf57600080fd5b505af11580156147e3573d6000803e3d6000fd5b505050506040513d60208110156147f957600080fd5b50519063ffffffff614e9816565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561484f57600080fd5b505af1158015614863573d6000803e3d6000fd5b505050506040513d602081101561487957600080fd5b505115156148fb576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561497a578181015183820152602001614962565b50505050905090810190601f1680156149a75780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156149da5781810151838201526020016149c2565b50505050905090810190601f168015614a075780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b60008084614a348786613dc3565b614a3e8833613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b60208310614a985780518252601f199092019160209182019101614a79565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b60208310614b395780518252601f199092019160209182019101614b1a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063e2a4853a94508693614bbc93508992879263bd02d0f5926024808401938290030181600087803b15801561464457600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015614c0457600080fd5b505af1158015614c18573d6000803e3d6000fd5b505050506040513d6020811015614c2e57600080fd5b50511515614352576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b60208310614d225780518252601f199092019160209182019101614d03565b51815160209384036101000a60001901801990921691161790526040805192909401829003822089547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015614daf57600080fd5b505af1158015614dc3573d6000803e3d6000fd5b505050506040513d6020811015614dd957600080fd5b50519392505050565b600080831515614df557600091506114f1565b50828202828482811515614e0557fe5b0414610c89576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808284811515614e8f57fe5b04949350505050565b600082820183811015610c89576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b01828051906020019080838360208310611e0c5780518252601f199092019160209182019101611ded565b6000806000614f87858561518e565b915042821115614f9a576001925061239e565b5062015180614fd68585614fd1614fc48561401960016128598361284d428d63ffffffff61521f16565b869063ffffffff614e9816565b6152a4565b1515615052576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6001925061239e565b60008082615069858561518e565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a0281526014018281526020019250505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b60008282111561529e576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106137bc5780518252601f19909201916020918201910161379d560020616c6c6f7765642062792074686520636f6e74726163742e00000000000000746f6b656e2e62616c616e6365000000000000000000000000000000000000004572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d657465727320616e6420656e7375726520746865207370656e646572206861732074686520617070726f76656420616d6f756e74206f662066756e647320746f207472616e736665722e6c6c6f776564207065726d697373696f6e7320776974682073746f726167652075652e20506c6561736520656e7375726520636f6e74726163742068617320614572726f723a20556e61626c6520746f207365742073746f726167652076616c636f6e74726163742e00000000000000000000000000000000000000000000004572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a723058207cce3078f9e1d6ccbd29221a1b29da975e1ee315480c0b1b3e064c66dc6348ec0029", + "sourceMap": "1060:8028:5:-;;;1371:465;8:9:-1;5:2;;;30:1;27;20:12;5:2;1371:465:5;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1371:465:5;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1708:46:5;;-1:-1:-1;;;;;;1708:46:5;-1:-1:-1;;;;;1708:46:5;;;;;;;;;1807:24;;;;;;;;1060:8028;;;;;;;;", + "deployedSourceMap": "1060:8028:5:-;;;;;;;;;-1:-1:-1;;;1060:8028:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3417:104;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3417:104:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3417:104:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8099:406;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8099:406:5;-1:-1:-1;;;;;8099:406:5;;;;;;;;;;;;;;;;;;;;;;;;;4593:132;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4593:132:5;;;;;;;;;;;;;;;;;;;;7417:476;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7417:476:5;-1:-1:-1;;;;;7417:476:5;;;;;;;;;;;;4330:134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4330:134:5;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;6385:150:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6385:150:5;;;;;4100:113;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4100:113:5;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;3886:101:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3886:101:5;;;;5306:156;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5306:156:5;-1:-1:-1;;;;;5306:156:5;;;;;3631:110;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3631:110:5;;;;6767:375;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6767:375:5;-1:-1:-1;;;;;6767:375:5;;;;;;;5739:415;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5739:415:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5739:415:5;-1:-1:-1;;;;;5739:415:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5739:415:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4963:183;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4963:183:5;-1:-1:-1;;;;;4963:183:5;;;;;;;;;;2242:1071;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2242:1071:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2242:1071:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2242:1071:5;;;;-1:-1:-1;2242:1071:5;-1:-1:-1;2242:1071:5;;-1:-1:-1;2242:1071:5;;;;;;;;-1:-1:-1;;2242:1071:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2242:1071:5;;;;-1:-1:-1;2242:1071:5;-1:-1:-1;2242:1071:5;;-1:-1:-1;2242:1071:5;;;;;;;;-1:-1:-1;;2242:1071:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2242:1071:5;;;;-1:-1:-1;2242:1071:5;-1:-1:-1;2242:1071:5;;-1:-1:-1;2242:1071:5;;;;;;;;-1:-1:-1;2242:1071:5;;-1:-1:-1;;2242:1071:5;;;-1:-1:-1;;;;2242:1071:5;;;;-1:-1:-1;;;;;2242:1071:5;;;;;;-1:-1:-1;2242:1071:5;;8650:204;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8650:204:5;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;3417:104:5;3454:12;3483:31;:3;3508:4;3483:31;:16;:31;:::i;:::-;3476:38;;3417:104;:::o;8099:406::-;8176:12;8953:39;:3;8986:4;8953:39;:24;:39;:::i;:::-;8952:40;8944:123;;;;;-1:-1:-1;;;;;8944:123:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8305:37;:3;8326:7;8335:6;8305:37;:20;:37;:::i;:::-;8288:191;;;;;;;-1:-1:-1;;;;;8288:191:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8494:4:5;8099:406;;;;:::o;4593:132::-;4637:11;4665:53;4684:33;:3;4711:4;4684:33;:18;:33;:::i;:::-;4665:3;;:53;:18;:53;:::i;7417:476::-;7508:12;8953:39;:3;8986:4;8953:39;:24;:39;:::i;:::-;8952:40;8944:123;;;;;-1:-1:-1;;;;;8944:123:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7641:76;7658:33;:3;7685:4;7658:33;:18;:33;:::i;:::-;7641:76;;;;;;;;;;;;;;;;;:3;;:76;7693:4;;7699:2;;7703:6;;7641:76;:16;:76;:::i;:::-;7624:243;;;;;;-1:-1:-1;;;;;7624:243:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7882:4:5;7417:476;;;;;:::o;4330:134::-;4371:14;4402:55;4423:33;:3;4450:4;4423:33;:18;:33;:::i;:::-;4402:3;;:55;:20;:55;:::i;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;6385:150:5:-;6442:9;6468:60;6486:33;:3;6513:4;6486:33;:18;:33;:::i;:::-;6468:3;;6521:6;6468:60;:17;:60;:::i;:::-;6461:67;6385:150;-1:-1:-1;;6385:150:5:o;4100:113::-;4140:15;4172:34;:3;4200:4;4172:34;:19;:34;:::i;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;3886:101:5:-;3922:11;3950:30;:3;3974:4;3950:30;:15;:30;:::i;5306:156::-;5363:12;5392:63;5412:33;:3;5439:4;5412:33;:18;:33;:::i;:::-;5392:3;;5447:7;5392:63;:19;:63;:::i;3631:110::-;3670:14;3701:33;:3;3728:4;3701:33;:18;:33;:::i;6767:375::-;6840:12;8953:39;:3;8986:4;8953:39;:24;:39;:::i;:::-;8952:40;8944:123;;;;;-1:-1:-1;;;;;8944:123:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6968:66;6981:33;:3;7008:4;6981:33;:18;:33;:::i;:::-;6968:66;;;;;;;;;;;;;;;;;:3;;:66;7016:2;;7020:6;;6968:66;:12;:66;:::i;:::-;6951:165;;;;;;;-1:-1:-1;;;;;6951:165:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5739:415;5784:8;;;;5825:12;5784:8;;5889:33;:3;5916:4;5889:33;:18;:33;:::i;:::-;5867:55;-1:-1:-1;5947:26:5;:3;5867:55;5947:26;:13;:26;:::i;:::-;5983;:3;5997:11;5983:26;:13;:26;:::i;:::-;6019;:3;6033:11;6019:26;:13;:26;:::i;:::-;6055:27;:3;6070:11;6055:27;:14;:27;:::i;:::-;6092:26;:3;6106:11;6092:26;:13;:26;:::i;:::-;5930:217;;;;-1:-1:-1;5930:217:5;;-1:-1:-1;5930:217:5;-1:-1:-1;5930:217:5;;-1:-1:-1;6128:11:5;;-1:-1:-1;5739:415:5;-1:-1:-1;5739:415:5:o;4963:183::-;5037:11;5065:74;5087:33;:3;5114:4;5087:33;:18;:33;:::i;:::-;5065:3;;5122:7;5131;5065:74;:21;:74;:::i;:::-;5058:81;4963:183;-1:-1:-1;;;4963:183:5:o;2242:1071::-;1261:10:1;2439:12:5;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;2469:23:5;:3;2486:5;2469:23;:16;:23;:::i;:::-;2461:100;;;;;;;-1:-1:-1;;;;;2461:100:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2577:27;:3;2596:7;2577:27;:18;:27;:::i;:::-;2569:106;;;;;;;-1:-1:-1;;;;;2569:106:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2691:21;:3;2707:4;2691:21;:15;:21;:::i;:::-;2683:97;;;;;;;-1:-1:-1;;;;;2683:97:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2796:29;:3;2816:8;2796:29;:19;:29;:::i;:::-;2788:109;;;;;;;-1:-1:-1;;;;;2788:109:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2913:40;:3;2934:7;2943:9;2913:40;:20;:40;:::i;:::-;2905:121;;;;;;;-1:-1:-1;;;;;2905:121:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3042:32;:3;3061:12;3042:32;:18;:32;:::i;:::-;3034:111;;;;;;;-1:-1:-1;;;;;3034:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3161:43;:3;3181:7;3190:13;3161:43;:19;:43;:::i;:::-;3153:134;;;;;;;-1:-1:-1;;;;;3153:134:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3302:4:5;2242:1071;;;;;;;;;:::o;8650:204::-;1261:10:1;8706:15:5;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;8739:40:5;:3;8773:4;8739:40;:25;:40;:::i;:::-;8731:97;;;;;;;-1:-1:-1;;;;;8731:97:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8843:4:5;8650:204;:::o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;19046:228:8:-;19135:16;19159:10;19213:15;19182:47;;;;;;;;;;;;;-1:-1:-1;;;;;19182:47:8;-1:-1:-1;;;;;19182:47:8;-1:-1:-1;;;19182:47:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;19182:47:8;;;19172:58;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;19172:58:8;;;;;;;;;;;;19243:12;;:26;;;;;;;;;;;19172:58;;-1:-1:-1;;;;;;19243:12:8;;;;-1:-1:-1;19243:22:8;;-1:-1:-1;19243:26:8;;;;;-1:-1:-1;;;19243:26:8;;;;;;-1:-1:-1;19243:12:8;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;19243:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;19243:26:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;19243:26:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;19243:26:8;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;-1:-1;19243:26:8;;-1:-1:-1;;;;;19046:228:8;;;;;;:::o;55990:230::-;56087:11;56106:10;56161:15;56129:48;;;;;;;;;;;;;-1:-1:-1;;;;;56129:48:8;-1:-1:-1;;;;;56129:48:8;-1:-1:-1;;;56129:48:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;56129:48:8;;;56119:59;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;56119:59:8;;;;;;;;;;;;56191:12;;:24;;;;;;;;;;;56119:59;;-1:-1:-1;;;;;;56191:12:8;;;;-1:-1:-1;56191:20:8;;-1:-1:-1;56191:24:8;;;;;263:2:-1;;-1:-1;56191:24:8;;;;;;;-1:-1:-1;56191:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;56191:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;56191:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;56191:24:8;;55990:230;-1:-1:-1;;;;55990:230:8:o;40662:1217::-;40755:12;40857:22;40755:12;;-1:-1:-1;;;;;40783:14:8;;;;40775:75;;;;;-1:-1:-1;;;;;40775:75:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40882:35;40897:4;40911;40882:14;:35::i;:::-;40857:60;;40939:73;40961:4;40967:8;40977:34;40997:4;41003:7;40977:19;:34::i;:::-;40939:21;:73::i;:::-;:78;40924:158;;;;;-1:-1:-1;;;;;40924:158:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41150:8;41160:37;41180:4;41186:10;41160:19;:37::i;:::-;41199:34;41219:4;41225:7;41199:19;:34::i;:::-;41114:120;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;41114:120:8;;;;;;;-1:-1:-1;;;;;41114:120:8;-1:-1:-1;;;;;41114:120:8;-1:-1:-1;;;41114:120:8;;;;;;-1:-1:-1;;;;;41114:120:8;-1:-1:-1;;;;;41114:120:8;-1:-1:-1;;;41114:120:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;41114:120:8;;;41104:131;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;41104:131:8;;;;;;;;;;;;;;;;41089:146;;41300:8;41310:37;41330:4;41336:10;41310:19;:37::i;:::-;41266:82;;;;;;-1:-1:-1;;;;;;;;;;;41266:82:8;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;41266:82:8;;;;;;;-1:-1:-1;;;;;41266:82:8;-1:-1:-1;;;;;41266:82:8;-1:-1:-1;;;41266:82:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;41266:82:8;;;41256:93;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;41256:93:8;;;;;;;;;;;;41371:12;;-1:-1:-1;;;;;41371:26:8;;;;;;;;;;41256:93;;-1:-1:-1;;;;;;41371:12:8;;;;-1:-1:-1;41371:20:8;;-1:-1:-1;41371:26:8;;;;;263:2:-1;;-1:-1;41371:26:8;;;;;;;-1:-1:-1;41371:12:8;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;41371:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;41371:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;41371:26:8;:31;;:46;;-1:-1:-1;41406:11:8;;41371:46;41356:154;;;;;;;-1:-1:-1;;;;;41356:154:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41532:12;;:26;;;-1:-1:-1;;;;;41532:26:8;;;;;;;;;;41562:6;;-1:-1:-1;;;;;41532:12:8;;:20;;:26;;;;;;;;;;;;;;:12;;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;41532:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;41532:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;41532:26:8;:36;;41517:118;;;;;-1:-1:-1;;;;;41517:118:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41657:12;;:34;;;-1:-1:-1;;;;;41657:34:8;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41657:12:8;;;;:20;;:34;;;;;;;;;;;;;;;:12;;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;41657:34:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;41657:34:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;41657:34:8;41642:165;;;;;;;-1:-1:-1;;;;;41642:165:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;41642:165:8;;;;-1:-1:-1;;;;;;;;;;;41642:165:8;;;;-1:-1:-1;;;;;;;;;;;41642:165:8;;;;-1:-1:-1;;;;;;;;;;;41642:165:8;;;;;;;;;;;;;;;41819:37;;;;;;;;-1:-1:-1;;;;;41819:37:8;;;41828:10;;41819:37;;;;;;;;;-1:-1:-1;41870:4:8;;40662:1217;-1:-1:-1;;;;;;40662:1217:8:o;19671:234::-;19762:18;19788:10;19844:15;19811:49;;;;;;;;;;;;;-1:-1:-1;;;;;19811:49:8;-1:-1:-1;;;;;19811:49:8;-1:-1:-1;;;19811:49:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;19811::8;;;19801:60;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;27457:210:8;27540:11;27559:10;27615:8;27582:42;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;27582:42:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;27582:42:8;;;27572:53;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;27572:53:8;;;;;;;;;;;;27638:12;;-1:-1:-1;;;;;27638:24:8;;;;;;;;;;27572:53;;-1:-1:-1;;;;;;27638:12:8;;;;-1:-1:-1;27638:20:8;;-1:-1:-1;27638:24:8;;;;;263:2:-1;;-1:-1;27638:24:8;;;;;;;-1:-1:-1;27638:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;36261:1201:8;36388:12;;;-1:-1:-1;;;;;36423:18:8;;;;36408:86;;;;;-1:-1:-1;;;;;36408:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36523:35;36538:4;36552;36523:14;:35::i;:::-;36501:57;;36576:40;36590:4;36596:11;36609:6;36576:13;:40::i;:::-;36564:52;;36731:76;36756:4;36762;36768:38;36783:4;36789:8;36799:6;36768:14;:38::i;:::-;36731:24;:76::i;:::-;36716:152;;;;;;;-1:-1:-1;;;;;36716:152:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36934:53;36948:4;36954:8;36964:4;36970:2;36974:6;36982:4;36934:13;:53::i;:::-;36919:127;;;;;;;-1:-1:-1;;;;;36919:127:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37110:84;37124:4;37130:8;37140:4;37146:11;37159:4;37165:28;37175:4;37181:11;37165:9;:28::i;:::-;37110:13;:84::i;:::-;37095:162;;;;;;;-1:-1:-1;;;;;37095:162:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37332:45;37348:4;37354:8;37364:4;37370:6;37332:15;:45::i;:::-;37317:122;;;;;;;-1:-1:-1;;;;;37317:122:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37453:4:8;;36261:1201;-1:-1:-1;;;;;;;;36261:1201:8:o;21585:221::-;21670:18;21696:10;21754:8;21719:44;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;26726:364:8;26817:19;26844:10;26923:18;26899:15;26867:48;;;;;;;;;;;;;-1:-1:-1;;;;;26867:48:8;-1:-1:-1;;;;;26867:48:8;-1:-1:-1;;;26867:48:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;26867:48:8;;;26857:59;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26857:59:8;;;;;;;;;;;;26944:12;;:27;;;;;;;;;;;26857:59;;-1:-1:-1;;;;;;26944:12:8;;;;-1:-1:-1;26944:23:8;;-1:-1:-1;26944:27:8;;;;;263:2:-1;;-1:-1;26944:27:8;;;;;;;-1:-1:-1;26944:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;26944:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26944:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26944:27:8;;-1:-1:-1;;;;;;26981:17:8;;;26977:109;;;27015:26;27036:4;27015:20;:26::i;:::-;27008:33;;;;26977:109;27069:10;27062:17;;26977:109;26726:364;;;;;;:::o;31068:722::-;31213:12;;31244:44;;;;;;;;;;;;-1:-1:-1;;;;;31244:44:8;;;-1:-1:-1;;;31244:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31244:44:8;;;;;;;;31234:55;;-1:-1:-1;;;;;;;;;;;;31213:12:8;;;:20;;31244:44;;;31234:55;;;;;31244:44;31234:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31234:55:8;;;;;;;;;;;;31213:77;;;-1:-1:-1;;;31213:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31213:77:8;;;;;;;-1:-1:-1;31213:77:8;-1:-1:-1;31213:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31213:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31213:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31213:77:8;31310:12;;31341:44;;;;31213:77;31341:44;;;;;;;-1:-1:-1;;;;;31341:44:8;;;-1:-1:-1;;;31341:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31341:44:8;;;;;;;;31331:55;;31213:77;;-1:-1:-1;31310:12:8;;;;:20;;31341:44;;;;;31331:55;;;;;31341:44;31331:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31331:55:8;;;;;;;;;;;;31310:77;;;-1:-1:-1;;;31310:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31310:77:8;;;;;;;-1:-1:-1;31310:77:8;-1:-1:-1;31310:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31310:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31310:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31310:77:8;31407:12;;31438:44;;;;31310:77;31438:44;;;;;;;-1:-1:-1;;;;;31438:44:8;;;-1:-1:-1;;;31438:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31438:44:8;;;;;;;;31428:55;;31310:77;;-1:-1:-1;31407:12:8;;;;:20;;31438:44;;;;;31428:55;;;;;31438:44;31428:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31428:55:8;;;;;;;;;;;;31407:77;;;-1:-1:-1;;;31407:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31407:77:8;;;;;;;-1:-1:-1;31407:77:8;-1:-1:-1;31407:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31407:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31407:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31407:77:8;31505:12;;31536:45;;;;31407:77;31536:45;;;;;;;-1:-1:-1;;;;;31536:45:8;;;-1:-1:-1;;;31536:45:8;;;;;;;26:21:-1;;;22:32;;6:49;;31536:45:8;;;;;;;;31526:56;;31407:77;;-1:-1:-1;31505:12:8;;;;:20;;31536:45;;;;;31526:56;;;;;31536:45;31526:56;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31526:56:8;;;;;;;;;;;;31505:78;;;-1:-1:-1;;;31505:78:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31505:78:8;;;;;;;-1:-1:-1;31505:78:8;-1:-1:-1;31505:78:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31505:78:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31505:78:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31505:78:8;;-1:-1:-1;31601:46:8;31505:78;31602:31;31627:5;31603:18;:6;31614;31603:18;:10;:18;:::i;:::-;31602:24;:31;:24;:31;:::i;:::-;31601:37;:46;:37;:46;:::i;:::-;31589:58;;31665:6;31658:4;:13;31654:132;;;31688:6;31681:13;;;;31654:132;31718:6;31711:4;:13;31707:79;;;31741:6;31734:13;;;;31707:79;31775:4;31768:11;;31707:79;31068:722;;;;;;;;;;:::o;20955:224::-;21047:6;21061:10;21118:15;21084:50;;;;;;;;;;;;;-1:-1:-1;;;;;21084:50:8;-1:-1:-1;;;;;21084:50:8;-1:-1:-1;;;21084:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;21084:50:8;;;21074:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;20321:225:8;20409:15;20432:10;20485:15;20455:46;;;;;;;;;;;;;-1:-1:-1;;;;;20455:46:8;-1:-1:-1;;;;;20455:46:8;-1:-1:-1;;;20455:46:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;20455:46:8;;;20445:57;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;28791:266:8;28892:12;28912:10;28969:8;28979:34;28999:4;29005:7;28979:19;:34::i;:::-;28935:79;;;;;;-1:-1:-1;;;;;;;;;;;28935:79:8;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;28935:79:8;;;;;;;-1:-1:-1;;;;;28935:79:8;-1:-1:-1;;;;;28935:79:8;-1:-1:-1;;;28935:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;28935:79:8;;;28925:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;28925:90:8;;;;;;;;;;;;29028:12;;-1:-1:-1;;;;;29028:24:8;;;;;;;;;;28925:90;;-1:-1:-1;;;;;;29028:12:8;;;;-1:-1:-1;29028:20:8;;-1:-1:-1;29028:24:8;;;;;263:2:-1;;-1:-1;29028:24:8;;;;;;;-1:-1:-1;29028:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;29028:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29028:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29028:24:8;;28791:266;-1:-1:-1;;;;;28791:266:8:o;34223:922::-;34332:12;;;-1:-1:-1;;;;;34360:18:8;;;;34352:67;;;;;-1:-1:-1;;;;;34352:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34442:1;34433:10;;34425:64;;;;;-1:-1:-1;;;;;34425:64:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34518:35;34533:4;34547;34518:14;:35::i;:::-;34496:57;;34571:40;34585:4;34591:11;34604:6;34571:13;:40::i;:::-;34559:52;;34633:82;34658:4;34664:10;34676:38;34691:4;34697:8;34707:6;34676:14;:38::i;34633:82::-;34618:157;;;;;;;-1:-1:-1;;;;;34618:157:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34797:59;34811:4;34817:8;34827:10;34839:2;34843:6;34851:4;34797:13;:59::i;:::-;34782:128;;;;;;;-1:-1:-1;;;;;34782:128:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34974:90;34988:4;34994:8;35004:10;35016:11;35029:4;35035:28;35045:4;35051:11;35035:9;:28::i;34974:90::-;34959:163;;;;;;;-1:-1:-1;;;;;34959:163:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22196:215;22282:11;22301:10;22352:15;22324:44;;;;;;;;;;;;;-1:-1:-1;;;;;22324:44:8;-1:-1:-1;;;;;22324:44:8;-1:-1:-1;;;22324:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22324:44:8;;;22314:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;22791:215:8;22877:11;22896:10;22947:15;22919:44;;;;;;;;;;;;;-1:-1:-1;;;;;22919:44:8;-1:-1:-1;;;;;22919:44:8;-1:-1:-1;;;22919:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22919:44:8;;;22909:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23386:215:8;23472:11;23491:10;23542:15;23514:44;;;;;;;;;;;;;-1:-1:-1;;;;;23514:44:8;-1:-1:-1;;;;;23514:44:8;-1:-1:-1;;;23514:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;23514:44:8;;;23504:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23976:218:8;24063:12;24083:10;24135:15;24106:45;;;;;;;;;;;;;-1:-1:-1;;;;;24106:45:8;-1:-1:-1;;;;;24106:45:8;-1:-1:-1;;;24106:45:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24106:45:8;;;24096:56;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;24582:217:8;24668:12;24688:10;24739:15;24711:44;;;;;;;;;;;;;-1:-1:-1;;;;;24711:44:8;-1:-1:-1;;;;;24711:44:8;-1:-1:-1;;;24711:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24711:44:8;;;24701:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;24701:55:8;;;;;;;;;;;;24769:12;;:25;;;;;;;;;;;24701:55;;-1:-1:-1;;;;;;24769:12:8;;;;-1:-1:-1;24769:21:8;;-1:-1:-1;24769:25:8;;;;;-1:-1:-1;;;24769:25:8;;;;;;-1:-1:-1;24769:12:8;:25;;;5:2:-1;;;;30:1;27;20:12;28058:325:8;28178:14;28200:10;28259:8;28269:34;28289:4;28295:7;28269:19;:34::i;:::-;28305;28325:4;28331:7;28305:19;:34::i;:::-;28223:117;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;28223:117:8;;;;;;;-1:-1:-1;;;;;28223:117:8;-1:-1:-1;;;;;28223:117:8;-1:-1:-1;;;28223:117:8;;;;;;-1:-1:-1;;;;;28223:117:8;-1:-1:-1;;;;;28223:117:8;-1:-1:-1;;;28223:117:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;28223:117:8;;;28213:128;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;28213:128:8;;;;;;;;;;;;28354:12;;-1:-1:-1;;;;;28354:24:8;;;;;;;;;;28213:128;;-1:-1:-1;;;;;;28354:12:8;;;;-1:-1:-1;28354:20:8;;-1:-1:-1;28354:24:8;;;;;263:2:-1;;-1:-1;28354:24:8;;;;;;;-1:-1:-1;28354:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;28354:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;28354:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;28354:24:8;;28058:325;-1:-1:-1;;;;;;28058:325:8:o;2465:366::-;2585:45;;;;;;;;;;;;-1:-1:-1;;;2624:4:8;2585:45;;;;;;;22:32:-1;26:21;;;22:32;6:49;;2585:45:8;;;;;;;;2575:56;;2542:12;;;;2585:45;;;;;2575:56;;;;2585:45;2575:56;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;2575:56:8;;;;;;;;;;;;2652:12;;:37;;;;;;;;;;;;;;;;;;;;;;;2575:56;;-1:-1:-1;;;;;;2652:12:8;;;;-1:-1:-1;2652:22:8;;-1:-1:-1;2575:56:8;;2652:37;;-1:-1:-1;2652:37:8;;;;;;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2652:37:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2652:37:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2652:37:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2652:37:8;2637:172;;;;;;;-1:-1:-1;;;;;2637:172:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2637:172:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3236:374;3360:47;;;;;;;;;;;;-1:-1:-1;;;3401:4:8;3360:47;;;;;;;26:21:-1;;;22:32;;6:49;;3360:47:8;;;;;;;3350:58;;3317:12;;;;3360:47;;;;;3350:58;;;;3360:47;3350:58;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;4033:362:8;4151:44;;;;;;;;;;;;-1:-1:-1;;;4189:4:8;4151:44;;;;;;;22:32:-1;26:21;;;22:32;6:49;;4151:44:8;;;;;;;;4141:55;;4108:12;;;;4151:44;;;;;4141:55;;;;4151:44;4141:55;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;4847:378:8;4973:48;;;;;;;;;;;;-1:-1:-1;;;5015:4:8;4973:48;;;;;;;22:32:-1;26:21;;;22:32;6:49;;4973:48:8;;;;;;;;4963:59;;4930:12;;;;4973:48;;;;;4963:59;;;;4973:48;4963:59;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;5939:390:8;6039:12;6059:10;6117:8;6082:44;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;6082:44:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;6082:44:8;;;6072:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;6072:55:8;;;;;;;;;;;;6148:12;;-1:-1:-1;;;;;6148:39:8;;;;;;;;;;;;;;;;6072:55;;-1:-1:-1;;;;;;6148:12:8;;;;-1:-1:-1;6148:20:8;;-1:-1:-1;6148:39:8;;;;;263:2:-1;;-1:-1;6148:39:8;;;;;;;-1:-1:-1;6148:12:8;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;6148:39:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6148:39:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6148:39:8;6133:174;;;;;;;-1:-1:-1;;;;;6133:174:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6133:174:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6320:4:8;;5939:390;-1:-1:-1;;;;5939:390:8:o;11027:375::-;11152:46;;;;;;;;;;;;-1:-1:-1;;;11192:4:8;11152:46;;;;;;;22:32:-1;26:21;;;22:32;6:49;;11152:46:8;;;;;;;;11142:57;;11109:12;;;;11152:46;;;;;11142:57;;;;11152:46;11142:57;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;11142:57:8;;;;;;;;;;;;11220:12;;:40;;;;;;;;;-1:-1:-1;;;;;11220:40:8;;;;;;;;;11142:57;;-1:-1:-1;11220:12:8;;;;;-1:-1:-1;11220:23:8;;-1:-1:-1;11220:40:8;;;;;263:2:-1;;-1:-1;11220:40:8;;;;;;;-1:-1:-1;11220:12:8;:40;;;5:2:-1;;;;30:1;27;20:12;63256:314:8;63349:12;63369:10;63424:8;63392:41;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;63392:41:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;63392:41:8;;;63382:52;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;63382:52:8;;;;;;;;;;;;63455:12;;-1:-1:-1;;;;;63455:33:8;;;;;;;;;;;;;;;;63382:52;;-1:-1:-1;;;;;;63455:12:8;;;;-1:-1:-1;63455:20:8;;-1:-1:-1;63455:33:8;;;;;263:2:-1;;-1:-1;63455:33:8;;;;;;;-1:-1:-1;63455:12:8;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;63455:33:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;63455:33:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;63455:33:8;63440:107;;;;;;;-1:-1:-1;;;;;63440:107:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55229:457;55322:12;;-1:-1:-1;;;;;55350:22:8;;;;55342:82;;;;;-1:-1:-1;;;;;55342:82:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55454:48;;;;;;;;;;;;-1:-1:-1;;;;;;;;55454:48:8;;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;55454:48:8;;;;;;;;55444:59;;55454:48;;;;;55444:59;;;;55454:48;55444:59;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;55444:59:8;;;;;;;;;;;;55518:12;;:30;;;;;;;;;274:1:-1;55518:30:8;;;;;;55444:59;;-1:-1:-1;;;;;;55518:12:8;;;;-1:-1:-1;55518:20:8;;-1:-1:-1;55518:30:8;;;;;263:2:-1;;-1:-1;55518:30:8;;;;;;;-1:-1:-1;55518:12:8;:30;;;5:2:-1;;;;30:1;27;20:12;16402:357:8;16490:25;16523:10;16596:23;16581:7;16546:43;;;;;;;;;;;;;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;16546:43:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16546:43:8;;;16536:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16536:54:8;;;;;;;;;;;;16622:12;;:27;;;;;;;;;;;16536:54;;-1:-1:-1;;;;;;16622:12:8;;;;-1:-1:-1;16622:23:8;;-1:-1:-1;16622:27:8;;;;;263:2:-1;;-1:-1;16622:27:8;;;;;;;-1:-1:-1;16622:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16622:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16622:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16622:27:8;;-1:-1:-1;;;;;;16659:22:8;;;16655:100;;16698:15;16691:22;;;;16655:100;16741:7;16734:14;;;;29485:277;29592:18;29618:10;29674:8;29684:34;29704:4;29710:7;29684:19;:34::i;:::-;29641:78;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;64447:441:8;64545:11;64564:16;64619:15;64743:14;64583:30;64600:4;64583:30;;;;;;;;;;;;;;;;;;:16;:30::i;:::-;64564:49;;64637:32;64654:4;64660:8;64637:16;:32::i;:::-;64619:50;;64760:101;64850:10;64846:2;:14;64761:79;64828:11;64824:2;:15;64762:56;64812:5;64762:45;64775:31;64791:4;64797:8;64775:15;:31::i;:::-;64762:8;;:45;:12;:45;:::i;:56::-;64761:62;:79;:62;:79;:::i;64760:101::-;64743:118;64447:441;-1:-1:-1;;;;;;;64447:441:8:o;59597:1002::-;59698:12;59926:18;60291:10;59818:42;59846:4;59852:7;59818:27;:42::i;:::-;59810:109;;;;;;;-1:-1:-1;;;;;59810:109:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59947:51;59991:6;59947:39;59972:4;59978:7;59947:24;:39::i;:51::-;59926:72;;60146:13;60104:38;60128:4;60134:7;60104:23;:38::i;:::-;:55;;60089:132;;;;;-1:-1:-1;;;;;60089:132:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60358:7;60367:39;60392:4;60398:7;60367:24;:39::i;:::-;60314:93;;;;;;;;;;;;;-1:-1:-1;;;;;60314:93:8;-1:-1:-1;;;;;60314:93:8;-1:-1:-1;;;60314:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;60314:93:8;;;60304:104;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;60304:104:8;;;;;;;;;;;;60422:12;;-1:-1:-1;;;;;60422:39:8;;;;;;;;;;;;;;;;60304:104;;-1:-1:-1;;;;;;60422:12:8;;;;-1:-1:-1;60422:20:8;;-1:-1:-1;60422:39:8;;;;;263:2:-1;;-1:-1;60422:39:8;;;;;;;-1:-1:-1;60422:12:8;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;60422:39:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;60422:39:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;60422:39:8;60414:162;;;;;;;-1:-1:-1;;;;;60414:162:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;60414:162:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;60590:4:8;;59597:1002;-1:-1:-1;;;;;59597:1002:8:o;38209:943::-;38337:12;;;-1:-1:-1;;;;;38372:18:8;;;;38357:86;;;;;-1:-1:-1;;;;;38357:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38509:8;38519:31;38539:4;38545;38519:19;:31::i;:::-;38475:76;;;;;;-1:-1:-1;;;;;;;;;;;38475:76:8;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38475:76:8;;;;;;;-1:-1:-1;;;;;38475:76:8;-1:-1:-1;;;;;38475:76:8;-1:-1:-1;;;38475:76:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38475:76:8;;;38465:87;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38465:87:8;;;;;;;;;;;;;;;;38450:102;;38617:8;38627:29;38647:4;38653:2;38627:19;:29::i;:::-;38583:74;;;;;;-1:-1:-1;;;;;;;;;;;38583:74:8;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38583:74:8;;;;;;;-1:-1:-1;;;;;38583:74:8;-1:-1:-1;;;;;38583:74:8;-1:-1:-1;;;38583:74:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38583:74:8;;;38573:85;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;38573:85:8;;;;;;;;;;;;38680:12;;-1:-1:-1;;;;;38707:26:8;;;;;;;;;;38573:85;;-1:-1:-1;;;;;;38680:12:8;;;;-1:-1:-1;38680:20:8;;-1:-1:-1;38707:26:8;;:38;;-1:-1:-1;38738:6:8;;38680:12;;38707:20;;:26;;;;;;;;;;-1:-1:-1;38680:12:8;38707:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38707:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38707:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38707:26:8;;:38;:30;:38;:::i;:::-;38680:66;;;;;-1:-1:-1;;;38680:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38680:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38680:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38680:66:8;38665:202;;;;;;;-1:-1:-1;;;;;38665:202:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;38665:202:8;;;;-1:-1:-1;;;;;;;;;;;38665:202:8;;;;-1:-1:-1;;;;;;;;;;;38665:202:8;;;;-1:-1:-1;;;;;;;;;;;38665:202:8;;;;;;;;;;;;;;;38888:12;;38915:26;;;-1:-1:-1;;;;;38915:26:8;;;;;;;;;;-1:-1:-1;;;;;38888:12:8;;;;:20;;38909:4;;38915:38;;38946:6;;38888:12;;38915:20;;:26;;;;;;;;;;;;;;38888:12;;38915:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38915:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38915:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38915:26:8;;:38;:30;:38;:::i;:::-;38888:66;;;;;-1:-1:-1;;;38888:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38888:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38888:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38888:66:8;38873:202;;;;;;;-1:-1:-1;;;;;38873:202:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;38873:202:8;;;;-1:-1:-1;;;;;;;;;;;38873:202:8;;;;-1:-1:-1;;;;;;;;;;;38873:202:8;;;;-1:-1:-1;;;;;;;;;;;38873:202:8;;;;;;;;;;;;;;;39112:2;-1:-1:-1;;;;;39087:42:8;39106:4;-1:-1:-1;;;;;39087:42:8;;39096:8;39116:6;39124:4;39087:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39087:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39087:42:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39087:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39143:4:8;;38209:943;-1:-1:-1;;;;;;;;38209:943:8:o;39706:499::-;39815:12;39835:10;39894:8;39904:34;39924:4;39930:7;39904:19;:34::i;:::-;39940:37;39960:4;39966:10;39940:19;:37::i;:::-;39858:120;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;39858:120:8;;;;;;;-1:-1:-1;;;;;39858:120:8;-1:-1:-1;;;;;39858:120:8;-1:-1:-1;;;39858:120:8;;;;;;-1:-1:-1;;;;;39858:120:8;-1:-1:-1;;;;;39858:120:8;-1:-1:-1;;;39858:120:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;39858:120:8;;;39848:131;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;39848:131:8;;;;;;;;;;;;40000:12;;-1:-1:-1;;;;;40025:24:8;;;;;;;;;;39848:131;;-1:-1:-1;;;;;;40000:12:8;;;;-1:-1:-1;40000:20:8;;-1:-1:-1;39848:131:8;;40025:36;;-1:-1:-1;40054:6:8;;40000:12;;40025:20;;:24;;;;;;;;;;-1:-1:-1;40000:12:8;40025:24;;;5:2:-1;;;;30:1;27;20:12;40025:36:8;40000:62;;;;;-1:-1:-1;;;40000:62:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;40000:62:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;40000:62:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;40000:62:8;39985:198;;;;;;;-1:-1:-1;;;;;39985:198:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;39985:198:8;;;;-1:-1:-1;;;;;;;;;;;39985:198:8;;;;-1:-1:-1;;;;;;;;;;;39985:198:8;;;;-1:-1:-1;;;;;;;;;;;39985:198:8;;;;;;;;;;;;;;25926:213;25998:25;26031:10;26054:39;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;26054:39:8;;;26044:50;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26044:50:8;;;;;;;;;;;;26107:12;;:27;;;;;;;;;;;26044:50;;-1:-1:-1;;;;;;26107:12:8;;;;-1:-1:-1;26107:23:8;;-1:-1:-1;26107:27:8;;;;;263:2:-1;;-1:-1;26107:27:8;;;;;;;-1:-1:-1;26107:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;26107:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26107:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26107:27:8;;25926:213;-1:-1:-1;;;25926:213:8:o;301:224:2:-;359:14;;385:6;;381:35;;;408:1;401:8;;;;381:35;-1:-1:-1;433:5:2;;;437:1;433;:5;452;;;;;;;;:10;444:62;;;;;-1:-1:-1;;;;;444:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;697:284;755:14;857:9;873:1;869;:5;;;;;;;;;697:284;-1:-1:-1;;;;697:284:2:o;1540:174::-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63878:211:8;63962:12;63982:10;64037:8;64005:41;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;61054:503:8;61145:12;61165;61284:13;61180:39;61205:4;61211:7;61180:24;:39::i;:::-;61165:54;;61239:3;61229:7;:13;61225:328;;;61259:4;61252:11;;;;61225:328;-1:-1:-1;61300:5:8;61356:109;61381:4;61387:7;61396:68;61408:55;61300:5;61409:39;61446:1;61409:32;61300:5;61410:16;:3;61418:7;61410:16;:7;:16;:::i;61408:55::-;61396:7;;:68;:11;:68;:::i;:::-;61356:24;:109::i;:::-;61339:187;;;;;;;-1:-1:-1;;;;;61339:187:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61542:4;61535:11;;;;61915:271;62008:11;62027:10;62094:7;62103:39;62128:4;62134:7;62103:24;:39::i;:::-;62050:93;;;;;;;;;;;;;-1:-1:-1;;;;;62050:93:8;-1:-1:-1;;;;;62050:93:8;-1:-1:-1;;;62050:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;62050:93:8;;;62040:104;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;58785:227:8;58877:10;58895;58961:7;58918:51;;;;;;;;;;;;;-1:-1:-1;;;;;58918:51:8;-1:-1:-1;;;;;58918:51:8;-1:-1:-1;;;58918:51:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;58918:51:8;;;58908:62;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;57486:228:8;57579:11;57598:10;57663:7;57621:50;;;;;;;;;;;;;-1:-1:-1;;;;;57621:50:8;-1:-1:-1;;;;;57621:50:8;-1:-1:-1;;;57621:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;57621:50:8;;;57611:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;1143:234:2;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;56628:379:8:-;56729:12;56749:10;56814:7;56772:50;;;;;;;;;;;;;-1:-1:-1;;;;;56772:50:8;-1:-1:-1;;;;;56772:50:8;-1:-1:-1;;;56772:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;56772:50:8;;;56762:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\n\n\n/*\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n@title ERC20 Compliant Smart Contract for Token, Inc.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n*/\n\n\n\ncontract TokenIOERC20 is Ownable {\n //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n * @notice Constructor method for ERC20 contract\n * @param _storageContract address of TokenIOStorage contract\n */\n constructor(address _storageContract) public {\n //// @dev Set the storage contract for the interface\n //// @dev This contract will be unable to use the storage constract until\n //// @dev contract address is authorized with the storage contract\n //// @dev Once authorized, Use the `setParams` method to set storage values\n lib.Storage = TokenIOStorage(_storageContract);\n\n //// @dev set owner to contract initiator\n owner[msg.sender] = true;\n }\n\n\n /**\n @notice Sets erc20 globals and fee paramters\n @param _name Full token name 'USD by token.io'\n @param _symbol Symbol name 'USDx'\n @param _tla Three letter abbreviation 'USD'\n @param _version Release version 'v0.0.1'\n @param _decimals Decimal precision\n @param _feeContract Address of fee contract\n @return { \"success\" : \"Returns true if successfully called from another contract\"}\n */\n function setParams(\n string _name,\n string _symbol,\n string _tla,\n string _version,\n uint _decimals,\n address _feeContract,\n uint _fxUSDBPSRate\n ) onlyOwner public returns (bool success) {\n require(lib.setTokenName(_name),\n \"Error: Unable to set token name. Please check arguments.\");\n require(lib.setTokenSymbol(_symbol),\n \"Error: Unable to set token symbol. Please check arguments.\");\n require(lib.setTokenTLA(_tla),\n \"Error: Unable to set token TLA. Please check arguments.\");\n require(lib.setTokenVersion(_version),\n \"Error: Unable to set token version. Please check arguments.\");\n require(lib.setTokenDecimals(_symbol, _decimals),\n \"Error: Unable to set token decimals. Please check arguments.\");\n require(lib.setFeeContract(_feeContract),\n \"Error: Unable to set fee contract. Please check arguments.\");\n require(lib.setFxUSDBPSRate(_symbol, _fxUSDBPSRate),\n \"Error: Unable to set fx USD basis points rate. Please check arguments.\");\n return true;\n }\n\n /**\n * @notice Gets name of token\n * @return {\"_name\" : \"Returns name of token\"}\n */\n function name() public view returns (string _name) {\n return lib.getTokenName(address(this));\n }\n\n /**\n * @notice Gets symbol of token\n * @return {\"_symbol\" : \"Returns symbol of token\"}\n */\n function symbol() public view returns (string _symbol) {\n return lib.getTokenSymbol(address(this));\n }\n\n /**\n * @notice Gets three-letter-abbreviation of token\n * @return {\"_tla\" : \"Returns three-letter-abbreviation of token\"}\n */\n function tla() public view returns (string _tla) {\n return lib.getTokenTLA(address(this));\n }\n\n /**\n * @notice Gets version of token\n * @return {\"_version\" : \"Returns version of token\"}\n */\n function version() public view returns (string _version) {\n return lib.getTokenVersion(address(this));\n }\n\n /**\n * @notice Gets decimals of token\n * @return {\"_decimals\" : \"Returns number of decimals\"}\n */\n function decimals() public view returns (uint _decimals) {\n return lib.getTokenDecimals(lib.getTokenSymbol(address(this)));\n }\n\n /**\n * @notice Gets total supply of token\n * @return {\"supply\" : \"Returns current total supply of token\"}\n */\n function totalSupply() public view returns (uint supply) {\n return lib.getTokenSupply(lib.getTokenSymbol(address(this)));\n }\n\n /**\n * @notice Gets allowance that spender has with approver\n * @param account Address of approver\n * @param spender Address of spender\n * @return {\"amount\" : \"Returns allowance of given account and spender\"}\n */\n function allowance(address account, address spender) public view returns (uint amount) {\n return lib.getTokenAllowance(lib.getTokenSymbol(address(this)), account, spender);\n }\n\n /**\n * @notice Gets balance of account\n * @param account Address for balance lookup\n * @return {\"balance\" : \"Returns balance amount\"}\n */\n function balanceOf(address account) public view returns (uint balance) {\n return lib.getTokenBalance(lib.getTokenSymbol(address(this)), account);\n }\n\n /**\n * @notice Gets fee parameters\n * @return {\n \"bps\":\"Fee amount as a mesuare of basis points\",\n \"min\":\"Minimum fee amount\",\n \"max\":\"Maximum fee amount\",\n \"flat\":\"Flat fee amount\",\n \"contract\":\"Address of fee contract\"\n }\n */\n function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) {\n address feeContract = lib.getFeeContract(address(this));\n return (\n lib.getFeeBPS(feeContract),\n lib.getFeeMin(feeContract),\n lib.getFeeMax(feeContract),\n lib.getFeeFlat(feeContract),\n lib.getFeeMsg(feeContract),\n feeContract\n );\n }\n\n /**\n * @notice Calculates fee of a given transfer amount\n * @param amount Amount to calculcate fee value\n * @return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}\n */\n function calculateFees(uint amount) public view returns (uint fees) {\n return lib.calculateFees(lib.getFeeContract(address(this)), amount);\n }\n\n /**\n * @notice transfers 'amount' from msg.sender to a receiving account 'to'\n * @param to Receiving address\n * @param amount Transfer amount\n * @return {\"success\" : \"Returns true if transfer succeeds\"}\n */\n function transfer(address to, uint amount) public notDeprecated returns (bool success) {\n /// @notice send transfer through library\n /// @dev !!! mutates storage state\n require(\n lib.transfer(lib.getTokenSymbol(address(this)), to, amount, \"0x0\"),\n \"Error: Unable to transfer funds. Please check your parameters.\"\n );\n return true;\n }\n\n /**\n * @notice spender transfers from approvers account to the reciving account\n * @param from Approver's address\n * @param to Receiving address\n * @param amount Transfer amount\n * @return {\"success\" : \"Returns true if transferFrom succeeds\"}\n */\n function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) {\n /// @notice sends transferFrom through library\n /// @dev !!! mutates storage state\n require(\n lib.transferFrom(lib.getTokenSymbol(address(this)), from, to, amount, \"0x0\"),\n \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"\n );\n return true;\n }\n\n /**\n * @notice approves spender a given amount\n * @param spender Spender's address\n * @param amount Allowance amount\n * @return {\"success\" : \"Returns true if approve succeeds\"}\n */\n function approve(address spender, uint amount) public notDeprecated returns (bool success) {\n /// @notice sends approve through library\n /// @dev !!! mtuates storage states\n require(\n lib.approveAllowance(spender, amount),\n \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"\n );\n return true;\n }\n\n /**\n * @notice gets currency status of contract\n * @return {\"deprecated\" : \"Returns true if deprecated, false otherwise\"}\n */\n function deprecateInterface() public onlyOwner returns (bool deprecated) {\n require(lib.setDeprecatedContract(address(this)),\n \"Error: Unable to deprecate contract!\");\n return true;\n }\n\n modifier notDeprecated() {\n /// @notice throws if contract is deprecated\n require(!lib.isContractDeprecated(address(this)),\n \"Error: Contract has been deprecated, cannot perform operation!\");\n _;\n }\n\n }\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOERC20.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOERC20.sol", + "exportedSymbols": { + "TokenIOERC20": [ + 1351 + ] + }, + "id": 1352, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 924, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 925, + "nodeType": "ImportDirective", + "scope": 1352, + "sourceUnit": 185, + "src": "25:23:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 926, + "nodeType": "ImportDirective", + "scope": 1352, + "sourceUnit": 5242, + "src": "49:30:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 927, + "nodeType": "ImportDirective", + "scope": 1352, + "sourceUnit": 4623, + "src": "80:26:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 928, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1085:7:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 929, + "nodeType": "InheritanceSpecifier", + "src": "1085:7:5" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1351, + "linearizedBaseContracts": [ + 1351, + 184 + ], + "name": "TokenIOERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 932, + "libraryName": { + "contractScope": null, + "id": 930, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1185:10:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1179:37:5", + "typeName": { + "contractScope": null, + "id": 931, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1200:15:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 934, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1351, + "src": "1219:19:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 933, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1219:15:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 954, + "nodeType": "Block", + "src": "1416:420:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 939, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "1708:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 941, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1708:11:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 943, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "1737:16:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 942, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1722:14:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1722:32:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1708:46:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 946, + "nodeType": "ExpressionStatement", + "src": "1708:46:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 947, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1807:5:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 950, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 948, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1813:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1813:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1807:17:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1827:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1807:24:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 953, + "nodeType": "ExpressionStatement", + "src": "1807:24:5" + } + ] + }, + "documentation": "@notice Constructor method for ERC20 contract\n@param _storageContract address of TokenIOStorage contract", + "id": 955, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 936, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 955, + "src": "1383:24:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 935, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1383:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1382:26:5" + }, + "payable": false, + "returnParameters": { + "id": 938, + "nodeType": "ParameterList", + "parameters": [], + "src": "1416:0:5" + }, + "scope": 1351, + "src": "1371:465:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1036, + "nodeType": "Block", + "src": "2453:860:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 979, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 957, + "src": "2486:5:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 977, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2469:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 978, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenName", + "nodeType": "MemberAccess", + "referencedDeclaration": 1762, + "src": "2469:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:23:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e206e616d652e20506c6561736520636865636b20617267756d656e74732e", + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2502:58:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_141dfda9ec7d030d71a0272572dd425cf90676e5296d5f58002425f3caea3960", + "typeString": "literal_string \"Error: Unable to set token name. Please check arguments.\"" + }, + "value": "Error: Unable to set token name. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_141dfda9ec7d030d71a0272572dd425cf90676e5296d5f58002425f3caea3960", + "typeString": "literal_string \"Error: Unable to set token name. Please check arguments.\"" + } + ], + "id": 976, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2461:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2461:100:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 983, + "nodeType": "ExpressionStatement", + "src": "2461:100:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 959, + "src": "2596:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 985, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2577:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1796, + "src": "2577:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2577:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e2073796d626f6c2e20506c6561736520636865636b20617267756d656e74732e", + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:60:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a4d419aaf1b7e0c1b217a216005ff121a20a3a58ed5048acbd3d22a85502af69", + "typeString": "literal_string \"Error: Unable to set token symbol. Please check arguments.\"" + }, + "value": "Error: Unable to set token symbol. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a4d419aaf1b7e0c1b217a216005ff121a20a3a58ed5048acbd3d22a85502af69", + "typeString": "literal_string \"Error: Unable to set token symbol. Please check arguments.\"" + } + ], + "id": 984, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2569:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:106:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 991, + "nodeType": "ExpressionStatement", + "src": "2569:106:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 995, + "name": "_tla", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 961, + "src": "2707:4:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 993, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2691:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 994, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenTLA", + "nodeType": "MemberAccess", + "referencedDeclaration": 1830, + "src": "2691:15:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2691:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e20544c412e20506c6561736520636865636b20617267756d656e74732e", + "id": 997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2722:57:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7221954eb7ab5ca7d7e112df96ffa1ba108181fc69cf565d48f56781bc167176", + "typeString": "literal_string \"Error: Unable to set token TLA. Please check arguments.\"" + }, + "value": "Error: Unable to set token TLA. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7221954eb7ab5ca7d7e112df96ffa1ba108181fc69cf565d48f56781bc167176", + "typeString": "literal_string \"Error: Unable to set token TLA. Please check arguments.\"" + } + ], + "id": 992, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2683:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2683:97:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "2683:97:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1003, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 963, + "src": "2816:8:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2796:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenVersion", + "nodeType": "MemberAccess", + "referencedDeclaration": 1864, + "src": "2796:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 1004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2796:29:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e2076657273696f6e2e20506c6561736520636865636b20617267756d656e74732e", + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:61:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0e049f6dc7ca1210cdbb63f5bd5546abce5203f36e68544787d7650cbf630ddb", + "typeString": "literal_string \"Error: Unable to set token version. Please check arguments.\"" + }, + "value": "Error: Unable to set token version. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0e049f6dc7ca1210cdbb63f5bd5546abce5203f36e68544787d7650cbf630ddb", + "typeString": "literal_string \"Error: Unable to set token version. Please check arguments.\"" + } + ], + "id": 1000, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2788:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2788:109:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1007, + "nodeType": "ExpressionStatement", + "src": "2788:109:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1011, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 959, + "src": "2934:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1012, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 965, + "src": "2943:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1009, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2913:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1010, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenDecimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2913:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 1013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2913:40:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e20646563696d616c732e20506c6561736520636865636b20617267756d656e74732e", + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2963:62:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_984353017a3e5d4b2995ed8ec56faa3d144c96f6e7a16298eed064720b2a0901", + "typeString": "literal_string \"Error: Unable to set token decimals. Please check arguments.\"" + }, + "value": "Error: Unable to set token decimals. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_984353017a3e5d4b2995ed8ec56faa3d144c96f6e7a16298eed064720b2a0901", + "typeString": "literal_string \"Error: Unable to set token decimals. Please check arguments.\"" + } + ], + "id": 1008, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2905:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:121:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1016, + "nodeType": "ExpressionStatement", + "src": "2905:121:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1020, + "name": "_feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 967, + "src": "3061:12:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1018, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3042:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2102, + "src": "3042:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 1021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3042:32:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742e20506c6561736520636865636b20617267756d656e74732e", + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3084:60:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d56731c6af5d7a18359bcc1d0d4d9e58ed62ffcb6e170e5fa9cb217035b6bedf", + "typeString": "literal_string \"Error: Unable to set fee contract. Please check arguments.\"" + }, + "value": "Error: Unable to set fee contract. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d56731c6af5d7a18359bcc1d0d4d9e58ed62ffcb6e170e5fa9cb217035b6bedf", + "typeString": "literal_string \"Error: Unable to set fee contract. Please check arguments.\"" + } + ], + "id": 1017, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "3034:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3034:111:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1024, + "nodeType": "ExpressionStatement", + "src": "3034:111:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1028, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 959, + "src": "3181:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1029, + "name": "_fxUSDBPSRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 969, + "src": "3190:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1026, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3161:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFxUSDBPSRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4542, + "src": "3161:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3161:43:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066782055534420626173697320706f696e747320726174652e20506c6561736520636865636b20617267756d656e74732e", + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3214:72:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_089d75b9656e8f27becbd3baa3fa44d6933e03b685d6a5a6a71eef402959560e", + "typeString": "literal_string \"Error: Unable to set fx USD basis points rate. Please check arguments.\"" + }, + "value": "Error: Unable to set fx USD basis points rate. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_089d75b9656e8f27becbd3baa3fa44d6933e03b685d6a5a6a71eef402959560e", + "typeString": "literal_string \"Error: Unable to set fx USD basis points rate. Please check arguments.\"" + } + ], + "id": 1025, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "3153:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3153:134:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1033, + "nodeType": "ExpressionStatement", + "src": "3153:134:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3302:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 975, + "id": 1035, + "nodeType": "Return", + "src": "3295:11:5" + } + ] + }, + "documentation": "@notice Sets erc20 globals and fee paramters\n@param _name Full token name 'USD by token.io'\n@param _symbol Symbol name 'USDx'\n@param _tla Three letter abbreviation 'USD'\n@param _version Release version 'v0.0.1'\n@param _decimals Decimal precision\n@param _feeContract Address of fee contract\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1037, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 972, + "modifierName": { + "argumentTypes": null, + "id": 971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2413:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2413:9:5" + } + ], + "name": "setParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 957, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2266:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 956, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2266:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 959, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2284:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 958, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2284:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 961, + "name": "_tla", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2304:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 960, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2304:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 963, + "name": "_version", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2321:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 962, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2321:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 965, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2342:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 964, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2342:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 967, + "name": "_feeContract", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2362:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 966, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2362:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 969, + "name": "_fxUSDBPSRate", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2388:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 968, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2388:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2260:152:5" + }, + "payable": false, + "returnParameters": { + "id": 975, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 974, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2439:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 973, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2439:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2438:14:5" + }, + "scope": 1351, + "src": "2242:1071:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1049, + "nodeType": "Block", + "src": "3468:53:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1045, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3508:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3500:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3500:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1042, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3483:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1043, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenName", + "nodeType": "MemberAccess", + "referencedDeclaration": 2408, + "src": "3483:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3483:31:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1041, + "id": 1048, + "nodeType": "Return", + "src": "3476:38:5" + } + ] + }, + "documentation": "@notice Gets name of token\n@return {\"_name\" : \"Returns name of token\"}", + "id": 1050, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [], + "src": "3430:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1041, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1040, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 1050, + "src": "3454:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1039, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3454:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3453:14:5" + }, + "scope": 1351, + "src": "3417:104:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1062, + "nodeType": "Block", + "src": "3686:55:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1058, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3728:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3720:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3720:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1055, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3701:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1056, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "3701:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3701:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1054, + "id": 1061, + "nodeType": "Return", + "src": "3694:40:5" + } + ] + }, + "documentation": "@notice Gets symbol of token\n@return {\"_symbol\" : \"Returns symbol of token\"}", + "id": 1063, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [], + "src": "3646:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "3670:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1052, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3670:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3669:16:5" + }, + "scope": 1351, + "src": "3631:110:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1075, + "nodeType": "Block", + "src": "3935:52:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1071, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3974:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1070, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3966:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3966:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1068, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3950:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1069, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenTLA", + "nodeType": "MemberAccess", + "referencedDeclaration": 2460, + "src": "3950:15:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3950:30:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1067, + "id": 1074, + "nodeType": "Return", + "src": "3943:37:5" + } + ] + }, + "documentation": "@notice Gets three-letter-abbreviation of token\n@return {\"_tla\" : \"Returns three-letter-abbreviation of token\"}", + "id": 1076, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "tla", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [], + "src": "3898:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1066, + "name": "_tla", + "nodeType": "VariableDeclaration", + "scope": 1076, + "src": "3922:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1065, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3922:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3921:13:5" + }, + "scope": 1351, + "src": "3886:101:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1088, + "nodeType": "Block", + "src": "4157:56:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1084, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "4200:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4192:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4192:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1081, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4172:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1082, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenVersion", + "nodeType": "MemberAccess", + "referencedDeclaration": 2486, + "src": "4172:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4172:34:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1080, + "id": 1087, + "nodeType": "Return", + "src": "4165:41:5" + } + ] + }, + "documentation": "@notice Gets version of token\n@return {\"_version\" : \"Returns version of token\"}", + "id": 1089, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "version", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1077, + "nodeType": "ParameterList", + "parameters": [], + "src": "4116:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1079, + "name": "_version", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "4140:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1078, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4140:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4139:17:5" + }, + "scope": 1351, + "src": "4100:113:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1104, + "nodeType": "Block", + "src": "4387:77:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1099, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "4450:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4442:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4442:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1096, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4423:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "4423:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4423:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1094, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4402:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1095, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenDecimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 2512, + "src": "4402:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4402:55:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1093, + "id": 1103, + "nodeType": "Return", + "src": "4395:62:5" + } + ] + }, + "documentation": "@notice Gets decimals of token\n@return {\"_decimals\" : \"Returns number of decimals\"}", + "id": 1105, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1090, + "nodeType": "ParameterList", + "parameters": [], + "src": "4347:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 1105, + "src": "4371:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4371:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4370:16:5" + }, + "scope": 1351, + "src": "4330:134:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1120, + "nodeType": "Block", + "src": "4650:75:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1115, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "4711:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4703:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4703:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1112, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4684:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "4684:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4684:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4665:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 2762, + "src": "4665:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4665:53:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1109, + "id": 1119, + "nodeType": "Return", + "src": "4658:60:5" + } + ] + }, + "documentation": "@notice Gets total supply of token\n@return {\"supply\" : \"Returns current total supply of token\"}", + "id": 1121, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1106, + "nodeType": "ParameterList", + "parameters": [], + "src": "4613:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1108, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 1121, + "src": "4637:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1107, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4637:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4636:13:5" + }, + "scope": 1351, + "src": "4593:132:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1142, + "nodeType": "Block", + "src": "5050:96:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1135, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "5114:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5106:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5106:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1132, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5087:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "5087:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1138, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "5122:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1125, + "src": "5131:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1130, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5065:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2800, + "src": "5065:21:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5065:74:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1129, + "id": 1141, + "nodeType": "Return", + "src": "5058:81:5" + } + ] + }, + "documentation": "@notice Gets allowance that spender has with approver\n@param account Address of approver\n@param spender Address of spender\n@return {\"amount\" : \"Returns allowance of given account and spender\"}", + "id": 1143, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1123, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "4982:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4982:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1125, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "4999:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4999:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4981:34:5" + }, + "payable": false, + "returnParameters": { + "id": 1129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1128, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "5037:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1127, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5037:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5036:13:5" + }, + "scope": 1351, + "src": "4963:183:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1161, + "nodeType": "Block", + "src": "5377:85:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1155, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "5439:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5431:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5431:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1152, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5412:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "5412:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5412:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1158, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1145, + "src": "5447:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1150, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5392:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1151, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2832, + "src": "5392:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5392:63:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1149, + "id": 1160, + "nodeType": "Return", + "src": "5385:70:5" + } + ] + }, + "documentation": "@notice Gets balance of account\n@param account Address for balance lookup\n@return {\"balance\" : \"Returns balance amount\"}", + "id": 1162, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1145, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1162, + "src": "5325:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1144, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5325:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5324:17:5" + }, + "payable": false, + "returnParameters": { + "id": 1149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1148, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1162, + "src": "5363:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1147, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5363:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5362:14:5" + }, + "scope": 1351, + "src": "5306:156:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1209, + "nodeType": "Block", + "src": "5859:295:5", + "statements": [ + { + "assignments": [ + 1178 + ], + "declarations": [ + { + "constant": false, + "id": 1178, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5867:19:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1177, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5867:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1185, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1182, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "5916:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5908:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5908:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1179, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5889:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1180, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "5889:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 1184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5889:33:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5867:55:5" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "5961:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5947:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2538, + "src": "5947:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5947:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1192, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "5997:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1190, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5983:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2564, + "src": "5983:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5983:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1196, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "6033:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1194, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6019:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "6019:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6019:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1200, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "6070:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1198, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6055:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2616, + "src": "6055:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:27:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1204, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "6106:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1202, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6092:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "6092:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6092:26:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 1206, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "6128:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1207, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5937:210:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 1176, + "id": 1208, + "nodeType": "Return", + "src": "5930:217:5" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Fee amount as a mesuare of basis points\",\n\"min\":\"Minimum fee amount\",\n\"max\":\"Maximum fee amount\",\n\"flat\":\"Flat fee amount\",\n\"contract\":\"Address of fee contract\"\n}", + "id": 1210, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1163, + "nodeType": "ParameterList", + "parameters": [], + "src": "5760:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1165, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5784:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1164, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5784:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1167, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5794:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5794:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1169, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5804:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1168, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5804:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1171, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5814:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1170, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5814:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1173, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5825:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1172, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5825:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1175, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5839:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5839:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5783:75:5" + }, + "scope": 1351, + "src": "5739:415:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1228, + "nodeType": "Block", + "src": "6453:82:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1222, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "6513:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6505:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6505:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1219, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6486:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "6486:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6486:33:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1225, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "6521:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1217, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6468:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1218, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 3004, + "src": "6468:17:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 1226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6468:60:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1216, + "id": 1227, + "nodeType": "Return", + "src": "6461:67:5" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount Amount to calculcate fee value\n@return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}", + "id": 1229, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1212, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1229, + "src": "6408:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1211, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6408:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6407:13:5" + }, + "payable": false, + "returnParameters": { + "id": 1216, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1215, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 1229, + "src": "6442:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1214, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6442:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6441:11:5" + }, + "scope": 1351, + "src": "6385:150:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1258, + "nodeType": "Block", + "src": "6854:288:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1246, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "7008:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7000:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7000:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1243, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6981:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1244, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "6981:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6981:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1249, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "7016:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1250, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "7020:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 1251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7028:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 1241, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6968:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1242, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3156, + "src": "6968:12:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6968:66:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d65746572732e", + "id": 1253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7044:64:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7b56f975cae833aef0f2ad6bba848437a58a03519ddd4635658465a8db99bc8b", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters.\"" + }, + "value": "Error: Unable to transfer funds. Please check your parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7b56f975cae833aef0f2ad6bba848437a58a03519ddd4635658465a8db99bc8b", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters.\"" + } + ], + "id": 1240, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6951:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6951:165:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1255, + "nodeType": "ExpressionStatement", + "src": "6951:165:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7131:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1239, + "id": 1257, + "nodeType": "Return", + "src": "7124:11:5" + } + ] + }, + "documentation": "@notice transfers 'amount' from msg.sender to a receiving account 'to'\n@param to Receiving address\n@param amount Transfer amount\n@return {\"success\" : \"Returns true if transfer succeeds\"}", + "id": 1259, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1236, + "modifierName": { + "argumentTypes": null, + "id": 1235, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1350, + "src": "6817:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6817:13:5" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1234, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1231, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "6785:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1230, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6785:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1233, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "6797:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1232, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6797:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6784:25:5" + }, + "payable": false, + "returnParameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1238, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "6840:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1237, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6840:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6839:14:5" + }, + "scope": 1351, + "src": "6767:375:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1291, + "nodeType": "Block", + "src": "7522:371:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1278, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "7685:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7677:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7677:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1275, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "7658:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1276, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "7658:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7658:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1281, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "7693:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1282, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "7699:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1283, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "7703:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7711:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 1273, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "7641:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3252, + "src": "7641:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7641:76:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d657465727320616e6420656e7375726520746865207370656e646572206861732074686520617070726f76656420616d6f756e74206f662066756e647320746f207472616e736665722e", + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7727:132:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_90b3ee7dad40e5e7ebb3851f6571fdf83a7fec9d6544d7d132d092fa849919cf", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"" + }, + "value": "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_90b3ee7dad40e5e7ebb3851f6571fdf83a7fec9d6544d7d132d092fa849919cf", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"" + } + ], + "id": 1272, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "7624:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7624:243:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1288, + "nodeType": "ExpressionStatement", + "src": "7624:243:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7882:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1271, + "id": 1290, + "nodeType": "Return", + "src": "7875:11:5" + } + ] + }, + "documentation": "@notice spender transfers from approvers account to the reciving account\n@param from Approver's address\n@param to Receiving address\n@param amount Transfer amount\n@return {\"success\" : \"Returns true if transferFrom succeeds\"}", + "id": 1292, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1268, + "modifierName": { + "argumentTypes": null, + "id": 1267, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1350, + "src": "7485:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7485:13:5" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1261, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1292, + "src": "7439:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1260, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7439:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1263, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1292, + "src": "7453:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7453:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1292, + "src": "7465:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7465:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7438:39:5" + }, + "payable": false, + "returnParameters": { + "id": 1271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1270, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1292, + "src": "7508:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7508:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7507:14:5" + }, + "scope": 1351, + "src": "7417:476:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1314, + "nodeType": "Block", + "src": "8190:315:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1306, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1294, + "src": "8326:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1307, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1296, + "src": "8335:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1304, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "8305:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1305, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "approveAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 3524, + "src": "8305:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8305:37:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f766520616c6c6f77616e636520666f72207370656e6465722e20506c6561736520656e73757265207370656e646572206973206e6f74206e756c6c20616e6420646f6573206e6f74206861766520612066726f7a656e2062616c616e63652e", + "id": 1309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8352:119:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_10872a80d40cd7a7ea8407e27ca3b5f442e099403eb78ad6b966b1054a4f032f", + "typeString": "literal_string \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"" + }, + "value": "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_10872a80d40cd7a7ea8407e27ca3b5f442e099403eb78ad6b966b1054a4f032f", + "typeString": "literal_string \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"" + } + ], + "id": 1303, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8288:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8288:191:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1311, + "nodeType": "ExpressionStatement", + "src": "8288:191:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8494:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1302, + "id": 1313, + "nodeType": "Return", + "src": "8487:11:5" + } + ] + }, + "documentation": "@notice approves spender a given amount\n@param spender Spender's address\n@param amount Allowance amount\n@return {\"success\" : \"Returns true if approve succeeds\"}", + "id": 1315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1299, + "modifierName": { + "argumentTypes": null, + "id": 1298, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1350, + "src": "8153:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8153:13:5" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1294, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1315, + "src": "8116:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8116:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1296, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1315, + "src": "8133:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1295, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8133:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8115:30:5" + }, + "payable": false, + "returnParameters": { + "id": 1302, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1301, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1315, + "src": "8176:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1300, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8176:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8175:14:5" + }, + "scope": 1351, + "src": "8099:406:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1334, + "nodeType": "Block", + "src": "8723:131:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1326, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "8773:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8765:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8765:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1323, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "8739:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setDeprecatedContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 4188, + "src": "8739:25:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 1328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8739:40:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2064657072656361746520636f6e747261637421", + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8789:38:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f549c81276a394c8d1eccc4a6bca4eec7c9bb1e25bd84511bd278b767e7ca4e8", + "typeString": "literal_string \"Error: Unable to deprecate contract!\"" + }, + "value": "Error: Unable to deprecate contract!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f549c81276a394c8d1eccc4a6bca4eec7c9bb1e25bd84511bd278b767e7ca4e8", + "typeString": "literal_string \"Error: Unable to deprecate contract!\"" + } + ], + "id": 1322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8731:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8731:97:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1331, + "nodeType": "ExpressionStatement", + "src": "8731:97:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8843:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1321, + "id": 1333, + "nodeType": "Return", + "src": "8836:11:5" + } + ] + }, + "documentation": "@notice gets currency status of contract\n@return {\"deprecated\" : \"Returns true if deprecated, false otherwise\"}", + "id": 1335, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1318, + "modifierName": { + "argumentTypes": null, + "id": 1317, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "8687:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8687:9:5" + } + ], + "name": "deprecateInterface", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1316, + "nodeType": "ParameterList", + "parameters": [], + "src": "8677:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1320, + "name": "deprecated", + "nodeType": "VariableDeclaration", + "scope": 1335, + "src": "8706:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1319, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8706:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8705:17:5" + }, + "scope": 1351, + "src": "8650:204:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1349, + "nodeType": "Block", + "src": "8885:198:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8952:40:5", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1341, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "8986:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8978:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8978:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1338, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "8953:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1339, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isContractDeprecated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4214, + "src": "8953:24:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 1343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8953:39:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20436f6e747261637420686173206265656e20646570726563617465642c2063616e6e6f7420706572666f726d206f7065726174696f6e21", + "id": 1345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9002:64:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a6979b55ecdc4b5fbdddeea2b203ef30bc5c99bf716d9b4a8c9faef6ad0dbbcc", + "typeString": "literal_string \"Error: Contract has been deprecated, cannot perform operation!\"" + }, + "value": "Error: Contract has been deprecated, cannot perform operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a6979b55ecdc4b5fbdddeea2b203ef30bc5c99bf716d9b4a8c9faef6ad0dbbcc", + "typeString": "literal_string \"Error: Contract has been deprecated, cannot perform operation!\"" + } + ], + "id": 1337, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8944:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:123:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1347, + "nodeType": "ExpressionStatement", + "src": "8944:123:5" + }, + { + "id": 1348, + "nodeType": "PlaceholderStatement", + "src": "9075:1:5" + } + ] + }, + "documentation": null, + "id": 1350, + "name": "notDeprecated", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1336, + "nodeType": "ParameterList", + "parameters": [], + "src": "8882:2:5" + }, + "src": "8860:223:5", + "visibility": "internal" + } + ], + "scope": 1352, + "src": "1060:8028:5" + } + ], + "src": "0:9089:5" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOERC20.sol", + "exportedSymbols": { + "TokenIOERC20": [ + 1351 + ] + }, + "id": 1352, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 924, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 925, + "nodeType": "ImportDirective", + "scope": 1352, + "sourceUnit": 185, + "src": "25:23:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 926, + "nodeType": "ImportDirective", + "scope": 1352, + "sourceUnit": 5242, + "src": "49:30:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 927, + "nodeType": "ImportDirective", + "scope": 1352, + "sourceUnit": 4623, + "src": "80:26:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 928, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1085:7:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 929, + "nodeType": "InheritanceSpecifier", + "src": "1085:7:5" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1351, + "linearizedBaseContracts": [ + 1351, + 184 + ], + "name": "TokenIOERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 932, + "libraryName": { + "contractScope": null, + "id": 930, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1185:10:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1179:37:5", + "typeName": { + "contractScope": null, + "id": 931, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1200:15:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 934, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1351, + "src": "1219:19:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 933, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1219:15:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 954, + "nodeType": "Block", + "src": "1416:420:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 939, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "1708:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 941, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1708:11:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 943, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "1737:16:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 942, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1722:14:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1722:32:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1708:46:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 946, + "nodeType": "ExpressionStatement", + "src": "1708:46:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 947, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1807:5:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 950, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 948, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1813:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1813:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1807:17:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1827:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1807:24:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 953, + "nodeType": "ExpressionStatement", + "src": "1807:24:5" + } + ] + }, + "documentation": "@notice Constructor method for ERC20 contract\n@param _storageContract address of TokenIOStorage contract", + "id": 955, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 936, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 955, + "src": "1383:24:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 935, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1383:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1382:26:5" + }, + "payable": false, + "returnParameters": { + "id": 938, + "nodeType": "ParameterList", + "parameters": [], + "src": "1416:0:5" + }, + "scope": 1351, + "src": "1371:465:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1036, + "nodeType": "Block", + "src": "2453:860:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 979, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 957, + "src": "2486:5:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 977, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2469:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 978, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenName", + "nodeType": "MemberAccess", + "referencedDeclaration": 1762, + "src": "2469:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:23:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e206e616d652e20506c6561736520636865636b20617267756d656e74732e", + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2502:58:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_141dfda9ec7d030d71a0272572dd425cf90676e5296d5f58002425f3caea3960", + "typeString": "literal_string \"Error: Unable to set token name. Please check arguments.\"" + }, + "value": "Error: Unable to set token name. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_141dfda9ec7d030d71a0272572dd425cf90676e5296d5f58002425f3caea3960", + "typeString": "literal_string \"Error: Unable to set token name. Please check arguments.\"" + } + ], + "id": 976, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2461:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2461:100:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 983, + "nodeType": "ExpressionStatement", + "src": "2461:100:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 959, + "src": "2596:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 985, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2577:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1796, + "src": "2577:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2577:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e2073796d626f6c2e20506c6561736520636865636b20617267756d656e74732e", + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:60:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a4d419aaf1b7e0c1b217a216005ff121a20a3a58ed5048acbd3d22a85502af69", + "typeString": "literal_string \"Error: Unable to set token symbol. Please check arguments.\"" + }, + "value": "Error: Unable to set token symbol. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a4d419aaf1b7e0c1b217a216005ff121a20a3a58ed5048acbd3d22a85502af69", + "typeString": "literal_string \"Error: Unable to set token symbol. Please check arguments.\"" + } + ], + "id": 984, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2569:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:106:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 991, + "nodeType": "ExpressionStatement", + "src": "2569:106:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 995, + "name": "_tla", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 961, + "src": "2707:4:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 993, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2691:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 994, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenTLA", + "nodeType": "MemberAccess", + "referencedDeclaration": 1830, + "src": "2691:15:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2691:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e20544c412e20506c6561736520636865636b20617267756d656e74732e", + "id": 997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2722:57:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7221954eb7ab5ca7d7e112df96ffa1ba108181fc69cf565d48f56781bc167176", + "typeString": "literal_string \"Error: Unable to set token TLA. Please check arguments.\"" + }, + "value": "Error: Unable to set token TLA. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7221954eb7ab5ca7d7e112df96ffa1ba108181fc69cf565d48f56781bc167176", + "typeString": "literal_string \"Error: Unable to set token TLA. Please check arguments.\"" + } + ], + "id": 992, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2683:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2683:97:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "2683:97:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1003, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 963, + "src": "2816:8:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2796:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenVersion", + "nodeType": "MemberAccess", + "referencedDeclaration": 1864, + "src": "2796:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 1004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2796:29:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e2076657273696f6e2e20506c6561736520636865636b20617267756d656e74732e", + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:61:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0e049f6dc7ca1210cdbb63f5bd5546abce5203f36e68544787d7650cbf630ddb", + "typeString": "literal_string \"Error: Unable to set token version. Please check arguments.\"" + }, + "value": "Error: Unable to set token version. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0e049f6dc7ca1210cdbb63f5bd5546abce5203f36e68544787d7650cbf630ddb", + "typeString": "literal_string \"Error: Unable to set token version. Please check arguments.\"" + } + ], + "id": 1000, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2788:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2788:109:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1007, + "nodeType": "ExpressionStatement", + "src": "2788:109:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1011, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 959, + "src": "2934:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1012, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 965, + "src": "2943:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1009, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "2913:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1010, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenDecimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2913:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 1013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2913:40:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e20646563696d616c732e20506c6561736520636865636b20617267756d656e74732e", + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2963:62:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_984353017a3e5d4b2995ed8ec56faa3d144c96f6e7a16298eed064720b2a0901", + "typeString": "literal_string \"Error: Unable to set token decimals. Please check arguments.\"" + }, + "value": "Error: Unable to set token decimals. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_984353017a3e5d4b2995ed8ec56faa3d144c96f6e7a16298eed064720b2a0901", + "typeString": "literal_string \"Error: Unable to set token decimals. Please check arguments.\"" + } + ], + "id": 1008, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2905:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:121:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1016, + "nodeType": "ExpressionStatement", + "src": "2905:121:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1020, + "name": "_feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 967, + "src": "3061:12:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1018, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3042:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2102, + "src": "3042:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 1021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3042:32:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742e20506c6561736520636865636b20617267756d656e74732e", + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3084:60:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d56731c6af5d7a18359bcc1d0d4d9e58ed62ffcb6e170e5fa9cb217035b6bedf", + "typeString": "literal_string \"Error: Unable to set fee contract. Please check arguments.\"" + }, + "value": "Error: Unable to set fee contract. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d56731c6af5d7a18359bcc1d0d4d9e58ed62ffcb6e170e5fa9cb217035b6bedf", + "typeString": "literal_string \"Error: Unable to set fee contract. Please check arguments.\"" + } + ], + "id": 1017, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "3034:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3034:111:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1024, + "nodeType": "ExpressionStatement", + "src": "3034:111:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1028, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 959, + "src": "3181:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1029, + "name": "_fxUSDBPSRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 969, + "src": "3190:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1026, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3161:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFxUSDBPSRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4542, + "src": "3161:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3161:43:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066782055534420626173697320706f696e747320726174652e20506c6561736520636865636b20617267756d656e74732e", + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3214:72:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_089d75b9656e8f27becbd3baa3fa44d6933e03b685d6a5a6a71eef402959560e", + "typeString": "literal_string \"Error: Unable to set fx USD basis points rate. Please check arguments.\"" + }, + "value": "Error: Unable to set fx USD basis points rate. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_089d75b9656e8f27becbd3baa3fa44d6933e03b685d6a5a6a71eef402959560e", + "typeString": "literal_string \"Error: Unable to set fx USD basis points rate. Please check arguments.\"" + } + ], + "id": 1025, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "3153:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3153:134:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1033, + "nodeType": "ExpressionStatement", + "src": "3153:134:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3302:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 975, + "id": 1035, + "nodeType": "Return", + "src": "3295:11:5" + } + ] + }, + "documentation": "@notice Sets erc20 globals and fee paramters\n@param _name Full token name 'USD by token.io'\n@param _symbol Symbol name 'USDx'\n@param _tla Three letter abbreviation 'USD'\n@param _version Release version 'v0.0.1'\n@param _decimals Decimal precision\n@param _feeContract Address of fee contract\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1037, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 972, + "modifierName": { + "argumentTypes": null, + "id": 971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2413:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2413:9:5" + } + ], + "name": "setParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 957, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2266:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 956, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2266:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 959, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2284:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 958, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2284:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 961, + "name": "_tla", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2304:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 960, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2304:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 963, + "name": "_version", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2321:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 962, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2321:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 965, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2342:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 964, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2342:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 967, + "name": "_feeContract", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2362:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 966, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2362:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 969, + "name": "_fxUSDBPSRate", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2388:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 968, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2388:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2260:152:5" + }, + "payable": false, + "returnParameters": { + "id": 975, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 974, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1037, + "src": "2439:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 973, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2439:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2438:14:5" + }, + "scope": 1351, + "src": "2242:1071:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1049, + "nodeType": "Block", + "src": "3468:53:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1045, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3508:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3500:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3500:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1042, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3483:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1043, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenName", + "nodeType": "MemberAccess", + "referencedDeclaration": 2408, + "src": "3483:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3483:31:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1041, + "id": 1048, + "nodeType": "Return", + "src": "3476:38:5" + } + ] + }, + "documentation": "@notice Gets name of token\n@return {\"_name\" : \"Returns name of token\"}", + "id": 1050, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [], + "src": "3430:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1041, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1040, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 1050, + "src": "3454:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1039, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3454:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3453:14:5" + }, + "scope": 1351, + "src": "3417:104:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1062, + "nodeType": "Block", + "src": "3686:55:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1058, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3728:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3720:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3720:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1055, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3701:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1056, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "3701:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3701:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1054, + "id": 1061, + "nodeType": "Return", + "src": "3694:40:5" + } + ] + }, + "documentation": "@notice Gets symbol of token\n@return {\"_symbol\" : \"Returns symbol of token\"}", + "id": 1063, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [], + "src": "3646:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "3670:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1052, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3670:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3669:16:5" + }, + "scope": 1351, + "src": "3631:110:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1075, + "nodeType": "Block", + "src": "3935:52:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1071, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3974:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1070, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3966:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3966:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1068, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "3950:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1069, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenTLA", + "nodeType": "MemberAccess", + "referencedDeclaration": 2460, + "src": "3950:15:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3950:30:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1067, + "id": 1074, + "nodeType": "Return", + "src": "3943:37:5" + } + ] + }, + "documentation": "@notice Gets three-letter-abbreviation of token\n@return {\"_tla\" : \"Returns three-letter-abbreviation of token\"}", + "id": 1076, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "tla", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [], + "src": "3898:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1066, + "name": "_tla", + "nodeType": "VariableDeclaration", + "scope": 1076, + "src": "3922:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1065, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3922:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3921:13:5" + }, + "scope": 1351, + "src": "3886:101:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1088, + "nodeType": "Block", + "src": "4157:56:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1084, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "4200:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4192:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4192:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1081, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4172:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1082, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenVersion", + "nodeType": "MemberAccess", + "referencedDeclaration": 2486, + "src": "4172:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4172:34:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1080, + "id": 1087, + "nodeType": "Return", + "src": "4165:41:5" + } + ] + }, + "documentation": "@notice Gets version of token\n@return {\"_version\" : \"Returns version of token\"}", + "id": 1089, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "version", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1077, + "nodeType": "ParameterList", + "parameters": [], + "src": "4116:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1079, + "name": "_version", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "4140:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1078, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4140:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4139:17:5" + }, + "scope": 1351, + "src": "4100:113:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1104, + "nodeType": "Block", + "src": "4387:77:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1099, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "4450:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4442:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4442:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1096, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4423:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "4423:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4423:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1094, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4402:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1095, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenDecimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 2512, + "src": "4402:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4402:55:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1093, + "id": 1103, + "nodeType": "Return", + "src": "4395:62:5" + } + ] + }, + "documentation": "@notice Gets decimals of token\n@return {\"_decimals\" : \"Returns number of decimals\"}", + "id": 1105, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1090, + "nodeType": "ParameterList", + "parameters": [], + "src": "4347:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 1105, + "src": "4371:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4371:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4370:16:5" + }, + "scope": 1351, + "src": "4330:134:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1120, + "nodeType": "Block", + "src": "4650:75:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1115, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "4711:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4703:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4703:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1112, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4684:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "4684:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4684:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "4665:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 2762, + "src": "4665:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4665:53:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1109, + "id": 1119, + "nodeType": "Return", + "src": "4658:60:5" + } + ] + }, + "documentation": "@notice Gets total supply of token\n@return {\"supply\" : \"Returns current total supply of token\"}", + "id": 1121, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1106, + "nodeType": "ParameterList", + "parameters": [], + "src": "4613:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1108, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 1121, + "src": "4637:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1107, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4637:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4636:13:5" + }, + "scope": 1351, + "src": "4593:132:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1142, + "nodeType": "Block", + "src": "5050:96:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1135, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "5114:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5106:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5106:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1132, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5087:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "5087:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1138, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "5122:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1125, + "src": "5131:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1130, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5065:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2800, + "src": "5065:21:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5065:74:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1129, + "id": 1141, + "nodeType": "Return", + "src": "5058:81:5" + } + ] + }, + "documentation": "@notice Gets allowance that spender has with approver\n@param account Address of approver\n@param spender Address of spender\n@return {\"amount\" : \"Returns allowance of given account and spender\"}", + "id": 1143, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1123, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "4982:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4982:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1125, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "4999:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4999:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4981:34:5" + }, + "payable": false, + "returnParameters": { + "id": 1129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1128, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "5037:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1127, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5037:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5036:13:5" + }, + "scope": 1351, + "src": "4963:183:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1161, + "nodeType": "Block", + "src": "5377:85:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1155, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "5439:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5431:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5431:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1152, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5412:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "5412:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5412:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1158, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1145, + "src": "5447:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1150, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5392:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1151, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2832, + "src": "5392:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5392:63:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1149, + "id": 1160, + "nodeType": "Return", + "src": "5385:70:5" + } + ] + }, + "documentation": "@notice Gets balance of account\n@param account Address for balance lookup\n@return {\"balance\" : \"Returns balance amount\"}", + "id": 1162, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1145, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1162, + "src": "5325:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1144, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5325:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5324:17:5" + }, + "payable": false, + "returnParameters": { + "id": 1149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1148, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1162, + "src": "5363:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1147, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5363:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5362:14:5" + }, + "scope": 1351, + "src": "5306:156:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1209, + "nodeType": "Block", + "src": "5859:295:5", + "statements": [ + { + "assignments": [ + 1178 + ], + "declarations": [ + { + "constant": false, + "id": 1178, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5867:19:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1177, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5867:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1185, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1182, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "5916:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5908:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5908:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1179, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5889:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1180, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "5889:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 1184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5889:33:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5867:55:5" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "5961:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5947:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2538, + "src": "5947:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5947:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1192, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "5997:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1190, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "5983:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2564, + "src": "5983:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5983:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1196, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "6033:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1194, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6019:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "6019:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6019:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1200, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "6070:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1198, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6055:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2616, + "src": "6055:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:27:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1204, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "6106:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1202, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6092:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "6092:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6092:26:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 1206, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "6128:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1207, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5937:210:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 1176, + "id": 1208, + "nodeType": "Return", + "src": "5930:217:5" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Fee amount as a mesuare of basis points\",\n\"min\":\"Minimum fee amount\",\n\"max\":\"Maximum fee amount\",\n\"flat\":\"Flat fee amount\",\n\"contract\":\"Address of fee contract\"\n}", + "id": 1210, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1163, + "nodeType": "ParameterList", + "parameters": [], + "src": "5760:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1165, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5784:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1164, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5784:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1167, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5794:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5794:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1169, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5804:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1168, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5804:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1171, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5814:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1170, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5814:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1173, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5825:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1172, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5825:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1175, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 1210, + "src": "5839:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5839:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5783:75:5" + }, + "scope": 1351, + "src": "5739:415:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1228, + "nodeType": "Block", + "src": "6453:82:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1222, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "6513:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6505:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6505:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1219, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6486:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "6486:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6486:33:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1225, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "6521:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1217, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6468:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1218, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 3004, + "src": "6468:17:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 1226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6468:60:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1216, + "id": 1227, + "nodeType": "Return", + "src": "6461:67:5" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount Amount to calculcate fee value\n@return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}", + "id": 1229, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1212, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1229, + "src": "6408:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1211, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6408:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6407:13:5" + }, + "payable": false, + "returnParameters": { + "id": 1216, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1215, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 1229, + "src": "6442:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1214, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6442:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6441:11:5" + }, + "scope": 1351, + "src": "6385:150:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1258, + "nodeType": "Block", + "src": "6854:288:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1246, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "7008:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7000:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7000:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1243, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6981:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1244, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "6981:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6981:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1249, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "7016:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1250, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "7020:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 1251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7028:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 1241, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "6968:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1242, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3156, + "src": "6968:12:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6968:66:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d65746572732e", + "id": 1253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7044:64:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7b56f975cae833aef0f2ad6bba848437a58a03519ddd4635658465a8db99bc8b", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters.\"" + }, + "value": "Error: Unable to transfer funds. Please check your parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7b56f975cae833aef0f2ad6bba848437a58a03519ddd4635658465a8db99bc8b", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters.\"" + } + ], + "id": 1240, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6951:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6951:165:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1255, + "nodeType": "ExpressionStatement", + "src": "6951:165:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7131:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1239, + "id": 1257, + "nodeType": "Return", + "src": "7124:11:5" + } + ] + }, + "documentation": "@notice transfers 'amount' from msg.sender to a receiving account 'to'\n@param to Receiving address\n@param amount Transfer amount\n@return {\"success\" : \"Returns true if transfer succeeds\"}", + "id": 1259, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1236, + "modifierName": { + "argumentTypes": null, + "id": 1235, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1350, + "src": "6817:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6817:13:5" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1234, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1231, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "6785:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1230, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6785:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1233, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "6797:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1232, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6797:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6784:25:5" + }, + "payable": false, + "returnParameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1238, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "6840:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1237, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6840:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6839:14:5" + }, + "scope": 1351, + "src": "6767:375:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1291, + "nodeType": "Block", + "src": "7522:371:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1278, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "7685:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7677:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7677:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1275, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "7658:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1276, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2434, + "src": "7658:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7658:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1281, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "7693:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1282, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "7699:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1283, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "7703:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7711:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 1273, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "7641:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3252, + "src": "7641:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7641:76:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d657465727320616e6420656e7375726520746865207370656e646572206861732074686520617070726f76656420616d6f756e74206f662066756e647320746f207472616e736665722e", + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7727:132:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_90b3ee7dad40e5e7ebb3851f6571fdf83a7fec9d6544d7d132d092fa849919cf", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"" + }, + "value": "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_90b3ee7dad40e5e7ebb3851f6571fdf83a7fec9d6544d7d132d092fa849919cf", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"" + } + ], + "id": 1272, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "7624:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7624:243:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1288, + "nodeType": "ExpressionStatement", + "src": "7624:243:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7882:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1271, + "id": 1290, + "nodeType": "Return", + "src": "7875:11:5" + } + ] + }, + "documentation": "@notice spender transfers from approvers account to the reciving account\n@param from Approver's address\n@param to Receiving address\n@param amount Transfer amount\n@return {\"success\" : \"Returns true if transferFrom succeeds\"}", + "id": 1292, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1268, + "modifierName": { + "argumentTypes": null, + "id": 1267, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1350, + "src": "7485:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7485:13:5" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1261, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1292, + "src": "7439:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1260, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7439:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1263, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1292, + "src": "7453:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7453:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1292, + "src": "7465:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7465:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7438:39:5" + }, + "payable": false, + "returnParameters": { + "id": 1271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1270, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1292, + "src": "7508:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7508:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7507:14:5" + }, + "scope": 1351, + "src": "7417:476:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1314, + "nodeType": "Block", + "src": "8190:315:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1306, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1294, + "src": "8326:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1307, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1296, + "src": "8335:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1304, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "8305:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1305, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "approveAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 3524, + "src": "8305:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8305:37:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f766520616c6c6f77616e636520666f72207370656e6465722e20506c6561736520656e73757265207370656e646572206973206e6f74206e756c6c20616e6420646f6573206e6f74206861766520612066726f7a656e2062616c616e63652e", + "id": 1309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8352:119:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_10872a80d40cd7a7ea8407e27ca3b5f442e099403eb78ad6b966b1054a4f032f", + "typeString": "literal_string \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"" + }, + "value": "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_10872a80d40cd7a7ea8407e27ca3b5f442e099403eb78ad6b966b1054a4f032f", + "typeString": "literal_string \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"" + } + ], + "id": 1303, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8288:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8288:191:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1311, + "nodeType": "ExpressionStatement", + "src": "8288:191:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8494:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1302, + "id": 1313, + "nodeType": "Return", + "src": "8487:11:5" + } + ] + }, + "documentation": "@notice approves spender a given amount\n@param spender Spender's address\n@param amount Allowance amount\n@return {\"success\" : \"Returns true if approve succeeds\"}", + "id": 1315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1299, + "modifierName": { + "argumentTypes": null, + "id": 1298, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1350, + "src": "8153:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8153:13:5" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1294, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1315, + "src": "8116:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8116:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1296, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1315, + "src": "8133:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1295, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8133:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8115:30:5" + }, + "payable": false, + "returnParameters": { + "id": 1302, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1301, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1315, + "src": "8176:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1300, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8176:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8175:14:5" + }, + "scope": 1351, + "src": "8099:406:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1334, + "nodeType": "Block", + "src": "8723:131:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1326, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "8773:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8765:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8765:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1323, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "8739:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setDeprecatedContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 4188, + "src": "8739:25:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 1328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8739:40:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2064657072656361746520636f6e747261637421", + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8789:38:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f549c81276a394c8d1eccc4a6bca4eec7c9bb1e25bd84511bd278b767e7ca4e8", + "typeString": "literal_string \"Error: Unable to deprecate contract!\"" + }, + "value": "Error: Unable to deprecate contract!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f549c81276a394c8d1eccc4a6bca4eec7c9bb1e25bd84511bd278b767e7ca4e8", + "typeString": "literal_string \"Error: Unable to deprecate contract!\"" + } + ], + "id": 1322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8731:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8731:97:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1331, + "nodeType": "ExpressionStatement", + "src": "8731:97:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8843:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1321, + "id": 1333, + "nodeType": "Return", + "src": "8836:11:5" + } + ] + }, + "documentation": "@notice gets currency status of contract\n@return {\"deprecated\" : \"Returns true if deprecated, false otherwise\"}", + "id": 1335, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1318, + "modifierName": { + "argumentTypes": null, + "id": 1317, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "8687:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8687:9:5" + } + ], + "name": "deprecateInterface", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1316, + "nodeType": "ParameterList", + "parameters": [], + "src": "8677:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1320, + "name": "deprecated", + "nodeType": "VariableDeclaration", + "scope": 1335, + "src": "8706:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1319, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8706:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8705:17:5" + }, + "scope": 1351, + "src": "8650:204:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1349, + "nodeType": "Block", + "src": "8885:198:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8952:40:5", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1341, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "8986:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1351", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8978:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8978:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1338, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 934, + "src": "8953:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1339, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isContractDeprecated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4214, + "src": "8953:24:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 1343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8953:39:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20436f6e747261637420686173206265656e20646570726563617465642c2063616e6e6f7420706572666f726d206f7065726174696f6e21", + "id": 1345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9002:64:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a6979b55ecdc4b5fbdddeea2b203ef30bc5c99bf716d9b4a8c9faef6ad0dbbcc", + "typeString": "literal_string \"Error: Contract has been deprecated, cannot perform operation!\"" + }, + "value": "Error: Contract has been deprecated, cannot perform operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a6979b55ecdc4b5fbdddeea2b203ef30bc5c99bf716d9b4a8c9faef6ad0dbbcc", + "typeString": "literal_string \"Error: Contract has been deprecated, cannot perform operation!\"" + } + ], + "id": 1337, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8944:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:123:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1347, + "nodeType": "ExpressionStatement", + "src": "8944:123:5" + }, + { + "id": 1348, + "nodeType": "PlaceholderStatement", + "src": "9075:1:5" + } + ] + }, + "documentation": null, + "id": 1350, + "name": "notDeprecated", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1336, + "nodeType": "ParameterList", + "parameters": [], + "src": "8882:2:5" + }, + "src": "8860:223:5", + "visibility": "internal" + } + ], + "scope": 1352, + "src": "1060:8028:5" + } + ], + "src": "0:9089:5" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x40d378cb3a6ae236e504482e31af36edce336daa", + "transactionHash": "0xcf63686a41cdf5300f860fe7ebcc7643082d6ca98c4af6380b9a77a58e58d9c7" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.586Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIOFX.json b/deployed/mainnet/TokenIOFX.json new file mode 100644 index 0000000..597e40c --- /dev/null +++ b/deployed/mainnet/TokenIOFX.json @@ -0,0 +1,2192 @@ +{ + "contractName": "TokenIOFX", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "requester", + "type": "address" + }, + { + "name": "symbolA", + "type": "string" + }, + { + "name": "symbolB", + "type": "string" + }, + { + "name": "valueA", + "type": "uint256" + }, + { + "name": "valueB", + "type": "uint256" + }, + { + "name": "sigV", + "type": "uint8" + }, + { + "name": "sigR", + "type": "bytes32" + }, + { + "name": "sigS", + "type": "bytes32" + }, + { + "name": "expiration", + "type": "uint256" + } + ], + "name": "swap", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051602080611ee3833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a039094169390931783558154169091179055611e6d90819061007690396000f3006080604052600436106100535763ffffffff60e060020a6000350416634bbc142c8114610058578063666a34271461008d578063666e1b39146100ae578063987c6b9d146100cf578063f2fde38b14610194575b600080fd5b34801561006457600080fd5b50610079600160a060020a03600435166101b5565b604080519115158252519081900360200190f35b34801561009957600080fd5b50610079600160a060020a0360043516610295565b3480156100ba57600080fd5b50610079600160a060020a0360043516610372565b3480156100db57600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610079958335600160a060020a031695369560449491939091019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497505084359550505060208301359260ff60408201351692506060810135915060808101359060a00135610387565b3480156101a057600080fd5b50610079600160a060020a0360043516610454565b3360009081526020819052604081205460ff161515610244576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610324576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60006103a260018b8b8b8b8b8b8b8b8b63ffffffff6105b216565b1515610444576040805160e560020a62461bcd02815260206004820152604760248201527f4572726f723a20556e61626c6520746f20706572666f726d2061746f6d69632060448201527f63757272656e637920737761702e20506c6561736520636865636b207061726160648201527f6d65746572732e00000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b5060019998505050505050505050565b3360009081526020819052604081205460ff1615156104e3576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515610543576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b6000808a8a8a8a8a876040516020018087600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140186805190602001908083835b602083106106145780518252601f1990920191602091820191016105f5565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b6020831061065c5780518252601f19909201916020918201910161063d565b6001836020036101000a03801982511681845116808217855250505050505090500184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b602083106106d65780518252601f1990920191602091820191016106b7565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506107108c338d610c3c565b151561078c576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a204f6e6c79207665726966696564206163636f756e747320636160448201527f6e20706572666f726d2063757272656e63792073776170732e00000000000000606482015290519081900360840190fd5b6107968c82610da0565b1515610812576040805160e560020a62461bcd02815260206004820152603560248201527f4572726f723a204661696c656420746f20736574207472616e73616374696f6e60448201527f2073746174757320746f2066756c66696c6c65642e0000000000000000000000606482015290519081900360840190fd5b4283101561086a576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a205472616e73616374696f6e2068617320657870697265642100604482015290519081900360640190fd5b604080516000808252602080830180855285905260ff8a168385015260608301899052608083018890529251600160a060020a038f169360019360a0808201949293601f198101939281900390910191865af11580156108ce573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610984576040805160e560020a62461bcd02815260206004820152605660248201527f4572726f723a204164647265737320646572697665642066726f6d207472616e60448201527f73616374696f6e207369676e617475726520646f6573206e6f74206d6174636860648201527f2074686520726571756573746572206164647265737300000000000000000000608482015290519081900360a40190fd5b6109c78c8b338e8c6040805190810160405280600381526020017f307830000000000000000000000000000000000000000000000000000000000081525061105d565b1515610a43576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b610a868c8a8d338b6040805190810160405280600381526020017f307830000000000000000000000000000000000000000000000000000000000081525061105d565b1515610b02576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b7f8afc838de412aaa0858b29e225f1811126bc93a1e25da13505909c403d2097d18a8a8a8a87866040518080602001806020018781526020018681526020018581526020018460001916600019168152602001838103835289818151815260200191508051906020019080838360005b83811015610b8a578181015183820152602001610b72565b50505050905090810190601f168015610bb75780820380516001836020036101000a031916815260200191505b5083810382528851815288516020918201918a019080838360005b83811015610bea578181015183820152602001610bd2565b50505050905090810190601f168015610c175780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a15060019b9a5050505050505050505050565b6000610c488484611817565b1515610cea576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a204163636f756e74206973206e6f74207665726966696564206660448201527f6f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f60648201527f756e7420686173206265656e204b594320617070726f7665642e000000000000608482015290519081900360a40190fd5b610cf48483611817565b1515610d96576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a204163636f756e74206973206e6f74207665726966696564206660448201527f6f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f60648201527f756e7420686173206265656e204b594320617070726f7665642e000000000000608482015290519081900360a40190fd5b5060019392505050565b6000808260405160200180807f74782e737461747573000000000000000000000000000000000000000000000081525060090182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310610e225780518252601f199092019160209182019101610e03565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050610e5b848461192e565b15610efc576040805160e560020a62461bcd02815260206004820152604e60248201527f4572726f723a205472616e73616374696f6e20737461747573206d757374206260448201527f652066616c7365206265666f72652073657474696e6720746865207472616e7360648201527f616374696f6e207374617475732e000000000000000000000000000000000000608482015290519081900360a40190fd5b8354604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101849052600160248201529051600160a060020a039092169163abfdcced916044808201926020929091908290030181600087803b158015610f6957600080fd5b505af1158015610f7d573d6000803e3d6000fd5b505050506040513d6020811015610f9357600080fd5b50511515610d96576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b60008080600160a060020a03861615156110e7576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876110f28a89611a71565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061114c5780518252601f19909201916020918201910161112d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106111d75780518252601f1990920191602091820191016111b8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150876112118a88611a71565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061126b5780518252601f19909201916020918201910161124c565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106112f65780518252601f1990920191602091820191016112d7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018a90529451909750600160a060020a03909416955063e2a4853a945087936113c793508b92879263bd02d0f5926024808401938290030181600087803b15801561138f57600080fd5b505af11580156113a3573d6000803e3d6000fd5b505050506040513d60208110156113b957600080fd5b50519063ffffffff611bec16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b505050506040513d602081101561143957600080fd5b50511515611503576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8854604080517fbd02d0f5000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163e2a4853a9184916115b0918a91869163bd02d0f59160248083019260209291908290030181600087803b15801561157857600080fd5b505af115801561158c573d6000803e3d6000fd5b505050506040513d60208110156115a257600080fd5b50519063ffffffff611c7116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505050506040513d602081101561162257600080fd5b505115156116ec576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561176b578181015183820152602001611753565b50505050905090810190601f1680156117985780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156117cb5781810151838201526020016117b3565b50505050905090810190601f1680156117f85780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b60006118238383611cfb565b151561189f576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a204163636f756e7420646f6573206e6f742068617665204b594360448201527f20617070726f76616c2e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b6118a98383611d9e565b1515611925576040805160e560020a62461bcd02815260206004820152602481018290527f4572726f723a204163636f756e7420737461747573206973206066616c73656060448201527f2e204163636f756e7420737461747573206d757374206265206074727565602e606482015290519081900360840190fd5b50600192915050565b6000808260405160200180807f74782e737461747573000000000000000000000000000000000000000000000081525060090182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b602083106119b05780518252601f199092019160209182019101611991565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015611a3d57600080fd5b505af1158015611a51573d6000803e3d6000fd5b505050506040513d6020811015611a6757600080fd5b5051949350505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611b0e5780518252601f199092019160209182019101611aef565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b505050506040513d6020811015611bc557600080fd5b50519050600160a060020a03811615611be057809250611be4565b8392505b505092915050565b600082821115611c6b576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b600082820183811015611cf4576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b600080611d088484611a71565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401915050604051602081830303815290604052604051808280519060200190808383602083106119b05780518252601f199092019160209182019101611991565b600080611dab8484611a71565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401915050604051602081830303815290604052604051808280519060200190808383602083106119b05780518252601f1990920191602091820191016119915600a165627a7a72305820ee14a97fa29abf13ca394e57c4b446c5bc87af092005db37c705fda2a6da93920029", + "deployedBytecode": "0x6080604052600436106100535763ffffffff60e060020a6000350416634bbc142c8114610058578063666a34271461008d578063666e1b39146100ae578063987c6b9d146100cf578063f2fde38b14610194575b600080fd5b34801561006457600080fd5b50610079600160a060020a03600435166101b5565b604080519115158252519081900360200190f35b34801561009957600080fd5b50610079600160a060020a0360043516610295565b3480156100ba57600080fd5b50610079600160a060020a0360043516610372565b3480156100db57600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610079958335600160a060020a031695369560449491939091019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497505084359550505060208301359260ff60408201351692506060810135915060808101359060a00135610387565b3480156101a057600080fd5b50610079600160a060020a0360043516610454565b3360009081526020819052604081205460ff161515610244576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610324576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60006103a260018b8b8b8b8b8b8b8b8b63ffffffff6105b216565b1515610444576040805160e560020a62461bcd02815260206004820152604760248201527f4572726f723a20556e61626c6520746f20706572666f726d2061746f6d69632060448201527f63757272656e637920737761702e20506c6561736520636865636b207061726160648201527f6d65746572732e00000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b5060019998505050505050505050565b3360009081526020819052604081205460ff1615156104e3576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515610543576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b6000808a8a8a8a8a876040516020018087600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140186805190602001908083835b602083106106145780518252601f1990920191602091820191016105f5565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b6020831061065c5780518252601f19909201916020918201910161063d565b6001836020036101000a03801982511681845116808217855250505050505090500184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b602083106106d65780518252601f1990920191602091820191016106b7565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506107108c338d610c3c565b151561078c576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a204f6e6c79207665726966696564206163636f756e747320636160448201527f6e20706572666f726d2063757272656e63792073776170732e00000000000000606482015290519081900360840190fd5b6107968c82610da0565b1515610812576040805160e560020a62461bcd02815260206004820152603560248201527f4572726f723a204661696c656420746f20736574207472616e73616374696f6e60448201527f2073746174757320746f2066756c66696c6c65642e0000000000000000000000606482015290519081900360840190fd5b4283101561086a576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a205472616e73616374696f6e2068617320657870697265642100604482015290519081900360640190fd5b604080516000808252602080830180855285905260ff8a168385015260608301899052608083018890529251600160a060020a038f169360019360a0808201949293601f198101939281900390910191865af11580156108ce573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610984576040805160e560020a62461bcd02815260206004820152605660248201527f4572726f723a204164647265737320646572697665642066726f6d207472616e60448201527f73616374696f6e207369676e617475726520646f6573206e6f74206d6174636860648201527f2074686520726571756573746572206164647265737300000000000000000000608482015290519081900360a40190fd5b6109c78c8b338e8c6040805190810160405280600381526020017f307830000000000000000000000000000000000000000000000000000000000081525061105d565b1515610a43576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b610a868c8a8d338b6040805190810160405280600381526020017f307830000000000000000000000000000000000000000000000000000000000081525061105d565b1515610b02576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b7f8afc838de412aaa0858b29e225f1811126bc93a1e25da13505909c403d2097d18a8a8a8a87866040518080602001806020018781526020018681526020018581526020018460001916600019168152602001838103835289818151815260200191508051906020019080838360005b83811015610b8a578181015183820152602001610b72565b50505050905090810190601f168015610bb75780820380516001836020036101000a031916815260200191505b5083810382528851815288516020918201918a019080838360005b83811015610bea578181015183820152602001610bd2565b50505050905090810190601f168015610c175780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a15060019b9a5050505050505050505050565b6000610c488484611817565b1515610cea576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a204163636f756e74206973206e6f74207665726966696564206660448201527f6f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f60648201527f756e7420686173206265656e204b594320617070726f7665642e000000000000608482015290519081900360a40190fd5b610cf48483611817565b1515610d96576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a204163636f756e74206973206e6f74207665726966696564206660448201527f6f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f60648201527f756e7420686173206265656e204b594320617070726f7665642e000000000000608482015290519081900360a40190fd5b5060019392505050565b6000808260405160200180807f74782e737461747573000000000000000000000000000000000000000000000081525060090182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310610e225780518252601f199092019160209182019101610e03565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050610e5b848461192e565b15610efc576040805160e560020a62461bcd02815260206004820152604e60248201527f4572726f723a205472616e73616374696f6e20737461747573206d757374206260448201527f652066616c7365206265666f72652073657474696e6720746865207472616e7360648201527f616374696f6e207374617475732e000000000000000000000000000000000000608482015290519081900360a40190fd5b8354604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101849052600160248201529051600160a060020a039092169163abfdcced916044808201926020929091908290030181600087803b158015610f6957600080fd5b505af1158015610f7d573d6000803e3d6000fd5b505050506040513d6020811015610f9357600080fd5b50511515610d96576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b60008080600160a060020a03861615156110e7576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876110f28a89611a71565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061114c5780518252601f19909201916020918201910161112d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106111d75780518252601f1990920191602091820191016111b8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150876112118a88611a71565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061126b5780518252601f19909201916020918201910161124c565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106112f65780518252601f1990920191602091820191016112d7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018a90529451909750600160a060020a03909416955063e2a4853a945087936113c793508b92879263bd02d0f5926024808401938290030181600087803b15801561138f57600080fd5b505af11580156113a3573d6000803e3d6000fd5b505050506040513d60208110156113b957600080fd5b50519063ffffffff611bec16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b505050506040513d602081101561143957600080fd5b50511515611503576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8854604080517fbd02d0f5000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163e2a4853a9184916115b0918a91869163bd02d0f59160248083019260209291908290030181600087803b15801561157857600080fd5b505af115801561158c573d6000803e3d6000fd5b505050506040513d60208110156115a257600080fd5b50519063ffffffff611c7116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505050506040513d602081101561162257600080fd5b505115156116ec576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561176b578181015183820152602001611753565b50505050905090810190601f1680156117985780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156117cb5781810151838201526020016117b3565b50505050905090810190601f1680156117f85780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b60006118238383611cfb565b151561189f576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a204163636f756e7420646f6573206e6f742068617665204b594360448201527f20617070726f76616c2e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b6118a98383611d9e565b1515611925576040805160e560020a62461bcd02815260206004820152602481018290527f4572726f723a204163636f756e7420737461747573206973206066616c73656060448201527f2e204163636f756e7420737461747573206d757374206265206074727565602e606482015290519081900360840190fd5b50600192915050565b6000808260405160200180807f74782e737461747573000000000000000000000000000000000000000000000081525060090182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b602083106119b05780518252601f199092019160209182019101611991565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015611a3d57600080fd5b505af1158015611a51573d6000803e3d6000fd5b505050506040513d6020811015611a6757600080fd5b5051949350505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611b0e5780518252601f199092019160209182019101611aef565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b505050506040513d6020811015611bc557600080fd5b50519050600160a060020a03811615611be057809250611be4565b8392505b505092915050565b600082821115611c6b576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b600082820183811015611cf4576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b600080611d088484611a71565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401915050604051602081830303815290604052604051808280519060200190808383602083106119b05780518252601f199092019160209182019101611991565b600080611dab8484611a71565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401915050604051602081830303815290604052604051808280519060200190808383602083106119b05780518252601f1990920191602091820191016119915600a165627a7a72305820ee14a97fa29abf13ca394e57c4b446c5bc87af092005db37c705fda2a6da93920029", + "sourceMap": "1069:2138:6:-;;;1374:458;8:9:-1;5:2;;;30:1;27;20:12;5:2;1374:458:6;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1374:458:6;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1708:46:6;;-1:-1:-1;;;;;;1708:46:6;-1:-1:-1;;;;;1708:46:6;;;;;;;;;1804:24;;;;;;;;1069:2138;;;;;;;;", + "deployedSourceMap": "1069:2138:6:-;;;;;;;;;-1:-1:-1;;;1069:2138:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;;;;;;;;;;;;;;;;;;;2571:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;2769:435:6;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2769:435:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2769:435:6;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2769:435:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2769:435:6;;;;-1:-1:-1;2769:435:6;-1:-1:-1;2769:435:6;;-1:-1:-1;2769:435:6;;;;;;;;-1:-1:-1;2769:435:6;;-1:-1:-1;;2769:435:6;;;-1:-1:-1;;;2769:435:6;;;;;;;;;;;;-1:-1:-1;2769:435:6;;;;;-1:-1:-1;2769:435:6;;;;;;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2127:185;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;2571:188::-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;2769:435:6:-;2973:12;3008:87;:3;3021:9;3032:7;3041;3050:6;3058;3066:4;3072;3078;3084:10;3008:87;:12;:87;:::i;:::-;2993:189;;;;;;;-1:-1:-1;;;;;2993:189:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3195:4:6;2769:435;;;;;;;;;;;:::o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;53100:1683:8:-;53333:12;53354:16;53400:9;53411:7;53420;53429:6;53437;53445:10;53383:73;;;;;;-1:-1:-1;;;;;53383:73:8;-1:-1:-1;;;;;53383:73:8;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;53383:73:8;;;;;;;;;;-1:-1:-1;53383:73:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;53383:73:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;53383:73:8;;;53373:84;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;53373:84:8;;;;;;;;;;;;;;;;53354:103;;53615:43;53630:4;53636:10;53648:9;53615:14;:43::i;:::-;53600:126;;;;;;;-1:-1:-1;;;;;53600:126:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53838:27;53850:4;53856:8;53838:11;:27::i;:::-;53823:106;;;;;;;-1:-1:-1;;;;;53823:106:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54008:3;53994:17;;;53986:61;;;;;-1:-1:-1;;;;;53986:61:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;54197:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;54197:50:8;;;:37;;;;;;;;;-1:-1:-1;;54197:37:8;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;54197:37:8;;;;;;;;-1:-1:-1;;;;;54197:50:8;;54182:162;;;;;;;-1:-1:-1;;;;;54182:162:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54424:66;54438:4;54444:7;54453:10;54465:9;54476:6;54424:66;;;;;;;;;;;;;;;;;;:13;:66::i;:::-;54409:135;;;;;;;-1:-1:-1;;;;;54409:135:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54566:66;54580:4;54586:7;54595:9;54606:10;54618:6;54566:66;;;;;;;;;;;;;;;;;;:13;:66::i;:::-;54551:135;;;;;;;-1:-1:-1;;;;;54551:135:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54698:62;54705:7;54714;54723:6;54731;54739:10;54751:8;54698:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;54698:62:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;54698:62:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;54698:62:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;54774:4:8;;53100:1683;-1:-1:-1;;;;;;;;;;;53100:1683:8:o;32273:451::-;32375:13;32411:29;32425:4;32431:8;32411:13;:29::i;:::-;32396:150;;;;;;;-1:-1:-1;;;;;32396:150:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32567:29;32581:4;32587:8;32567:13;:29::i;:::-;32552:150;;;;;;;-1:-1:-1;;;;;32552:150:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32715:4:8;32273:451;;;;;:::o;51453:574::-;51527:12;51547:10;51600:6;51570:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;51570:37:8;;;51560:48;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;51560:48:8;;;;;;;;;;;;;;;;51547:61;;51678:25;51690:4;51696:6;51678:11;:25::i;:::-;51677:26;51669:123;;;;;-1:-1:-1;;;;;51669:123:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51858:12;;:30;;;;;;;;;;;;:12;:30;;;;;;-1:-1:-1;;;;;51858:12:8;;;;:20;;:30;;;;;;;;;;;;;;;:12;;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;51858:30:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51858:30:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;51858:30:8;51850:154;;;;;;;-1:-1:-1;;;;;51850:154:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38209:943;38337:12;;;-1:-1:-1;;;;;38372:18:8;;;;38357:86;;;;;-1:-1:-1;;;;;38357:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38509:8;38519:31;38539:4;38545;38519:19;:31::i;:::-;38475:76;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38475:76:8;;;;;;;-1:-1:-1;;;;;38475:76:8;-1:-1:-1;;;;;38475:76:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38475:76:8;;;38465:87;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38465:87:8;;;;;;;;;;;;;;;;38450:102;;38617:8;38627:29;38647:4;38653:2;38627:19;:29::i;:::-;38583:74;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38583:74:8;;;;;;;-1:-1:-1;;;;;38583:74:8;-1:-1:-1;;;;;38583:74:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38583:74:8;;;38573:85;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;38573:85:8;;;;;;;;;;;;38680:12;;38707:26;;;;;;;;;;;38573:85;;-1:-1:-1;;;;;;38680:12:8;;;;-1:-1:-1;38680:20:8;;-1:-1:-1;38707:26:8;;:38;;-1:-1:-1;38738:6:8;;38680:12;;38707:20;;:26;;;;;;;;;;-1:-1:-1;38680:12:8;38707:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38707:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38707:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38707:26:8;;:38;:30;:38;:::i;:::-;38680:66;;;;;-1:-1:-1;;;38680:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38680:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38680:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38680:66:8;38665:202;;;;;;;-1:-1:-1;;;;;38665:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38888:12;;38915:26;;;;;;;;;;;;;;-1:-1:-1;;;;;38888:12:8;;;;:20;;38909:4;;38915:38;;38946:6;;38888:12;;38915:20;;:26;;;;;;;;;;;;;;38888:12;;38915:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38915:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38915:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38915:26:8;;:38;:30;:38;:::i;:::-;38888:66;;;;;-1:-1:-1;;;38888:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38888:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38888:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38888:66:8;38873:202;;;;;;;-1:-1:-1;;;;;38873:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39112:2;-1:-1:-1;;;;;39087:42:8;39106:4;-1:-1:-1;;;;;39087:42:8;;39096:8;39116:6;39124:4;39087:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39087:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39087:42:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39087:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39143:4:8;;38209:943;-1:-1:-1;;;;;;;;38209:943:8:o;33117:359::-;33199:13;33235:29;33250:4;33256:7;33235:14;:29::i;:::-;33220:102;;;;;;;-1:-1:-1;;;;;33220:102:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33343:31;33360:4;33366:7;33343:16;:31::i;:::-;33328:126;;;;;;;-1:-1:-1;;;;;33328:126:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33467:4:8;33117:359;;;;:::o;50929:203::-;51008:13;51029:10;51082:6;51052:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;51052:37:8;;;51042:48;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;51042:48:8;;;;;;;;;;;;51103:12;;:24;;;;;;;;;;;51042:48;;-1:-1:-1;;;;;;51103:12:8;;;;-1:-1:-1;51103:20:8;;-1:-1:-1;51103:24:8;;;;;263:2:-1;;-1:-1;51103:24:8;;;;;;;-1:-1:-1;51103:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;51103:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51103:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;51103:24:8;;50929:203;-1:-1:-1;;;;50929:203:8:o;16402:357::-;16490:25;16523:10;16596:23;16581:7;16546:43;;;;;;;;;;;;;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;;;16546:43:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16546:43:8;;;16536:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16536:54:8;;;;;;;;;;;;16622:12;;:27;;;;;;;;;;;16536:54;;-1:-1:-1;;;;;;16622:12:8;;;;-1:-1:-1;16622:23:8;;-1:-1:-1;16622:27:8;;;;;263:2:-1;;-1:-1;16622:27:8;;;;;;;-1:-1:-1;16622:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16622:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16622:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16622:27:8;;-1:-1:-1;;;;;;16659:22:8;;;16655:100;;16698:15;16691:22;;;;16655:100;16741:7;16734:14;;16655:100;16402:357;;;;;;:::o;1143:234:2:-;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;1540:174::-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1708:1;1540:174;-1:-1:-1;;;1540:174:2:o;17162:239:8:-;17245:11;17266:10;17321:34;17341:4;17347:7;17321:19;:34::i;:::-;17289:67;;;;;;;;;;;;;-1:-1:-1;;;;;17289:67:8;-1:-1:-1;;;;;17289:67:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;17289:67:8;;;17279:78;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;17810:241:8;17895:11;17914:10;17973:34;17993:4;17999:7;17973:19;:34::i;:::-;17937:71;;;;;;;;;;;;;-1:-1:-1;;;;;17937:71:8;-1:-1:-1;;;;;17937:71:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;17937:71:8;;;17927:82;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOLib.sol\";\nimport \"./TokenIOStorage.sol\";\n\n\n/**\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title Currency FX Contract for Token, Inc. Smart Money System\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n\n*/\n\ncontract TokenIOFX is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n\n /**\n\t* @notice Constructor method for TokenIOFX contract\n\t* @param _storageContract Address of TokenIOStorage contract\n\t*/\n\tconstructor(address _storageContract) public {\n\t\t\t/// @dev Set the storage contract for the interface\n\t\t\t/// @dev NOTE: This contract will be unable to use the storage constract until\n\t\t\t/// @dev contract address is authorized with the storage contract\n\t\t\t/// @dev Once authorized, Use the `setParams` method to set storage values\n\t\t\tlib.Storage = TokenIOStorage(_storageContract);\n\n\t\t\t/// @dev set owner to contract initiator\n\t\t\towner[msg.sender] = true;\n\t}\n\n\n /**\n * @notice Accepts a signed fx request to swap currency pairs at a given amount;\n * @dev This method can be called directly between peers.\n * @param requester address Requester is the orginator of the offer and must\n * match the signature of the payload submitted by the fulfiller\n * @param symbolA Symbol of the currency desired\n * @param symbolB Symbol of the currency offered\n * @param valueA Amount of the currency desired\n * @param valueB Amount of the currency offered\n * @param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n * @param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n * @param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n * @param expiration Expiration of the offer; Offer is good until expired\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function swap(\n address requester,\n string symbolA,\n string symbolB,\n uint valueA,\n uint valueB,\n uint8 sigV,\n bytes32 sigR,\n bytes32 sigS,\n uint expiration\n ) public returns (bool success) {\n require(\n lib.execSwap(requester, symbolA, symbolB, valueA, valueB, sigV, sigR, sigS, expiration),\n \"Error: Unable to perform atomic currency swap. Please check parameters.\"\n );\n return true;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFX.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFX.sol", + "exportedSymbols": { + "TokenIOFX": [ + 1427 + ] + }, + "id": 1428, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1353, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 1354, + "nodeType": "ImportDirective", + "scope": 1428, + "sourceUnit": 185, + "src": "25:23:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 1355, + "nodeType": "ImportDirective", + "scope": 1428, + "sourceUnit": 4623, + "src": "49:26:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1356, + "nodeType": "ImportDirective", + "scope": 1428, + "sourceUnit": 5242, + "src": "76:30:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1357, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1091:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 1358, + "nodeType": "InheritanceSpecifier", + "src": "1091:7:6" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title Currency FX Contract for Token, Inc. Smart Money System\n@author Ryan Tate , Sean Pollock \n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.", + "fullyImplemented": true, + "id": 1427, + "linearizedBaseContracts": [ + 1427, + 184 + ], + "name": "TokenIOFX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1361, + "libraryName": { + "contractScope": null, + "id": 1359, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1191:10:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1185:37:6", + "typeName": { + "contractScope": null, + "id": 1360, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1206:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 1363, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1427, + "src": "1225:19:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1362, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1225:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1383, + "nodeType": "Block", + "src": "1419:413:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1368, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1363, + "src": "1708:3:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1708:11:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1372, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "1737:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1371, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1722:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1722:32:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1708:46:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1375, + "nodeType": "ExpressionStatement", + "src": "1708:46:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1376, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1804:5:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1379, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1377, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1810:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1810:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1804:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1824:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1804:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1382, + "nodeType": "ExpressionStatement", + "src": "1804:24:6" + } + ] + }, + "documentation": "@notice Constructor method for TokenIOFX contract\n@param _storageContract Address of TokenIOStorage contract", + "id": 1384, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1366, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1365, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 1384, + "src": "1386:24:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1364, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1385:26:6" + }, + "payable": false, + "returnParameters": { + "id": 1367, + "nodeType": "ParameterList", + "parameters": [], + "src": "1419:0:6" + }, + "scope": 1427, + "src": "1374:458:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1425, + "nodeType": "Block", + "src": "2987:217:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1410, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1386, + "src": "3021:9:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1411, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1388, + "src": "3032:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1412, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1390, + "src": "3041:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1413, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1392, + "src": "3050:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1414, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1394, + "src": "3058:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1415, + "name": "sigV", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1396, + "src": "3066:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 1416, + "name": "sigR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1398, + "src": "3072:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1417, + "name": "sigS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1400, + "src": "3078:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1418, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1402, + "src": "3084:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1408, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1363, + "src": "3008:3:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "execSwap", + "nodeType": "MemberAccess", + "referencedDeclaration": 4149, + "src": "3008:12:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,string memory,string memory,uint256,uint256,uint8,bytes32,bytes32,uint256) returns (bool)" + } + }, + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3008:87:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20706572666f726d2061746f6d69632063757272656e637920737761702e20506c6561736520636865636b20706172616d65746572732e", + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3103:73:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6ca463b35e5e08da21998ab6b3d6ced7b8f7a272da9305fde927b3e1999f0037", + "typeString": "literal_string \"Error: Unable to perform atomic currency swap. Please check parameters.\"" + }, + "value": "Error: Unable to perform atomic currency swap. Please check parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6ca463b35e5e08da21998ab6b3d6ced7b8f7a272da9305fde927b3e1999f0037", + "typeString": "literal_string \"Error: Unable to perform atomic currency swap. Please check parameters.\"" + } + ], + "id": 1407, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2993:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2993:189:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1422, + "nodeType": "ExpressionStatement", + "src": "2993:189:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1406, + "id": 1424, + "nodeType": "Return", + "src": "3188:11:6" + } + ] + }, + "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev This method can be called directly between peers.\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1426, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "swap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1403, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1386, + "name": "requester", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2788:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2788:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1388, + "name": "symbolA", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2811:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1387, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2811:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1390, + "name": "symbolB", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2831:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1389, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2831:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1392, + "name": "valueA", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2851:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1391, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2851:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1394, + "name": "valueB", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2868:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1393, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2868:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1396, + "name": "sigV", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2885:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1395, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2885:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1398, + "name": "sigR", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2901:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1397, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1400, + "name": "sigS", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2919:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1399, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2919:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1402, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2937:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1401, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2937:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2782:174:6" + }, + "payable": false, + "returnParameters": { + "id": 1406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1405, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2973:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1404, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2973:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2972:14:6" + }, + "scope": 1427, + "src": "2769:435:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1428, + "src": "1069:2138:6" + } + ], + "src": "0:3208:6" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFX.sol", + "exportedSymbols": { + "TokenIOFX": [ + 1427 + ] + }, + "id": 1428, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1353, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 1354, + "nodeType": "ImportDirective", + "scope": 1428, + "sourceUnit": 185, + "src": "25:23:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 1355, + "nodeType": "ImportDirective", + "scope": 1428, + "sourceUnit": 4623, + "src": "49:26:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1356, + "nodeType": "ImportDirective", + "scope": 1428, + "sourceUnit": 5242, + "src": "76:30:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1357, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1091:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 1358, + "nodeType": "InheritanceSpecifier", + "src": "1091:7:6" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title Currency FX Contract for Token, Inc. Smart Money System\n@author Ryan Tate , Sean Pollock \n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.", + "fullyImplemented": true, + "id": 1427, + "linearizedBaseContracts": [ + 1427, + 184 + ], + "name": "TokenIOFX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1361, + "libraryName": { + "contractScope": null, + "id": 1359, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1191:10:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1185:37:6", + "typeName": { + "contractScope": null, + "id": 1360, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1206:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 1363, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1427, + "src": "1225:19:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1362, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1225:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1383, + "nodeType": "Block", + "src": "1419:413:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1368, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1363, + "src": "1708:3:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1708:11:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1372, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "1737:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1371, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1722:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1722:32:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1708:46:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1375, + "nodeType": "ExpressionStatement", + "src": "1708:46:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1376, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1804:5:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1379, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1377, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1810:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1810:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1804:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1824:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1804:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1382, + "nodeType": "ExpressionStatement", + "src": "1804:24:6" + } + ] + }, + "documentation": "@notice Constructor method for TokenIOFX contract\n@param _storageContract Address of TokenIOStorage contract", + "id": 1384, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1366, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1365, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 1384, + "src": "1386:24:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1364, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1385:26:6" + }, + "payable": false, + "returnParameters": { + "id": 1367, + "nodeType": "ParameterList", + "parameters": [], + "src": "1419:0:6" + }, + "scope": 1427, + "src": "1374:458:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1425, + "nodeType": "Block", + "src": "2987:217:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1410, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1386, + "src": "3021:9:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1411, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1388, + "src": "3032:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1412, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1390, + "src": "3041:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1413, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1392, + "src": "3050:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1414, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1394, + "src": "3058:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1415, + "name": "sigV", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1396, + "src": "3066:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 1416, + "name": "sigR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1398, + "src": "3072:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1417, + "name": "sigS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1400, + "src": "3078:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1418, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1402, + "src": "3084:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1408, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1363, + "src": "3008:3:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "execSwap", + "nodeType": "MemberAccess", + "referencedDeclaration": 4149, + "src": "3008:12:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,string memory,string memory,uint256,uint256,uint8,bytes32,bytes32,uint256) returns (bool)" + } + }, + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3008:87:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20706572666f726d2061746f6d69632063757272656e637920737761702e20506c6561736520636865636b20706172616d65746572732e", + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3103:73:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6ca463b35e5e08da21998ab6b3d6ced7b8f7a272da9305fde927b3e1999f0037", + "typeString": "literal_string \"Error: Unable to perform atomic currency swap. Please check parameters.\"" + }, + "value": "Error: Unable to perform atomic currency swap. Please check parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6ca463b35e5e08da21998ab6b3d6ced7b8f7a272da9305fde927b3e1999f0037", + "typeString": "literal_string \"Error: Unable to perform atomic currency swap. Please check parameters.\"" + } + ], + "id": 1407, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2993:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2993:189:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1422, + "nodeType": "ExpressionStatement", + "src": "2993:189:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1406, + "id": 1424, + "nodeType": "Return", + "src": "3188:11:6" + } + ] + }, + "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev This method can be called directly between peers.\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1426, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "swap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1403, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1386, + "name": "requester", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2788:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2788:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1388, + "name": "symbolA", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2811:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1387, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2811:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1390, + "name": "symbolB", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2831:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1389, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2831:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1392, + "name": "valueA", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2851:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1391, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2851:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1394, + "name": "valueB", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2868:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1393, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2868:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1396, + "name": "sigV", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2885:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1395, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2885:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1398, + "name": "sigR", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2901:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1397, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1400, + "name": "sigS", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2919:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1399, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2919:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1402, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2937:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1401, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2937:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2782:174:6" + }, + "payable": false, + "returnParameters": { + "id": 1406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1405, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1426, + "src": "2973:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1404, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2973:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2972:14:6" + }, + "scope": 1427, + "src": "2769:435:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1428, + "src": "1069:2138:6" + } + ], + "src": "0:3208:6" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x741090779fb989fcf39468cc3719de45666f3cc7", + "transactionHash": "0xce8ed3ada7c3a64449ff1e876d386a682d0ea841bf52ff24cbcebc6b953ccba5" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.577Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIOFeeContract.json b/deployed/mainnet/TokenIOFeeContract.json new file mode 100644 index 0000000..00a3728 --- /dev/null +++ b/deployed/mainnet/TokenIOFeeContract.json @@ -0,0 +1,6205 @@ +{ + "contractName": "TokenIOFeeContract", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "feeBps", + "type": "uint256" + }, + { + "name": "feeMin", + "type": "uint256" + }, + { + "name": "feeMax", + "type": "uint256" + }, + { + "name": "feeFlat", + "type": "uint256" + }, + { + "name": "feeMsg", + "type": "bytes" + } + ], + "name": "setFeeParams", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getFeeParams", + "outputs": [ + { + "name": "bps", + "type": "uint256" + }, + { + "name": "min", + "type": "uint256" + }, + { + "name": "max", + "type": "uint256" + }, + { + "name": "flat", + "type": "uint256" + }, + { + "name": "feeMsg", + "type": "bytes" + }, + { + "name": "feeContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + } + ], + "name": "getTokenBalance", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateFees", + "outputs": [ + { + "name": "fees", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "transferCollectedFees", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506040516020806126a4833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a03909416939093178355815416909117905561262e90819061007690396000f30060806040526004361061007f5763ffffffff60e060020a600035041663025abd58811461008457806313b4312f146100ef5780634bbc142c146101b057806352238fdd146101d1578063666a3427146101e9578063666e1b391461020a578063aa08dfd31461022b578063be6fc18114610296578063f2fde38b14610358575b600080fd5b34801561009057600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100dd9436949293602493928401919081908401838280828437509497506103799650505050505050565b60408051918252519081900360200190f35b3480156100fb57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019c94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a919990985060609091019650919450908101925081908401838280828437509497506103939650505050505050565b604080519115158252519081900360200190f35b3480156101bc57600080fd5b5061019c600160a060020a036004351661049a565b3480156101dd57600080fd5b506100dd600435610556565b3480156101f557600080fd5b5061019c600160a060020a036004351661056a565b34801561021657600080fd5b5061019c600160a060020a0360043516610623565b34801561023757600080fd5b50604080516020601f60843560048181013592830184900484028501840190955281845261019c948035946024803595604435956064359536959460a49490939101919081908401838280828437509497506106389650505050505050565b3480156102a257600080fd5b506102ab610916565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b83811015610318578181015183820152602001610300565b50505050905090810190601f1680156103455780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34801561036457600080fd5b5061019c600160a060020a0360043516610987565b600061038d6001833063ffffffff610ac116565b92915050565b3360009081526020819052604081205460ff1615156103fe576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b6104136001863087878763ffffffff610c5716565b151561048f576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a20756e61626c6520746f207472616e736665722066656573207460448201527f6f206163636f756e742e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b506001949350505050565b3360009081526020819052604081205460ff161515610505576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600061038d6001308463ffffffff6113d316565b3360009081526020819052604081205460ff1615156105d5576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff1615156106a3576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b6106b460018763ffffffff6118c416565b151561071e576040805160e560020a62461bcd02815260206004820152602f60248201526000805160206125c383398151915260448201527f7420626173697320706f696e74732e0000000000000000000000000000000000606482015290519081900360840190fd5b61072f60018663ffffffff611ad716565b1515610799576040805160e560020a62461bcd02815260206004820152602e60248201526000805160206125c383398151915260448201527f74206d696e696d756d206665652e000000000000000000000000000000000000606482015290519081900360840190fd5b6107aa60018563ffffffff611b5516565b1515610814576040805160e560020a62461bcd02815260206004820152602e60248201526000805160206125c383398151915260448201527f74206d6178696d756d206665652e000000000000000000000000000000000000606482015290519081900360840190fd5b61082560018463ffffffff611bd316565b151561088f576040805160e560020a62461bcd02815260206004820152602b60248201526000805160206125c383398151915260448201527f7420666c6174206665652e000000000000000000000000000000000000000000606482015290519081900360840190fd5b6108a060018363ffffffff611c5116565b151561090a576040805160e560020a62461bcd02815260206004820152603260248201526000805160206125c383398151915260448201527f742064656661756c74206d6573736167652e0000000000000000000000000000606482015290519081900360840190fd5b50600195945050505050565b600080808060608161092f60013063ffffffff611dc816565b61094060013063ffffffff611f0516565b61095160013063ffffffff611f9616565b61096260013063ffffffff61202716565b61097360013063ffffffff6120b816565b939a92995090975095509093503092509050565b3360009081526020819052604081205460ff1615156109f2576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a0382161515610a52576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b60008083610acf868561226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610b295780518252601f199092019160209182019101610b0a565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610bab5780518252601f199092019160209182019101610b8c565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015610c2257600080fd5b505af1158015610c36573d6000803e3d6000fd5b505050506040513d6020811015610c4c57600080fd5b505195945050505050565b60008080600160a060020a0386161515610ce1576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b87610cec8a8961226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610d465780518252601f199092019160209182019101610d27565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610dc85780518252601f199092019160209182019101610da9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020915087610e028a8861226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610e5c5780518252601f199092019160209182019101610e3d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610ede5780518252601f199092019160209182019101610ebf565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063e2a4853a94508793610f9993508b92879263bd02d0f5926024808401938290030181600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b505050506040513d6020811015610f8b57600080fd5b50519063ffffffff6123dd16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015610fe157600080fd5b505af1158015610ff5573d6000803e3d6000fd5b505050506040513d602081101561100b57600080fd5b505115156110d5576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a91849161116c918a91869163bd02d0f59160248083019260209291908290030181600087803b15801561113457600080fd5b505af1158015611148573d6000803e3d6000fd5b505050506040513d602081101561115e57600080fd5b50519063ffffffff61246216565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156111b457600080fd5b505af11580156111c8573d6000803e3d6000fd5b505050506040513d60208110156111de57600080fd5b505115156112a8576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561132757818101518382015260200161130f565b50505050905090810190601f1680156113545780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561138757818101518382015260200161136f565b50505050905090810190601f1680156113b45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b6020831061146e5780518252601f19909201916020918201910161144f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156114cf57600080fd5b505af11580156114e3573d6000803e3d6000fd5b505050506040513d60208110156114f957600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b6020831061158f5780518252601f199092019160209182019101611570565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156115f057600080fd5b505af1158015611604573d6000803e3d6000fd5b505050506040513d602081101561161a57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106116b05780518252601f199092019160209182019101611691565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561171157600080fd5b505af1158015611725573d6000803e3d6000fd5b505050506040513d602081101561173b57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106117d15780518252601f1990920191602091820191016117b2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561183257600080fd5b505af1158015611846573d6000803e3d6000fd5b505050506040513d602081101561185c57600080fd5b505191506118928261188661271061187a8b8863ffffffff6124ec16565b9063ffffffff61258b16565b9063ffffffff61246216565b9050848111156118a4578495506118b8565b838110156118b4578395506118b8565b8095505b50505050509392505050565b604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b909201928390528151600093849392909182918401908083835b602083106119435780518252601f199092019160209182019101611924565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b1580156119d757600080fd5b505af11580156119eb573d6000803e3d6000fd5b505050506040513d6020811015611a0157600080fd5b50511515611acb576040805160e560020a62461bcd02815260206004820152606860248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b600191505b5092915050565b604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152606060020a300260288301528251601c818403018152603c90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e6d736700000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b909201928390528151600093849392909182918401908083835b60208310611cd05780518252601f199092019160209182019101611cb1565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f2e28d08400000000000000000000000000000000000000000000000000000000845260048401828152602485019687528b5160448601528b51929950600160a060020a039091169750632e28d084965088958b9550909390926064909101919085019080838360005b83811015611d7b578181015183820152602001611d63565b50505050905090810190601f168015611da85780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156119d757600080fd5b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611e5a5780518252601f199092019160209182019101611e3b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015611ed157600080fd5b505af1158015611ee5573d6000803e3d6000fd5b505050506040513d6020811015611efb57600080fd5b5051949350505050565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061214b5780518252601f19909201916020918201910161212c565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b1580156121db57600080fd5b505af11580156121ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561221857600080fd5b81019080805164010000000081111561223057600080fd5b8201602081018481111561224357600080fd5b815164010000000081118282018710171561225d57600080fd5b509098975050505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122ff5780518252601f1990920191602091820191016122e0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561238c57600080fd5b505af11580156123a0573d6000803e3d6000fd5b505050506040513d60208110156123b657600080fd5b50519050600160a060020a038116156123d1578092506123d5565b8392505b505092915050565b60008282111561245c576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000828201838110156124e5576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b6000808315156124ff5760009150611ad0565b5082820282848281151561250f57fe5b04146124e5576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600080828481151561259957fe5b04949350505050560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742066656520636f6e747261634572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820d4483eecc10f9e5a0385f3e782788a18e4ac3d2ed8d1c107d614e3c30fd164fb0029", + "deployedBytecode": "0x60806040526004361061007f5763ffffffff60e060020a600035041663025abd58811461008457806313b4312f146100ef5780634bbc142c146101b057806352238fdd146101d1578063666a3427146101e9578063666e1b391461020a578063aa08dfd31461022b578063be6fc18114610296578063f2fde38b14610358575b600080fd5b34801561009057600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100dd9436949293602493928401919081908401838280828437509497506103799650505050505050565b60408051918252519081900360200190f35b3480156100fb57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019c94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a919990985060609091019650919450908101925081908401838280828437509497506103939650505050505050565b604080519115158252519081900360200190f35b3480156101bc57600080fd5b5061019c600160a060020a036004351661049a565b3480156101dd57600080fd5b506100dd600435610556565b3480156101f557600080fd5b5061019c600160a060020a036004351661056a565b34801561021657600080fd5b5061019c600160a060020a0360043516610623565b34801561023757600080fd5b50604080516020601f60843560048181013592830184900484028501840190955281845261019c948035946024803595604435956064359536959460a49490939101919081908401838280828437509497506106389650505050505050565b3480156102a257600080fd5b506102ab610916565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b83811015610318578181015183820152602001610300565b50505050905090810190601f1680156103455780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34801561036457600080fd5b5061019c600160a060020a0360043516610987565b600061038d6001833063ffffffff610ac116565b92915050565b3360009081526020819052604081205460ff1615156103fe576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b6104136001863087878763ffffffff610c5716565b151561048f576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a20756e61626c6520746f207472616e736665722066656573207460448201527f6f206163636f756e742e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b506001949350505050565b3360009081526020819052604081205460ff161515610505576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600061038d6001308463ffffffff6113d316565b3360009081526020819052604081205460ff1615156105d5576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff1615156106a3576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b6106b460018763ffffffff6118c416565b151561071e576040805160e560020a62461bcd02815260206004820152602f60248201526000805160206125c383398151915260448201527f7420626173697320706f696e74732e0000000000000000000000000000000000606482015290519081900360840190fd5b61072f60018663ffffffff611ad716565b1515610799576040805160e560020a62461bcd02815260206004820152602e60248201526000805160206125c383398151915260448201527f74206d696e696d756d206665652e000000000000000000000000000000000000606482015290519081900360840190fd5b6107aa60018563ffffffff611b5516565b1515610814576040805160e560020a62461bcd02815260206004820152602e60248201526000805160206125c383398151915260448201527f74206d6178696d756d206665652e000000000000000000000000000000000000606482015290519081900360840190fd5b61082560018463ffffffff611bd316565b151561088f576040805160e560020a62461bcd02815260206004820152602b60248201526000805160206125c383398151915260448201527f7420666c6174206665652e000000000000000000000000000000000000000000606482015290519081900360840190fd5b6108a060018363ffffffff611c5116565b151561090a576040805160e560020a62461bcd02815260206004820152603260248201526000805160206125c383398151915260448201527f742064656661756c74206d6573736167652e0000000000000000000000000000606482015290519081900360840190fd5b50600195945050505050565b600080808060608161092f60013063ffffffff611dc816565b61094060013063ffffffff611f0516565b61095160013063ffffffff611f9616565b61096260013063ffffffff61202716565b61097360013063ffffffff6120b816565b939a92995090975095509093503092509050565b3360009081526020819052604081205460ff1615156109f2576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a0382161515610a52576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b60008083610acf868561226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610b295780518252601f199092019160209182019101610b0a565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610bab5780518252601f199092019160209182019101610b8c565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015610c2257600080fd5b505af1158015610c36573d6000803e3d6000fd5b505050506040513d6020811015610c4c57600080fd5b505195945050505050565b60008080600160a060020a0386161515610ce1576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b87610cec8a8961226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610d465780518252601f199092019160209182019101610d27565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610dc85780518252601f199092019160209182019101610da9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020915087610e028a8861226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610e5c5780518252601f199092019160209182019101610e3d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610ede5780518252601f199092019160209182019101610ebf565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063e2a4853a94508793610f9993508b92879263bd02d0f5926024808401938290030181600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b505050506040513d6020811015610f8b57600080fd5b50519063ffffffff6123dd16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015610fe157600080fd5b505af1158015610ff5573d6000803e3d6000fd5b505050506040513d602081101561100b57600080fd5b505115156110d5576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a91849161116c918a91869163bd02d0f59160248083019260209291908290030181600087803b15801561113457600080fd5b505af1158015611148573d6000803e3d6000fd5b505050506040513d602081101561115e57600080fd5b50519063ffffffff61246216565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156111b457600080fd5b505af11580156111c8573d6000803e3d6000fd5b505050506040513d60208110156111de57600080fd5b505115156112a8576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561132757818101518382015260200161130f565b50505050905090810190601f1680156113545780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561138757818101518382015260200161136f565b50505050905090810190601f1680156113b45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b6020831061146e5780518252601f19909201916020918201910161144f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156114cf57600080fd5b505af11580156114e3573d6000803e3d6000fd5b505050506040513d60208110156114f957600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b6020831061158f5780518252601f199092019160209182019101611570565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156115f057600080fd5b505af1158015611604573d6000803e3d6000fd5b505050506040513d602081101561161a57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106116b05780518252601f199092019160209182019101611691565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561171157600080fd5b505af1158015611725573d6000803e3d6000fd5b505050506040513d602081101561173b57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106117d15780518252601f1990920191602091820191016117b2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561183257600080fd5b505af1158015611846573d6000803e3d6000fd5b505050506040513d602081101561185c57600080fd5b505191506118928261188661271061187a8b8863ffffffff6124ec16565b9063ffffffff61258b16565b9063ffffffff61246216565b9050848111156118a4578495506118b8565b838110156118b4578395506118b8565b8095505b50505050509392505050565b604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b909201928390528151600093849392909182918401908083835b602083106119435780518252601f199092019160209182019101611924565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b1580156119d757600080fd5b505af11580156119eb573d6000803e3d6000fd5b505050506040513d6020811015611a0157600080fd5b50511515611acb576040805160e560020a62461bcd02815260206004820152606860248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b600191505b5092915050565b604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152606060020a300260288301528251601c818403018152603c90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e6d736700000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b909201928390528151600093849392909182918401908083835b60208310611cd05780518252601f199092019160209182019101611cb1565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f2e28d08400000000000000000000000000000000000000000000000000000000845260048401828152602485019687528b5160448601528b51929950600160a060020a039091169750632e28d084965088958b9550909390926064909101919085019080838360005b83811015611d7b578181015183820152602001611d63565b50505050905090810190601f168015611da85780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156119d757600080fd5b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611e5a5780518252601f199092019160209182019101611e3b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015611ed157600080fd5b505af1158015611ee5573d6000803e3d6000fd5b505050506040513d6020811015611efb57600080fd5b5051949350505050565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061214b5780518252601f19909201916020918201910161212c565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b1580156121db57600080fd5b505af11580156121ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561221857600080fd5b81019080805164010000000081111561223057600080fd5b8201602081018481111561224357600080fd5b815164010000000081118282018710171561225d57600080fd5b509098975050505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122ff5780518252601f1990920191602091820191016122e0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561238c57600080fd5b505af11580156123a0573d6000803e3d6000fd5b505050506040513d60208110156123b657600080fd5b50519050600160a060020a038116156123d1578092506123d5565b8392505b505092915050565b60008282111561245c576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000828201838110156124e5576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b6000808315156124ff5760009150611ad0565b5082820282848281151561250f57fe5b04146124e5576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600080828481151561259957fe5b04949350505050560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742066656520636f6e747261634572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820d4483eecc10f9e5a0385f3e782788a18e4ac3d2ed8d1c107d614e3c30fd164fb0029", + "sourceMap": "1070:3794:7:-;;;1380:458;8:9:-1;5:2;;;30:1;27;20:12;5:2;1380:458:7;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1380:458:7;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1714:46:7;;-1:-1:-1;;;;;;1714:46:7;-1:-1:-1;;;;;1714:46:7;;;;;;;;;1810:24;;;;;;;;1070:3794;;;;;;;;", + "deployedSourceMap": "1070:3794:7:-;;;;;;;;;-1:-1:-1;;;1070:3794:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3729:135;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3729:135:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3729:135:7;;-1:-1:-1;3729:135:7;;-1:-1:-1;;;;;;;3729:135:7;;;;;;;;;;;;;;;;;4587:273;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4587:273:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4587:273:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4587:273:7;;;;;;;;;;;-1:-1:-1;4587:273:7;;;;;-1:-1:-1;4587:273:7;;-1:-1:-1;4587:273:7;;;;-1:-1:-1;4587:273:7;;;;;;;;;;-1:-1:-1;4587:273:7;;-1:-1:-1;4587:273:7;;-1:-1:-1;;;;;;;4587:273:7;;;;;;;;;;;;;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;4033:123:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4033:123:7;;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;2242:572:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2242:572:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2242:572:7;;-1:-1:-1;2242:572:7;;-1:-1:-1;;;;;;;2242:572:7;3159:338;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3159:338:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3159:338:7;-1:-1:-1;;;;;3159:338:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3159:338:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;3729:135:7;3791:12;3816:44;:3;3836:8;3854:4;3816:44;:19;:44;:::i;:::-;3809:51;3729:135;-1:-1:-1;;3729:135:7:o;4587:273::-;1261:10:1;4698:12:7;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;4728:60:7;:3;4746:8;4764:4;4771:2;4775:6;4783:4;4728:60;:17;:60;:::i;:::-;4716:125;;;;;;;-1:-1:-1;;;;;4716:125:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4852:4:7;4587:273;;;;;;:::o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;4033:123:7:-;4090:9;4112:40;:3;4138:4;4145:6;4112:40;:17;:40;:::i;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;2242:572:7:-;1261:10:1;2357:12:7;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;2383:21:7;:3;2397:6;2383:21;:13;:21;:::i;:::-;2375:81;;;;;;;-1:-1:-1;;;;;2375:81:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2375:81:7;;;;;;;;;;;;;;;;;;;;2468:21;:3;2482:6;2468:21;:13;:21;:::i;:::-;2460:80;;;;;;;-1:-1:-1;;;;;2460:80:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2460:80:7;;;;;;;;;;;;;;;;;;;;2552:21;:3;2566:6;2552:21;:13;:21;:::i;:::-;2544:80;;;;;;;-1:-1:-1;;;;;2544:80:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2544:80:7;;;;;;;;;;;;;;;;;;;;2636:23;:3;2651:7;2636:23;:14;:23;:::i;:::-;2628:79;;;;;;;-1:-1:-1;;;;;2628:79:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2628:79:7;;;;;;;;;;;;;;;;;;;;2719:21;:3;2733:6;2719:21;:13;:21;:::i;:::-;2711:84;;;;;;;-1:-1:-1;;;;;2711:84:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2711:84:7;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2806:4:7;2242:572;;;;;;;:::o;3159:338::-;3204:8;;;;3245:12;3204:8;3299:28;:3;3321:4;3299:28;:13;:28;:::i;:::-;3334;:3;3356:4;3334:28;:13;:28;:::i;:::-;3369;:3;3391:4;3369:28;:13;:28;:::i;:::-;3404:29;:3;3427:4;3404:29;:14;:29;:::i;:::-;3440:28;:3;3462:4;3440:28;:13;:28;:::i;:::-;3285:208;;;;-1:-1:-1;3285:208:7;;-1:-1:-1;3285:208:7;-1:-1:-1;3285:208:7;;-1:-1:-1;3483:4:7;;-1:-1:-1;3159:338:7;-1:-1:-1;3159:338:7:o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;28791:266:8:-;28892:12;28912:10;28969:8;28979:34;28999:4;29005:7;28979:19;:34::i;:::-;28935:79;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;28935:79:8;;;;;;;-1:-1:-1;;;;;28935:79:8;-1:-1:-1;;;;;28935:79:8;-1:-1:-1;;;28935:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;28935:79:8;;;28925:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;28925:90:8;;;;;;;;;;;;29028:12;;-1:-1:-1;;;;;29028:24:8;;;;;;;;;;28925:90;;-1:-1:-1;;;;;;29028:12:8;;;;-1:-1:-1;29028:20:8;;-1:-1:-1;29028:24:8;;;;;263:2:-1;;-1:-1;29028:24:8;;;;;;;-1:-1:-1;29028:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;29028:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29028:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29028:24:8;;28791:266;-1:-1:-1;;;;;28791:266:8:o;38209:943::-;38337:12;;;-1:-1:-1;;;;;38372:18:8;;;;38357:86;;;;;-1:-1:-1;;;;;38357:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38509:8;38519:31;38539:4;38545;38519:19;:31::i;:::-;38475:76;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38475:76:8;;;;;;;-1:-1:-1;;;;;38475:76:8;-1:-1:-1;;;;;38475:76:8;-1:-1:-1;;;38475:76:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38475:76:8;;;38465:87;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38465:87:8;;;;;;;;;;;;;;;;38450:102;;38617:8;38627:29;38647:4;38653:2;38627:19;:29::i;:::-;38583:74;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38583:74:8;;;;;;;-1:-1:-1;;;;;38583:74:8;-1:-1:-1;;;;;38583:74:8;-1:-1:-1;;;38583:74:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38583:74:8;;;38573:85;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;38573:85:8;;;;;;;;;;;;38680:12;;-1:-1:-1;;;;;38707:26:8;;;;;;;;;;38573:85;;-1:-1:-1;;;;;;38680:12:8;;;;-1:-1:-1;38680:20:8;;-1:-1:-1;38707:26:8;;:38;;-1:-1:-1;38738:6:8;;38680:12;;38707:20;;:26;;;;;;;;;;-1:-1:-1;38680:12:8;38707:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38707:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38707:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38707:26:8;;:38;:30;:38;:::i;:::-;38680:66;;;;;-1:-1:-1;;;38680:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38680:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38680:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38680:66:8;38665:202;;;;;;;-1:-1:-1;;;;;38665:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38888:12;;38915:26;;;-1:-1:-1;;;;;38915:26:8;;;;;;;;;;-1:-1:-1;;;;;38888:12:8;;;;:20;;38909:4;;38915:38;;38946:6;;38888:12;;38915:20;;:26;;;;;;;;;;;;;;38888:12;;38915:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38915:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38915:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38915:26:8;;:38;:30;:38;:::i;:::-;38888:66;;;;;-1:-1:-1;;;38888:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38888:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38888:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38888:66:8;38873:202;;;;;;;-1:-1:-1;;;;;38873:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39112:2;-1:-1:-1;;;;;39087:42:8;39106:4;-1:-1:-1;;;;;39087:42:8;;39096:8;39116:6;39124:4;39087:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39087:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39087:42:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39087:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39143:4:8;;38209:943;-1:-1:-1;;;;;;;;38209:943:8:o;31068:722::-;31213:12;;31244:44;;;;;;;;;;;;-1:-1:-1;;;;;31244:44:8;;;-1:-1:-1;;;31244:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31244:44:8;;;;;;;;31234:55;;-1:-1:-1;;;;;;;;;;;;31213:12:8;;;:20;;31244:44;;;31234:55;;;;;31244:44;31234:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31234:55:8;;;;;;;;;;;;31213:77;;;-1:-1:-1;;;31213:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31213:77:8;;;;;;;-1:-1:-1;31213:77:8;-1:-1:-1;31213:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31213:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31213:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31213:77:8;31310:12;;31341:44;;;;31213:77;31341:44;;;;;;;-1:-1:-1;;;;;31341:44:8;;;-1:-1:-1;;;31341:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31341:44:8;;;;;;;;31331:55;;31213:77;;-1:-1:-1;31310:12:8;;;;:20;;31341:44;;;;;31331:55;;;;;31341:44;31331:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31331:55:8;;;;;;;;;;;;31310:77;;;-1:-1:-1;;;31310:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31310:77:8;;;;;;;-1:-1:-1;31310:77:8;-1:-1:-1;31310:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31310:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31310:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31310:77:8;31407:12;;31438:44;;;;31310:77;31438:44;;;;;;;-1:-1:-1;;;;;31438:44:8;;;-1:-1:-1;;;31438:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31438:44:8;;;;;;;;31428:55;;31310:77;;-1:-1:-1;31407:12:8;;;;:20;;31438:44;;;;;31428:55;;;;;31438:44;31428:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31428:55:8;;;;;;;;;;;;31407:77;;;-1:-1:-1;;;31407:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31407:77:8;;;;;;;-1:-1:-1;31407:77:8;-1:-1:-1;31407:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31407:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31407:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31407:77:8;31505:12;;31536:45;;;;31407:77;31536:45;;;;;;;-1:-1:-1;;;;;31536:45:8;;;-1:-1:-1;;;31536:45:8;;;;;;;26:21:-1;;;22:32;;6:49;;31536:45:8;;;;;;;;31526:56;;31407:77;;-1:-1:-1;31505:12:8;;;;:20;;31536:45;;;;;31526:56;;;;;31536:45;31526:56;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31526:56:8;;;;;;;;;;;;31505:78;;;-1:-1:-1;;;31505:78:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31505:78:8;;;;;;;-1:-1:-1;31505:78:8;-1:-1:-1;31505:78:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31505:78:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31505:78:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31505:78:8;;-1:-1:-1;31601:46:8;31505:78;31602:31;31627:5;31603:18;:6;31614;31603:18;:10;:18;:::i;:::-;31602:24;:31;:24;:31;:::i;:::-;31601:37;:46;:37;:46;:::i;:::-;31589:58;;31665:6;31658:4;:13;31654:132;;;31688:6;31681:13;;;;31654:132;31718:6;31711:4;:13;31707:79;;;31741:6;31734:13;;;;31707:79;31775:4;31768:11;;31707:79;31068:722;;;;;;;;;;:::o;6806:350::-;6918:42;;;;;;;;;;;;-1:-1:-1;;;6954:4:8;6918:42;;;;;;;22:32:-1;26:21;;;22:32;6:49;;6918:42:8;;;;;;;;6908:53;;6875:12;;;;6918:42;;;;;6908:53;;;;6918:42;6908:53;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;6908:53:8;;;;;;;;;;;;6982:12;;:32;;;;;;;;;;;;;;;;;6908:53;;-1:-1:-1;;;;;;6982:12:8;;;;-1:-1:-1;6982:20:8;;-1:-1:-1;6982:32:8;;;;;263:2:-1;;-1:-1;6982:32:8;;;;;;;-1:-1:-1;6982:12:8;:32;;;5:2:-1;;;;30:1;27;20:12;5:2;6982:32:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6982:32:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6982:32:8;6967:167;;;;;;;-1:-1:-1;;;;;6967:167:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7147:4;7140:11;;6806:350;;;;;;:::o;7624:::-;7736:42;;;;;;;;;;;;-1:-1:-1;;;7772:4:8;7736:42;;;;;;;22:32:-1;26:21;;;22:32;6:49;;7736:42:8;;;;;;;;7726:53;;7693:12;;;;7736:42;;;;;7726:53;;;;7736:42;7726:53;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;8442:350:8;8554:42;;;;;;;;;;;;-1:-1:-1;;;8590:4:8;8554:42;;;;;;;22:32:-1;26:21;;;22:32;6:49;;8554:42:8;;;;;;;;8544:53;;8511:12;;;;8554:42;;;;;8544:53;;;;8554:42;8544:53;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;9255:354:8;9369:43;;;;;;;;;;;;-1:-1:-1;;;9406:4:8;9369:43;;;;;;;22:32:-1;26:21;;;22:32;6:49;;9369:43:8;;;;;;;;9359:54;;9326:12;;;;9369:43;;;;;9359:54;;;;9369:43;9359:54;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;10106:352:8;10219:42;;;;;;;;;;;;-1:-1:-1;;;10255:4:8;10219:42;;;;;;;22:32:-1;26:21;;;22:32;6:49;;10219:42:8;;;;;;;;10209:53;;10176:12;;;;10219:42;;;;;10209:53;;;;10219:42;10209:53;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;10209:53:8;;;;;;;;;;;;10283:12;;:33;;;;;;;;;;;;;;;;;;;;;;;10209:53;;-1:-1:-1;;;;;;10283:12:8;;;;-1:-1:-1;10283:21:8;;-1:-1:-1;10209:53:8;;10283:33;;-1:-1:-1;10283:33:8;;;;;;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;10283:33:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;22196:215:8;22282:11;22301:10;22352:15;22324:44;;;;;;;;;;;;;-1:-1:-1;;;;;22324:44:8;-1:-1:-1;;;;;22324:44:8;-1:-1:-1;;;22324:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22324:44:8;;;22314:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;22314:55:8;;;;;;;;;;;;22382:12;;-1:-1:-1;;;;;22382:24:8;;;;;;;;;;22314:55;;-1:-1:-1;;;;;;22382:12:8;;;;-1:-1:-1;22382:20:8;;-1:-1:-1;22382:24:8;;;;;263:2:-1;;-1:-1;22382:24:8;;;;;;;-1:-1:-1;22382:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;22382:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;22382:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22382:24:8;;22196:215;-1:-1:-1;;;;22196:215:8:o;22791:::-;22877:11;22896:10;22947:15;22919:44;;;;;;;;;;;;;-1:-1:-1;;;;;22919:44:8;-1:-1:-1;;;;;22919:44:8;-1:-1:-1;;;22919:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22919:44:8;;;22909:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23386:215:8;23472:11;23491:10;23542:15;23514:44;;;;;;;;;;;;;-1:-1:-1;;;;;23514:44:8;-1:-1:-1;;;;;23514:44:8;-1:-1:-1;;;23514:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;23514:44:8;;;23504:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23976:218:8;24063:12;24083:10;24135:15;24106:45;;;;;;;;;;;;;-1:-1:-1;;;;;24106:45:8;-1:-1:-1;;;;;24106:45:8;-1:-1:-1;;;24106:45:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24106:45:8;;;24096:56;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;24582:217:8;24668:12;24688:10;24739:15;24711:44;;;;;;;;;;;;;-1:-1:-1;;;;;24711:44:8;-1:-1:-1;;;;;24711:44:8;-1:-1:-1;;;24711:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24711:44:8;;;24701:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;24701:55:8;;;;;;;;;;;;24769:12;;:25;;;;;;;;;;;24701:55;;-1:-1:-1;;;;;;24769:12:8;;;;-1:-1:-1;24769:21:8;;-1:-1:-1;24769:25:8;;;;;-1:-1:-1;;;24769:25:8;;;;;;-1:-1:-1;24769:12:8;:25;;;5:2:-1;;;;30:1;27;20:12;5:2;24769:25:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;24769:25:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;24769:25:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;24769:25:8;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;-1:-1;24769:25:8;;24582:217;-1:-1:-1;;;;;;;;24582:217:8:o;16402:357::-;16490:25;16523:10;16596:23;16581:7;16546:43;;;;;;;;;;;;;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;16546:43:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16546:43:8;;;16536:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16536:54:8;;;;;;;;;;;;16622:12;;:27;;;;;;;;;;;16536:54;;-1:-1:-1;;;;;;16622:12:8;;;;-1:-1:-1;16622:23:8;;-1:-1:-1;16622:27:8;;;;;263:2:-1;;-1:-1;16622:27:8;;;;;;;-1:-1:-1;16622:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16622:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16622:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16622:27:8;;-1:-1:-1;;;;;;16659:22:8;;;16655:100;;16698:15;16691:22;;;;16655:100;16741:7;16734:14;;16655:100;16402:357;;;;;;:::o;1143:234:2:-;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;1540:174::-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1708:1;1540:174;-1:-1:-1;;;1540:174:2:o;301:224::-;359:14;;385:6;;381:35;;;408:1;401:8;;;;381:35;-1:-1:-1;433:5:2;;;437:1;433;:5;452;;;;;;;;:10;444:62;;;;;-1:-1:-1;;;;;444:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;697:284;755:14;857:9;873:1;869;:5;;;;;;;;;697:284;-1:-1:-1;;;;697:284:2:o", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\n\n/*\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title Standard Fee Contract for Token, Inc. Smart Money System\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n\n*/\n\n\ncontract TokenIOFeeContract is Ownable {\n\n\t/// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n\tusing TokenIOLib for TokenIOLib.Data;\n\tTokenIOLib.Data lib;\n\n\n\t/**\n\t* @notice Constructor method for ERC20 contract\n\t* @param _storageContract address of TokenIOStorage contract\n\t*/\n\tconstructor(address _storageContract) public {\n\t\t\t/// @dev Set the storage contract for the interface\n\t\t\t/// @dev NOTE: This contract will be unable to use the storage constract until\n\t\t\t/// @dev contract address is authorized with the storage contract\n\t\t\t/// @dev Once authorized, Use the `setParams` method to set storage values\n\t\t\tlib.Storage = TokenIOStorage(_storageContract);\n\n\t\t\t/// @dev set owner to contract initiator\n\t\t\towner[msg.sender] = true;\n\t}\n\n\t/**\n\t * @notice Set Fee Parameters for Fee Contract\n\t * @dev The min, max, flat transaction fees should be relative to decimal precision\n\t * @param feeBps Basis points transaction fee\n\t * @param feeMin Minimum transaction fees\n\t * @param feeMax Maximum transaction fee\n\t * @param feeFlat Flat transaction fee\n\t * returns {\"success\" : \"Returns true if successfully called from another contract\"}\n\t */\n\tfunction setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes feeMsg) public onlyOwner returns (bool success) {\n\t\trequire(lib.setFeeBPS(feeBps), \"Error: Unable to set fee contract basis points.\");\n\t\trequire(lib.setFeeMin(feeMin), \"Error: Unable to set fee contract minimum fee.\");\n\t\trequire(lib.setFeeMax(feeMax), \"Error: Unable to set fee contract maximum fee.\");\n\t\trequire(lib.setFeeFlat(feeFlat), \"Error: Unable to set fee contract flat fee.\");\n\t\trequire(lib.setFeeMsg(feeMsg), \"Error: Unable to set fee contract default message.\");\n\t\treturn true;\n\t}\n\n\t/**\n\t \t* @notice Gets fee parameters\n\t\t* @return {\n\t\t\"bps\":\"Returns the basis points fee of the TokenIOFeeContract\",\n\t\t\"min\":\"Returns the min fee of the TokenIOFeeContract\",\n\t\t\"max\":\"Returns the max fee of the TokenIOFeeContract\",\n\t\t\"flat\":\"Returns the flat fee of the TokenIOFeeContract\",\n\t\t\"feeContract\": \"Address of this contract\"\n\t}\n\t*/\n\tfunction getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeContract) {\n\t\t\treturn (\n\t\t\t\t\tlib.getFeeBPS(address(this)),\n\t\t\t\t\tlib.getFeeMin(address(this)),\n\t\t\t\t\tlib.getFeeMax(address(this)),\n\t\t\t\t\tlib.getFeeFlat(address(this)),\n\t\t\t\t\tlib.getFeeMsg(address(this)),\n\t\t\t\t\taddress(this)\n\t\t\t);\n\t}\n\n\t/**\n\t * @notice Returns balance of this contract associated with currency symbol.\n\t * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n\t * @return {\"balance\": \"Balance of TokenIO TSM currency account\"}\n\t */\n\tfunction getTokenBalance(string currency) public view returns(uint balance) {\n\t\treturn lib.getTokenBalance(currency, address(this));\n\t}\n\n\t/** @notice Calculates fee of a given transfer amount\n\t * @param amount transfer amount\n\t * @return { \"fees\": \"Returns the fees associated with this contract\"}\n\t */\n\tfunction calculateFees(uint amount) public view returns (uint fees) {\n\t\treturn lib.calculateFees(address(this), amount);\n\t}\n\n\n\t/**\n\t * @notice Transfer collected fees to another account; onlyOwner\n\t * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n\t * @param to \t\t\tEthereum address of account to send token amount to\n\t * @param amount\t Amount of tokens to transfer\n\t * @param data\t\t Arbitrary bytes data message to include in transfer\n\t * @return {\"success\": \"Returns ture if successfully called from another contract\"}\n\t */\n\tfunction transferCollectedFees(string currency, address to, uint amount, bytes data) public onlyOwner returns (bool success) {\n\t\trequire(\n\t\t\tlib.forceTransfer(currency, address(this), to, amount, data),\n\t\t\t\"Error: unable to transfer fees to account.\"\n\t\t);\n\t\treturn true;\n\t}\n\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFeeContract.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFeeContract.sol", + "exportedSymbols": { + "TokenIOFeeContract": [ + 1636 + ] + }, + "id": 1637, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1429, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 1430, + "nodeType": "ImportDirective", + "scope": 1637, + "sourceUnit": 185, + "src": "25:23:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1431, + "nodeType": "ImportDirective", + "scope": 1637, + "sourceUnit": 5242, + "src": "49:30:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 1432, + "nodeType": "ImportDirective", + "scope": 1637, + "sourceUnit": 4623, + "src": "80:26:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1433, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1101:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 1434, + "nodeType": "InheritanceSpecifier", + "src": "1101:7:7" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1636, + "linearizedBaseContracts": [ + 1636, + 184 + ], + "name": "TokenIOFeeContract", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1437, + "libraryName": { + "contractScope": null, + "id": 1435, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1199:10:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1193:37:7", + "typeName": { + "contractScope": null, + "id": 1436, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1214:15:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 1439, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1636, + "src": "1232:19:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1438, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1232:15:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1459, + "nodeType": "Block", + "src": "1425:413:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1444, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "1714:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1446, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1714:11:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1448, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "1743:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1447, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1728:14:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:32:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1714:46:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1451, + "nodeType": "ExpressionStatement", + "src": "1714:46:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1452, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1810:5:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1455, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1453, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1816:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1816:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1810:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1830:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1810:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1458, + "nodeType": "ExpressionStatement", + "src": "1810:24:7" + } + ] + }, + "documentation": "@notice Constructor method for ERC20 contract\n@param _storageContract address of TokenIOStorage contract", + "id": 1460, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1441, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 1460, + "src": "1392:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1391:26:7" + }, + "payable": false, + "returnParameters": { + "id": 1443, + "nodeType": "ParameterList", + "parameters": [], + "src": "1425:0:7" + }, + "scope": 1636, + "src": "1380:458:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1519, + "nodeType": "Block", + "src": "2371:443:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1480, + "name": "feeBps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "2397:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1478, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2383:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 1932, + "src": "2383:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2383:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e747261637420626173697320706f696e74732e", + "id": 1482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2406:49:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fabd5d1fd4f46cccda6663dddcde851f014c68fb6b477db4d11f0ae282983893", + "typeString": "literal_string \"Error: Unable to set fee contract basis points.\"" + }, + "value": "Error: Unable to set fee contract basis points." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fabd5d1fd4f46cccda6663dddcde851f014c68fb6b477db4d11f0ae282983893", + "typeString": "literal_string \"Error: Unable to set fee contract basis points.\"" + } + ], + "id": 1477, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2375:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2375:81:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1484, + "nodeType": "ExpressionStatement", + "src": "2375:81:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1488, + "name": "feeMin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1464, + "src": "2482:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1486, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2468:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1487, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "2468:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2468:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e7472616374206d696e696d756d206665652e", + "id": 1490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2491:48:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d061faaf87dcb8cd3753e1f1579fa198544ef425a6a0fa7431375fb437439d3", + "typeString": "literal_string \"Error: Unable to set fee contract minimum fee.\"" + }, + "value": "Error: Unable to set fee contract minimum fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d061faaf87dcb8cd3753e1f1579fa198544ef425a6a0fa7431375fb437439d3", + "typeString": "literal_string \"Error: Unable to set fee contract minimum fee.\"" + } + ], + "id": 1485, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2460:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:80:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1492, + "nodeType": "ExpressionStatement", + "src": "2460:80:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1496, + "name": "feeMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1466, + "src": "2566:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1494, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2552:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2000, + "src": "2552:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2552:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e7472616374206d6178696d756d206665652e", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2575:48:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_169ffce6c52c466e162efa9907d18f3ba172d8306517a48ca6d1e404adce90b4", + "typeString": "literal_string \"Error: Unable to set fee contract maximum fee.\"" + }, + "value": "Error: Unable to set fee contract maximum fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_169ffce6c52c466e162efa9907d18f3ba172d8306517a48ca6d1e404adce90b4", + "typeString": "literal_string \"Error: Unable to set fee contract maximum fee.\"" + } + ], + "id": 1493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2544:80:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "2544:80:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1504, + "name": "feeFlat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1468, + "src": "2651:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1502, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2636:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1503, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2034, + "src": "2636:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2636:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e747261637420666c6174206665652e", + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2661:45:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ee0d3dfb62386e6a3c97e5024bd5d251b38044fd1dc8082b8b6b030fd34e14cf", + "typeString": "literal_string \"Error: Unable to set fee contract flat fee.\"" + }, + "value": "Error: Unable to set fee contract flat fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ee0d3dfb62386e6a3c97e5024bd5d251b38044fd1dc8082b8b6b030fd34e14cf", + "typeString": "literal_string \"Error: Unable to set fee contract flat fee.\"" + } + ], + "id": 1501, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2628:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2628:79:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1508, + "nodeType": "ExpressionStatement", + "src": "2628:79:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1512, + "name": "feeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1470, + "src": "2733:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1510, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2719:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2068, + "src": "2719:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes memory) returns (bool)" + } + }, + "id": 1513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2719:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742064656661756c74206d6573736167652e", + "id": 1514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2742:52:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4dd72252a38b4e1a2efba252c9ae574b50710ebb7f2ad4764fe84352ca2d020f", + "typeString": "literal_string \"Error: Unable to set fee contract default message.\"" + }, + "value": "Error: Unable to set fee contract default message." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4dd72252a38b4e1a2efba252c9ae574b50710ebb7f2ad4764fe84352ca2d020f", + "typeString": "literal_string \"Error: Unable to set fee contract default message.\"" + } + ], + "id": 1509, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2711:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2711:84:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1516, + "nodeType": "ExpressionStatement", + "src": "2711:84:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2806:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1476, + "id": 1518, + "nodeType": "Return", + "src": "2799:11:7" + } + ] + }, + "documentation": "@notice Set Fee Parameters for Fee Contract\n@dev The min, max, flat transaction fees should be relative to decimal precision\n@param feeBps Basis points transaction fee\n@param feeMin Minimum transaction fees\n@param feeMax Maximum transaction fee\n@param feeFlat Flat transaction fee\nreturns {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1520, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1473, + "modifierName": { + "argumentTypes": null, + "id": 1472, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2338:9:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2338:9:7" + } + ], + "name": "setFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1471, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1462, + "name": "feeBps", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2264:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1461, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2264:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1464, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2277:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1463, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2277:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1466, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2290:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1465, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2290:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1468, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2303:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1467, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2303:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1470, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2317:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1469, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2317:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2263:67:7" + }, + "payable": false, + "returnParameters": { + "id": 1476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1475, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2357:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1474, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2357:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2356:14:7" + }, + "scope": 1636, + "src": "2242:572:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1570, + "nodeType": "Block", + "src": "3280:217:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1538, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3321:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3313:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1535, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3299:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1536, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2538, + "src": "3299:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3299:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1544, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3356:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3348:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3348:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1541, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3334:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1542, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2564, + "src": "3334:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3334:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1550, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3391:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3383:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1547, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3369:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1548, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "3369:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3369:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1556, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3427:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1553, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3404:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2616, + "src": "3404:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3404:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1562, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3462:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3454:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3454:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1559, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3440:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1560, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "3440:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3440:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1566, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3483:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3475:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3475:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1568, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3292:201:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 1534, + "id": 1569, + "nodeType": "Return", + "src": "3285:208:7" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Returns the basis points fee of the TokenIOFeeContract\",\n\"min\":\"Returns the min fee of the TokenIOFeeContract\",\n\"max\":\"Returns the max fee of the TokenIOFeeContract\",\n\"flat\":\"Returns the flat fee of the TokenIOFeeContract\",\n\"feeContract\": \"Address of this contract\"\n}", + "id": 1571, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1521, + "nodeType": "ParameterList", + "parameters": [], + "src": "3180:2:7" + }, + "payable": false, + "returnParameters": { + "id": 1534, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1523, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3204:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1522, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3204:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1525, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3214:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1524, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3214:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1527, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3224:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3224:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1529, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3234:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1528, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3234:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1531, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3245:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1530, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3245:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1533, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3259:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1532, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3259:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3203:76:7" + }, + "scope": 1636, + "src": "3159:338:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1586, + "nodeType": "Block", + "src": "3805:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1580, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1573, + "src": "3836:8:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1582, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3854:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3846:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3846:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1578, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3816:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1579, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2832, + "src": "3816:19:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3816:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1577, + "id": 1585, + "nodeType": "Return", + "src": "3809:51:7" + } + ] + }, + "documentation": "@notice Returns balance of this contract associated with currency symbol.\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"balance\": \"Balance of TokenIO TSM currency account\"}", + "id": 1587, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1573, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "3754:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1572, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3754:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3753:17:7" + }, + "payable": false, + "returnParameters": { + "id": 1577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1576, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "3791:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1575, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3791:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3790:14:7" + }, + "scope": 1636, + "src": "3729:135:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1602, + "nodeType": "Block", + "src": "4101:55:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1597, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "4138:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4130:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4130:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1599, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "4145:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1594, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "4112:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1595, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 3004, + "src": "4112:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 1600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4112:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1593, + "id": 1601, + "nodeType": "Return", + "src": "4105:47:7" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount transfer amount\n@return { \"fees\": \"Returns the fees associated with this contract\"}", + "id": 1603, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1590, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1589, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1603, + "src": "4056:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1588, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4056:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4055:13:7" + }, + "payable": false, + "returnParameters": { + "id": 1593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1592, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 1603, + "src": "4090:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1591, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4090:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4089:11:7" + }, + "scope": 1636, + "src": "4033:123:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1634, + "nodeType": "Block", + "src": "4712:148:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1621, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "4746:8:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1623, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "4764:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4756:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4756:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1625, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1607, + "src": "4771:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1626, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1609, + "src": "4775:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1627, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1611, + "src": "4783:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1619, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "4728:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1620, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3351, + "src": "4728:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4728:60:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20756e61626c6520746f207472616e73666572206665657320746f206163636f756e742e", + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4793:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1a0e1b57a2efd16cddba9f3dc60eebac17ba4db509e733796cdcf13851421b2c", + "typeString": "literal_string \"Error: unable to transfer fees to account.\"" + }, + "value": "Error: unable to transfer fees to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1a0e1b57a2efd16cddba9f3dc60eebac17ba4db509e733796cdcf13851421b2c", + "typeString": "literal_string \"Error: unable to transfer fees to account.\"" + } + ], + "id": 1618, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4716:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4716:125:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1631, + "nodeType": "ExpressionStatement", + "src": "4716:125:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1632, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4852:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1617, + "id": 1633, + "nodeType": "Return", + "src": "4845:11:7" + } + ] + }, + "documentation": "@notice Transfer collected fees to another account; onlyOwner\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to \t\t\tEthereum address of account to send token amount to\n@param amount\t Amount of tokens to transfer\n@param data\t\t Arbitrary bytes data message to include in transfer\n@return {\"success\": \"Returns ture if successfully called from another contract\"}", + "id": 1635, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1614, + "modifierName": { + "argumentTypes": null, + "id": 1613, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4679:9:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4679:9:7" + } + ], + "name": "transferCollectedFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1612, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1605, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4618:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1604, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4618:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1607, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4635:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1606, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4635:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1609, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4647:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1608, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4647:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1611, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4660:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1610, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4660:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4617:54:7" + }, + "payable": false, + "returnParameters": { + "id": 1617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1616, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4698:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1615, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4698:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4697:14:7" + }, + "scope": 1636, + "src": "4587:273:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1637, + "src": "1070:3794:7" + } + ], + "src": "0:4865:7" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFeeContract.sol", + "exportedSymbols": { + "TokenIOFeeContract": [ + 1636 + ] + }, + "id": 1637, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1429, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 1430, + "nodeType": "ImportDirective", + "scope": 1637, + "sourceUnit": 185, + "src": "25:23:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1431, + "nodeType": "ImportDirective", + "scope": 1637, + "sourceUnit": 5242, + "src": "49:30:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 1432, + "nodeType": "ImportDirective", + "scope": 1637, + "sourceUnit": 4623, + "src": "80:26:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1433, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1101:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 1434, + "nodeType": "InheritanceSpecifier", + "src": "1101:7:7" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1636, + "linearizedBaseContracts": [ + 1636, + 184 + ], + "name": "TokenIOFeeContract", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1437, + "libraryName": { + "contractScope": null, + "id": 1435, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1199:10:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1193:37:7", + "typeName": { + "contractScope": null, + "id": 1436, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1214:15:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 1439, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1636, + "src": "1232:19:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1438, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1232:15:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1459, + "nodeType": "Block", + "src": "1425:413:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1444, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "1714:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1446, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1714:11:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1448, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "1743:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1447, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1728:14:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:32:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1714:46:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1451, + "nodeType": "ExpressionStatement", + "src": "1714:46:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1452, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1810:5:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1455, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1453, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1816:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1816:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1810:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1830:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1810:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1458, + "nodeType": "ExpressionStatement", + "src": "1810:24:7" + } + ] + }, + "documentation": "@notice Constructor method for ERC20 contract\n@param _storageContract address of TokenIOStorage contract", + "id": 1460, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1441, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 1460, + "src": "1392:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1391:26:7" + }, + "payable": false, + "returnParameters": { + "id": 1443, + "nodeType": "ParameterList", + "parameters": [], + "src": "1425:0:7" + }, + "scope": 1636, + "src": "1380:458:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1519, + "nodeType": "Block", + "src": "2371:443:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1480, + "name": "feeBps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "2397:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1478, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2383:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 1932, + "src": "2383:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2383:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e747261637420626173697320706f696e74732e", + "id": 1482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2406:49:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fabd5d1fd4f46cccda6663dddcde851f014c68fb6b477db4d11f0ae282983893", + "typeString": "literal_string \"Error: Unable to set fee contract basis points.\"" + }, + "value": "Error: Unable to set fee contract basis points." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fabd5d1fd4f46cccda6663dddcde851f014c68fb6b477db4d11f0ae282983893", + "typeString": "literal_string \"Error: Unable to set fee contract basis points.\"" + } + ], + "id": 1477, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2375:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2375:81:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1484, + "nodeType": "ExpressionStatement", + "src": "2375:81:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1488, + "name": "feeMin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1464, + "src": "2482:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1486, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2468:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1487, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "2468:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2468:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e7472616374206d696e696d756d206665652e", + "id": 1490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2491:48:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d061faaf87dcb8cd3753e1f1579fa198544ef425a6a0fa7431375fb437439d3", + "typeString": "literal_string \"Error: Unable to set fee contract minimum fee.\"" + }, + "value": "Error: Unable to set fee contract minimum fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d061faaf87dcb8cd3753e1f1579fa198544ef425a6a0fa7431375fb437439d3", + "typeString": "literal_string \"Error: Unable to set fee contract minimum fee.\"" + } + ], + "id": 1485, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2460:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:80:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1492, + "nodeType": "ExpressionStatement", + "src": "2460:80:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1496, + "name": "feeMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1466, + "src": "2566:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1494, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2552:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2000, + "src": "2552:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2552:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e7472616374206d6178696d756d206665652e", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2575:48:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_169ffce6c52c466e162efa9907d18f3ba172d8306517a48ca6d1e404adce90b4", + "typeString": "literal_string \"Error: Unable to set fee contract maximum fee.\"" + }, + "value": "Error: Unable to set fee contract maximum fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_169ffce6c52c466e162efa9907d18f3ba172d8306517a48ca6d1e404adce90b4", + "typeString": "literal_string \"Error: Unable to set fee contract maximum fee.\"" + } + ], + "id": 1493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2544:80:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "2544:80:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1504, + "name": "feeFlat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1468, + "src": "2651:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1502, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2636:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1503, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2034, + "src": "2636:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2636:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e747261637420666c6174206665652e", + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2661:45:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ee0d3dfb62386e6a3c97e5024bd5d251b38044fd1dc8082b8b6b030fd34e14cf", + "typeString": "literal_string \"Error: Unable to set fee contract flat fee.\"" + }, + "value": "Error: Unable to set fee contract flat fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ee0d3dfb62386e6a3c97e5024bd5d251b38044fd1dc8082b8b6b030fd34e14cf", + "typeString": "literal_string \"Error: Unable to set fee contract flat fee.\"" + } + ], + "id": 1501, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2628:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2628:79:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1508, + "nodeType": "ExpressionStatement", + "src": "2628:79:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1512, + "name": "feeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1470, + "src": "2733:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1510, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "2719:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2068, + "src": "2719:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes memory) returns (bool)" + } + }, + "id": 1513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2719:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742064656661756c74206d6573736167652e", + "id": 1514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2742:52:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4dd72252a38b4e1a2efba252c9ae574b50710ebb7f2ad4764fe84352ca2d020f", + "typeString": "literal_string \"Error: Unable to set fee contract default message.\"" + }, + "value": "Error: Unable to set fee contract default message." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4dd72252a38b4e1a2efba252c9ae574b50710ebb7f2ad4764fe84352ca2d020f", + "typeString": "literal_string \"Error: Unable to set fee contract default message.\"" + } + ], + "id": 1509, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2711:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2711:84:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1516, + "nodeType": "ExpressionStatement", + "src": "2711:84:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2806:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1476, + "id": 1518, + "nodeType": "Return", + "src": "2799:11:7" + } + ] + }, + "documentation": "@notice Set Fee Parameters for Fee Contract\n@dev The min, max, flat transaction fees should be relative to decimal precision\n@param feeBps Basis points transaction fee\n@param feeMin Minimum transaction fees\n@param feeMax Maximum transaction fee\n@param feeFlat Flat transaction fee\nreturns {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1520, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1473, + "modifierName": { + "argumentTypes": null, + "id": 1472, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2338:9:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2338:9:7" + } + ], + "name": "setFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1471, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1462, + "name": "feeBps", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2264:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1461, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2264:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1464, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2277:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1463, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2277:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1466, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2290:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1465, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2290:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1468, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2303:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1467, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2303:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1470, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2317:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1469, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2317:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2263:67:7" + }, + "payable": false, + "returnParameters": { + "id": 1476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1475, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1520, + "src": "2357:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1474, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2357:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2356:14:7" + }, + "scope": 1636, + "src": "2242:572:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1570, + "nodeType": "Block", + "src": "3280:217:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1538, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3321:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3313:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1535, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3299:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1536, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2538, + "src": "3299:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3299:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1544, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3356:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3348:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3348:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1541, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3334:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1542, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2564, + "src": "3334:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3334:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1550, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3391:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3383:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1547, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3369:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1548, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "3369:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3369:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1556, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3427:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1553, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3404:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2616, + "src": "3404:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3404:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1562, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3462:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3454:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3454:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1559, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3440:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1560, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "3440:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3440:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1566, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3483:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3475:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3475:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1568, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3292:201:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 1534, + "id": 1569, + "nodeType": "Return", + "src": "3285:208:7" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Returns the basis points fee of the TokenIOFeeContract\",\n\"min\":\"Returns the min fee of the TokenIOFeeContract\",\n\"max\":\"Returns the max fee of the TokenIOFeeContract\",\n\"flat\":\"Returns the flat fee of the TokenIOFeeContract\",\n\"feeContract\": \"Address of this contract\"\n}", + "id": 1571, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1521, + "nodeType": "ParameterList", + "parameters": [], + "src": "3180:2:7" + }, + "payable": false, + "returnParameters": { + "id": 1534, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1523, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3204:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1522, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3204:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1525, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3214:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1524, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3214:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1527, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3224:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3224:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1529, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3234:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1528, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3234:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1531, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3245:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1530, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3245:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1533, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3259:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1532, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3259:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3203:76:7" + }, + "scope": 1636, + "src": "3159:338:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1586, + "nodeType": "Block", + "src": "3805:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1580, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1573, + "src": "3836:8:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1582, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3854:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3846:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3846:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1578, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "3816:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1579, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2832, + "src": "3816:19:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3816:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1577, + "id": 1585, + "nodeType": "Return", + "src": "3809:51:7" + } + ] + }, + "documentation": "@notice Returns balance of this contract associated with currency symbol.\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"balance\": \"Balance of TokenIO TSM currency account\"}", + "id": 1587, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1573, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "3754:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1572, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3754:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3753:17:7" + }, + "payable": false, + "returnParameters": { + "id": 1577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1576, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "3791:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1575, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3791:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3790:14:7" + }, + "scope": 1636, + "src": "3729:135:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1602, + "nodeType": "Block", + "src": "4101:55:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1597, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "4138:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4130:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4130:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1599, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "4145:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1594, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "4112:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1595, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 3004, + "src": "4112:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 1600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4112:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1593, + "id": 1601, + "nodeType": "Return", + "src": "4105:47:7" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount transfer amount\n@return { \"fees\": \"Returns the fees associated with this contract\"}", + "id": 1603, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1590, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1589, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1603, + "src": "4056:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1588, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4056:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4055:13:7" + }, + "payable": false, + "returnParameters": { + "id": 1593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1592, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 1603, + "src": "4090:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1591, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4090:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4089:11:7" + }, + "scope": 1636, + "src": "4033:123:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1634, + "nodeType": "Block", + "src": "4712:148:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1621, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "4746:8:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1623, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "4764:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1636", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4756:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4756:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1625, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1607, + "src": "4771:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1626, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1609, + "src": "4775:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1627, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1611, + "src": "4783:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1619, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "4728:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1620, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3351, + "src": "4728:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4728:60:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20756e61626c6520746f207472616e73666572206665657320746f206163636f756e742e", + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4793:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1a0e1b57a2efd16cddba9f3dc60eebac17ba4db509e733796cdcf13851421b2c", + "typeString": "literal_string \"Error: unable to transfer fees to account.\"" + }, + "value": "Error: unable to transfer fees to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1a0e1b57a2efd16cddba9f3dc60eebac17ba4db509e733796cdcf13851421b2c", + "typeString": "literal_string \"Error: unable to transfer fees to account.\"" + } + ], + "id": 1618, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4716:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4716:125:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1631, + "nodeType": "ExpressionStatement", + "src": "4716:125:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1632, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4852:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1617, + "id": 1633, + "nodeType": "Return", + "src": "4845:11:7" + } + ] + }, + "documentation": "@notice Transfer collected fees to another account; onlyOwner\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to \t\t\tEthereum address of account to send token amount to\n@param amount\t Amount of tokens to transfer\n@param data\t\t Arbitrary bytes data message to include in transfer\n@return {\"success\": \"Returns ture if successfully called from another contract\"}", + "id": 1635, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1614, + "modifierName": { + "argumentTypes": null, + "id": 1613, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4679:9:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4679:9:7" + } + ], + "name": "transferCollectedFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1612, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1605, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4618:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1604, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4618:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1607, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4635:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1606, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4635:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1609, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4647:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1608, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4647:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1611, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4660:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1610, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4660:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4617:54:7" + }, + "payable": false, + "returnParameters": { + "id": 1617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1616, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1635, + "src": "4698:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1615, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4698:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4697:14:7" + }, + "scope": 1636, + "src": "4587:273:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1637, + "src": "1070:3794:7" + } + ], + "src": "0:4865:7" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x0149e0aaea12ed0fa6ca63175051d17fd2e5afae", + "transactionHash": "0xc6bd6981ab4df680824723a1e0f20a67aa763c540edf6f32310a0866321a8fab" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.594Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIOLib.json b/deployed/mainnet/TokenIOLib.json new file mode 100644 index 0000000..b9fd646 --- /dev/null +++ b/deployed/mainnet/TokenIOLib.json @@ -0,0 +1,87990 @@ +{ + "contractName": "TokenIOLib", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "currency", + "type": "string" + }, + { + "indexed": true, + "name": "account", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "currency", + "type": "string" + }, + { + "indexed": true, + "name": "account", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "currency", + "type": "string" + }, + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "data", + "type": "bytes" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + }, + { + "indexed": false, + "name": "status", + "type": "bool" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "KYCApproval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + }, + { + "indexed": false, + "name": "status", + "type": "bool" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "AccountStatus", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "tokenASymbol", + "type": "string" + }, + { + "indexed": false, + "name": "tokenBSymbol", + "type": "string" + }, + { + "indexed": false, + "name": "tokenAValue", + "type": "uint256" + }, + { + "indexed": false, + "name": "tokenBValue", + "type": "uint256" + }, + { + "indexed": false, + "name": "expiration", + "type": "uint256" + }, + { + "indexed": false, + "name": "transactionHash", + "type": "bytes32" + } + ], + "name": "FxSwap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "originalAccount", + "type": "address" + }, + { + "indexed": true, + "name": "forwardedAccount", + "type": "address" + } + ], + "name": "AccountForward", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "authority", + "type": "address" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "NewAuthority", + "type": "event" + } + ], + "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058207e6fbcbb3ce1f753b1bea39be6bffaecd82c9addb4491097191a91f6849cc83d0029", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058207e6fbcbb3ce1f753b1bea39be6bffaecd82c9addb4491097191a91f6849cc83d0029", + "sourceMap": "900:63992:8:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", + "deployedSourceMap": "900:63992:8:-;;;;;;;;", + "source": "pragma solidity 0.4.24;\n\n\n/**\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title TokenIOLib\n\n@author Ryan Tate , Sean Pollock \n\n@notice This library proxies the TokenIOStorage contract for the interface contract,\nallowing the library and the interfaces to remain stateless, and share a universally\navailable storage contract between interfaces.\n\n\n*/\n\n\nimport \"./SafeMath.sol\";\nimport \"./TokenIOStorage.sol\";\n\n\nlibrary TokenIOLib {\n\n /// @dev all math operating are using SafeMath methods to check for overflow/underflows\n using SafeMath for uint;\n\n /// @dev the Data struct uses the Storage contract for stateful setters\n struct Data {\n TokenIOStorage Storage;\n }\n\n /// @notice Not using `Log` prefix for events to be consistent with ERC20 named events;\n event Approval(address indexed owner, address indexed spender, uint amount);\n event Deposit(string currency, address indexed account, uint amount, string issuerFirm);\n event Withdraw(string currency, address indexed account, uint amount, string issuerFirm);\n event Transfer(string currency, address indexed from, address indexed to, uint amount, bytes data);\n event KYCApproval(address indexed account, bool status, string issuerFirm);\n event AccountStatus(address indexed account, bool status, string issuerFirm);\n event FxSwap(string tokenASymbol,string tokenBSymbol,uint tokenAValue,uint tokenBValue, uint expiration, bytes32 transactionHash);\n event AccountForward(address indexed originalAccount, address indexed forwardedAccount);\n event NewAuthority(address indexed authority, string issuerFirm);\n\n /**\n * @notice Set the token name for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenName Name of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenName(Data storage self, string tokenName) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.name', address(this)));\n require(\n self.Storage.setString(id, tokenName),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token symbol for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenSymbol Symbol of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenSymbol(Data storage self, string tokenSymbol) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.symbol', address(this)));\n require(\n self.Storage.setString(id, tokenSymbol),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token three letter abreviation (TLA) for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenTLA TLA of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenTLA(Data storage self, string tokenTLA) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.tla', address(this)));\n require(\n self.Storage.setString(id, tokenTLA),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token version for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenVersion(Data storage self, string tokenVersion) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.version', address(this)));\n require(\n self.Storage.setString(id, tokenVersion),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token decimals for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @dev This method is not set to the address of the contract, rather is maped to currency\n * @dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param tokenDecimals Decimal representation of the token contract unit amount\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenDecimals(Data storage self, string currency, uint tokenDecimals) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.decimals', currency));\n require(\n self.Storage.setUint(id, tokenDecimals),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set basis point fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeBPS Basis points fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeBPS(Data storage self, uint feeBPS) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.bps', address(this)));\n require(\n self.Storage.setUint(id, feeBPS),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set minimum fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMin Minimum fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMin(Data storage self, uint feeMin) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.min', address(this)));\n require(\n self.Storage.setUint(id, feeMin),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set maximum fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMax Maximum fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMax(Data storage self, uint feeMax) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.max', address(this)));\n require(\n self.Storage.setUint(id, feeMax),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set flat fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeFlat Flat fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeFlat(Data storage self, uint feeFlat) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.flat', address(this)));\n require(\n self.Storage.setUint(id, feeFlat),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set fee message for contract interface\n * @dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n * @dev Fee messages vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMsg Fee message included in a transaction with fees\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMsg(Data storage self, bytes feeMsg) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.msg', address(this)));\n require(\n self.Storage.setBytes(id, feeMsg),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set fee contract for a contract interface\n * @dev feeContract must be a TokenIOFeeContract storage approved contract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @dev | This must be called directly from the interface contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeContract Set the fee contract for `this` contract address interface\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeContract(Data storage self, address feeContract) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.account', address(this)));\n require(\n self.Storage.setAddress(id, feeContract),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n * @dev | This should only be called once from a token interface contract;\n * @dev | This method has an `internal` view\n * @dev | This method is experimental and may be deprecated/refactored\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenNameSpace(Data storage self, string currency) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.namespace', currency));\n require(\n self.Storage.setAddress(id, address(this)),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the KYC approval status (true/false) for a given account\n * @dev | This method has an `internal` view\n * @dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n * @dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param isApproved Boolean (true/false) KYC approval status for a given account\n * @param issuerFirm Firm name for issuing KYC approval\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setKYCApproval(Data storage self, address account, bool isApproved, string issuerFirm) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account)));\n require(\n self.Storage.setBool(id, isApproved),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n\n /// @dev NOTE: Issuer is logged for setting account KYC status\n emit KYCApproval(account, isApproved, issuerFirm);\n return true;\n }\n\n /**\n * @notice Set the global approval status (true/false) for a given account\n * @dev | This method has an `internal` view\n * @dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n * @dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param isAllowed Boolean (true/false) global status for a given account\n * @param issuerFirm Firm name for issuing approval\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setAccountStatus(Data storage self, address account, bool isAllowed, string issuerFirm) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account)));\n require(\n self.Storage.setBool(id, isAllowed),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n\n /// @dev NOTE: Issuer is logged for setting account status\n emit AccountStatus(account, isAllowed, issuerFirm);\n return true;\n }\n\n\n /**\n * @notice Set a forwarded address for an account.\n * @dev | This method has an `internal` view\n * @dev | Forwarded accounts must be set by an authority in case of account recovery;\n * @dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n * @dev | All transactions will be logged under the same KYC information as the original account holder;\n * @param self Internal storage proxying TokenIOStorage contract\n * @param originalAccount Original registered Ethereum address of the account holder\n * @param forwardedAccount Forwarded Ethereum address of the account holder\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setForwardedAccount(Data storage self, address originalAccount, address forwardedAccount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('master.account', forwardedAccount));\n require(\n self.Storage.setAddress(id, originalAccount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Get the original address for a forwarded account\n * @dev | This method has an `internal` view\n * @dev | Will return the registered account for the given forwarded account\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}\n */\n function getForwardedAccount(Data storage self, address account) internal view returns (address registeredAccount) {\n bytes32 id = keccak256(abi.encodePacked('master.account', account));\n address originalAccount = self.Storage.getAddress(id);\n if (originalAccount != 0x0) {\n return originalAccount;\n } else {\n return account;\n }\n }\n\n /**\n * @notice Get KYC approval status for the account holder\n * @dev | This method has an `internal` view\n * @dev | All forwarded accounts will use the original account's status\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"status\" : \"Returns the KYC approval status for an account holder\" }\n */\n function getKYCApproval(Data storage self, address account) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Get global approval status for the account holder\n * @dev | This method has an `internal` view\n * @dev | All forwarded accounts will use the original account's status\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"status\" : \"Returns the global approval status for an account holder\" }\n */\n function getAccountStatus(Data storage self, address account) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Get the contract interface address associated with token symbol\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }\n */\n function getTokenNameSpace(Data storage self, string currency) internal view returns (address contractAddress) {\n bytes32 id = keccak256(abi.encodePacked('token.namespace', currency));\n return self.Storage.getAddress(id);\n }\n\n /**\n * @notice Get the token name for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenName\" : \"Name of the token contract\"}\n */\n function getTokenName(Data storage self, address contractAddress) internal view returns (string tokenName) {\n bytes32 id = keccak256(abi.encodePacked('token.name', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token symbol for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenSymbol\" : \"Symbol of the token contract\"}\n */\n function getTokenSymbol(Data storage self, address contractAddress) internal view returns (string tokenSymbol) {\n bytes32 id = keccak256(abi.encodePacked('token.symbol', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token Three letter abbreviation (TLA) for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenTLA\" : \"TLA of the token contract\"}\n */\n function getTokenTLA(Data storage self, address contractAddress) internal view returns (string tokenTLA) {\n bytes32 id = keccak256(abi.encodePacked('token.tla', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token version for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenVersion\" : \"Semantic version of the token contract\"}\n */\n function getTokenVersion(Data storage self, address contractAddress) internal view returns (string) {\n bytes32 id = keccak256(abi.encodePacked('token.version', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token decimals for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"tokenDecimals\" : \"Decimals of the token contract\"}\n */\n function getTokenDecimals(Data storage self, string currency) internal view returns (uint tokenDecimals) {\n bytes32 id = keccak256(abi.encodePacked('token.decimals', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}\n */\n function getFeeBPS(Data storage self, address contractAddress) internal view returns (uint feeBps) {\n bytes32 id = keccak256(abi.encodePacked('fee.bps', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}\n */\n function getFeeMin(Data storage self, address contractAddress) internal view returns (uint feeMin) {\n bytes32 id = keccak256(abi.encodePacked('fee.min', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}\n */\n function getFeeMax(Data storage self, address contractAddress) internal view returns (uint feeMax) {\n bytes32 id = keccak256(abi.encodePacked('fee.max', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the flat fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}\n */\n function getFeeFlat(Data storage self, address contractAddress) internal view returns (uint feeFlat) {\n bytes32 id = keccak256(abi.encodePacked('fee.flat', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the flat message of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}\n */\n function getFeeMsg(Data storage self, address contractAddress) internal view returns (bytes feeMsg) {\n bytes32 id = keccak256(abi.encodePacked('fee.msg', contractAddress));\n return self.Storage.getBytes(id);\n }\n\n /**\n * @notice Set the master fee contract used as the default fee contract when none is provided\n * @dev | This method has an `internal` view\n * @dev | This value is set in the TokenIOAuthority contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setMasterFeeContract(Data storage self, address contractAddress) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.contract.master'));\n require(\n self.Storage.setAddress(id, contractAddress),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Get the master fee contract set via the TokenIOAuthority contract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}\n */\n function getMasterFeeContract(Data storage self) internal view returns (address masterFeeContract) {\n bytes32 id = keccak256(abi.encodePacked('fee.contract.master'));\n return self.Storage.getAddress(id);\n }\n\n /**\n * @notice Get the fee contract set for a contract interface\n * @dev | This method has an `internal` view\n * @dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n * @dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}\n */\n function getFeeContract(Data storage self, address contractAddress) internal view returns (address feeContract) {\n bytes32 id = keccak256(abi.encodePacked('fee.account', contractAddress));\n\n address feeAccount = self.Storage.getAddress(id);\n if (feeAccount == 0x0) {\n return getMasterFeeContract(self);\n } else {\n return feeAccount;\n }\n }\n\n /**\n * @notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return { \"supply\" : \"Returns the token supply of the given currency\"}\n */\n function getTokenSupply(Data storage self, string currency) internal view returns (uint supply) {\n bytes32 id = keccak256(abi.encodePacked('token.supply', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the token spender allowance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param spender Ethereum address of spender\n * @return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}\n */\n function getTokenAllowance(Data storage self, string currency, address account, address spender) internal view returns (uint allowance) {\n bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, spender)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @return { \"balance\" : \"Return the balance of a given account for a specified currency\"}\n */\n function getTokenBalance(Data storage self, string currency, address account) internal view returns (uint balance) {\n bytes32 id = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}\n */\n function getTokenFrozenBalance(Data storage self, string currency, address account) internal view returns (uint frozenBalance) {\n bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @param amount Amount of tokens to freeze for account\n * @return { \"success\" : \"Return true if successfully called from another contract\"}\n */\n function setTokenFrozenBalance(Data storage self, string currency, address account, uint amount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account)));\n require(\n self.Storage.setUint(id, amount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the fee contract\n * @param amount Transaction value\n * @return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }\n */\n function calculateFees(Data storage self, address contractAddress, uint amount) internal view returns (uint calculatedFees) {\n\n uint maxFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.max', contractAddress)));\n uint minFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.min', contractAddress)));\n uint bpsFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.bps', contractAddress)));\n uint flatFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.flat', contractAddress)));\n uint fees = ((amount.mul(bpsFee)).div(10000)).add(flatFee);\n\n if (fees > maxFee) {\n return maxFee;\n } else if (fees < minFee) {\n return minFee;\n } else {\n return fees;\n }\n }\n\n /**\n * @notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param accountA Ethereum address of first account holder to verify\n * @param accountB Ethereum address of second account holder to verify\n * @return { \"verified\" : \"Returns true if both accounts are successfully verified\" }\n */\n function verifyAccounts(Data storage self, address accountA, address accountB) internal view returns (bool verified) {\n require(\n verifyAccount(self, accountA),\n \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"\n );\n require(\n verifyAccount(self, accountB),\n \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"\n );\n return true;\n }\n\n /**\n * @notice Verified KYC and global status for a single account and return true or throw if account is not verified\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder to verify\n * @return { \"verified\" : \"Returns true if account is successfully verified\" }\n */\n function verifyAccount(Data storage self, address account) internal view returns (bool verified) {\n require(\n getKYCApproval(self, account),\n \"Error: Account does not have KYC approval.\"\n );\n require(\n getAccountStatus(self, account),\n \"Error: Account status is `false`. Account status must be `true`.\"\n );\n return true;\n }\n\n\n /**\n * @notice Transfer an amount of currency token from msg.sender account to another specified account\n * @dev This function is called by an interface that is accessible directly to the account holder\n * @dev | This method has an `internal` view\n * @dev | This method uses `forceTransfer()` low-level api\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function transfer(Data storage self, string currency, address to, uint amount, bytes data) internal returns (bool success) {\n require(address(to) != 0x0, \"Error: `to` address cannot be null.\" );\n require(amount > 0, \"Error: `amount` must be greater than zero\");\n\n address feeContract = getFeeContract(self, address(this));\n uint fees = calculateFees(self, feeContract, amount);\n\n require(\n setAccountSpendingAmount(self, msg.sender, getFxUSDAmount(self, currency, amount)),\n \"Error: Unable to set spending amount for account.\");\n\n require(\n forceTransfer(self, currency, msg.sender, to, amount, data),\n \"Error: Unable to transfer funds to account.\");\n\n // @dev transfer fees to fee contract\n require(\n forceTransfer(self, currency, msg.sender, feeContract, fees, getFeeMsg(self, feeContract)),\n \"Error: Unable to transfer fees to fee contract.\");\n\n return true;\n }\n\n /**\n * @notice Transfer an amount of currency token from account to another specified account via an approved spender account\n * @dev This function is called by an interface that is accessible directly to the account spender\n * @dev | This method has an `internal` view\n * @dev | Transactions will fail if the spending amount exceeds the daily limit\n * @dev | This method uses `forceTransfer()` low-level api\n * @dev | This method implements ERC20 transferFrom() method with approved spender behavior\n * @dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param from Ethereum address of account to send currency amount from\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) {\n require(\n address(to) != 0x0,\n \"Error: `to` address must not be null.\"\n );\n\n address feeContract = getFeeContract(self, address(this));\n uint fees = calculateFees(self, feeContract, amount);\n\n /// @dev NOTE: This transaction will fail if the spending amount exceeds the daily limit\n require(\n setAccountSpendingAmount(self, from, getFxUSDAmount(self, currency, amount)),\n \"Error: Unable to set account spending amount.\"\n );\n\n /// @dev Attempt to transfer the amount\n require(\n forceTransfer(self, currency, from, to, amount, data),\n \"Error: Unable to transfer funds to account.\"\n );\n\n // @dev transfer fees to fee contract\n require(\n forceTransfer(self, currency, from, feeContract, fees, getFeeMsg(self, feeContract)),\n \"Error: Unable to transfer fees to fee contract.\"\n );\n\n /// @dev Attempt to update the spender allowance\n require(\n updateAllowance(self, currency, from, amount),\n \"Error: Unable to update allowance for spender.\"\n );\n\n return true;\n }\n\n /**\n * @notice Low-level transfer method\n * @dev | This method has an `internal` view\n * @dev | This method does not include fees or approved allowances.\n * @dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param from Ethereum address of account to send currency amount from\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) {\n require(\n address(to) != 0x0,\n \"Error: `to` address must not be null.\"\n );\n\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, from)));\n bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, to)));\n\n require(\n self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n require(\n self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n\n emit Transfer(currency, from, to, amount, data);\n\n return true;\n }\n\n /**\n * @notice Low-level method to update spender allowance for account\n * @dev | This method is called inside the `transferFrom()` method\n * @dev | msg.sender == spender address\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @param amount Value to reduce allowance by (i.e. the amount spent)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function updateAllowance(Data storage self, string currency, address account, uint amount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, msg.sender)));\n require(\n self.Storage.setUint(id, self.Storage.getUint(id).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Low-level method to set the allowance for a spender\n * @dev | This method is called inside the `approve()` ERC20 method\n * @dev | msg.sender == account holder\n * @param self Internal storage proxying TokenIOStorage contract\n * @param spender Ethereum address of account spender\n * @param amount Value to set for spender allowance\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function approveAllowance(Data storage self, address spender, uint amount) internal returns (bool success) {\n require(spender != 0x0,\n \"Error: `spender` address cannot be null.\");\n\n string memory currency = getTokenSymbol(self, address(this));\n\n require(\n getTokenFrozenBalance(self, currency, getForwardedAccount(self, spender)) == 0,\n \"Error: Spender must not have a frozen balance directly\");\n\n bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, msg.sender), getForwardedAccount(self, spender)));\n bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, msg.sender)));\n\n require(\n self.Storage.getUint(id_a) == 0 || amount == 0,\n \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\");\n\n require(\n self.Storage.getUint(id_b) >= amount,\n \"Error: Allowance cannot exceed msg.sender token balance.\");\n\n require(\n self.Storage.setUint(id_a, amount),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Approval(msg.sender, spender, amount);\n\n return true;\n }\n\n /**\n * @notice Deposit an amount of currency into the Ethereum account holder\n * @dev | The total supply of the token increases only when new funds are deposited 1:1\n * @dev | This method should only be called by authorized issuer firms\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder to deposit funds for\n * @param amount Value of currency to deposit for account\n * @param issuerFirm Name of the issuing firm authorizing the deposit\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function deposit(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) {\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm));\n bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency));\n\n\n require(self.Storage.setUint(id_a, self.Storage.getUint(id_a).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(self.Storage.setUint(id_c, self.Storage.getUint(id_c).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Deposit(currency, account, amount, issuerFirm);\n\n return true;\n\n }\n\n /**\n * @notice Withdraw an amount of currency from the Ethereum account holder\n * @dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n * @dev | This method should only be called by authorized issuer firms\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder to deposit funds for\n * @param amount Value of currency to withdraw for account\n * @param issuerFirm Name of the issuing firm authorizing the withdraw\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function withdraw(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) {\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm)); // possible for issuer to go negative\n bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency));\n\n require(\n self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(\n self.Storage.setUint(id_b, self.Storage.getUint(id_b).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(\n self.Storage.setUint(id_c, self.Storage.getUint(id_c).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Withdraw(currency, account, amount, issuerFirm);\n\n return true;\n\n }\n\n /**\n * @notice Method for setting a registered issuer firm\n * @dev | Only Token, Inc. and other authorized institutions may set a registered firm\n * @dev | The TokenIOAuthority.sol interface wraps this method\n * @dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the firm to be registered\n * @param approved Approval status to set for the firm (true/false)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setRegisteredFirm(Data storage self, string issuerFirm, bool approved) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm));\n require(\n self.Storage.setBool(id, approved),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Method for setting a registered issuer firm authority\n * @dev | Only Token, Inc. and other approved institutions may set a registered firm\n * @dev | The TokenIOAuthority.sol interface wraps this method\n * @dev | Authority can only be set for a registered issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the firm to be registered to authority\n * @param authorityAddress Ethereum address of the firm authority to be approved\n * @param approved Approval status to set for the firm authority (true/false)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setRegisteredAuthority(Data storage self, string issuerFirm, address authorityAddress, bool approved) internal returns (bool success) {\n require(\n isRegisteredFirm(self, issuerFirm),\n \"Error: `issuerFirm` must be registered.\");\n\n bytes32 id_a = keccak256(abi.encodePacked('registered.authority', issuerFirm, authorityAddress));\n bytes32 id_b = keccak256(abi.encodePacked('registered.authority.firm', authorityAddress));\n\n require(\n self.Storage.setBool(id_a, approved),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n require(\n self.Storage.setString(id_b, issuerFirm),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n\n return true;\n }\n\n /**\n * @notice Get the issuer firm registered to the authority Ethereum address\n * @dev | Only one firm can be registered per authority\n * @param self Internal storage proxying TokenIOStorage contract\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"issuerFirm\" : \"Name of the firm registered to authority\" }\n */\n function getFirmFromAuthority(Data storage self, address authorityAddress) internal view returns (string issuerFirm) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority.firm', getForwardedAccount(self, authorityAddress)));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Return the boolean (true/false) registration status for an issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the issuer firm\n * @return { \"registered\" : \"Return if the issuer firm has been registered\" }\n */\n function isRegisteredFirm(Data storage self, string issuerFirm) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the issuer firm\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }\n */\n function isRegisteredToFirm(Data storage self, string issuerFirm, address authorityAddress) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority', issuerFirm, getForwardedAccount(self, authorityAddress)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return if an authority address is registered\n * @dev | This also checks the status of the registered issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"registered\" : \"Return if the authority is registered\" }\n */\n function isRegisteredAuthority(Data storage self, address authorityAddress) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority', getFirmFromAuthority(self, getForwardedAccount(self, authorityAddress)), getForwardedAccount(self, authorityAddress)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return boolean transaction status if the transaction has been used\n * @param self Internal storage proxying TokenIOStorage contract\n * @param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n * @return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}\n */\n function getTxStatus(Data storage self, bytes32 txHash) internal view returns (bool txStatus) {\n bytes32 id = keccak256(abi.encodePacked('tx.status', txHash));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Set transaction status if the transaction has been used\n * @param self Internal storage proxying TokenIOStorage contract\n * @param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setTxStatus(Data storage self, bytes32 txHash) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('tx.status', txHash));\n /// @dev Ensure transaction has not yet been used;\n require(!getTxStatus(self, txHash),\n \"Error: Transaction status must be false before setting the transaction status.\");\n\n /// @dev Update the status of the transaction;\n require(self.Storage.setBool(id, true),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Accepts a signed fx request to swap currency pairs at a given amount;\n * @dev | This method can be called directly between peers\n * @dev | This method does not take transaction fees from the swap\n * @param self Internal storage proxying TokenIOStorage contract\n * @param requester address Requester is the orginator of the offer and must\n * match the signature of the payload submitted by the fulfiller\n * @param symbolA Symbol of the currency desired\n * @param symbolB Symbol of the currency offered\n * @param valueA Amount of the currency desired\n * @param valueB Amount of the currency offered\n * @param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n * @param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n * @param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n * @param expiration Expiration of the offer; Offer is good until expired\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function execSwap(\n Data storage self,\n address requester,\n string symbolA,\n string symbolB,\n uint valueA,\n uint valueB,\n uint8 sigV,\n bytes32 sigR,\n bytes32 sigS,\n uint expiration\n ) internal returns (bool success) {\n\n bytes32 fxTxHash = keccak256(abi.encodePacked(requester, symbolA, symbolB, valueA, valueB, expiration));\n\n /// @notice check that sender and requester accounts are verified\n /// @notice Only verified accounts can perform currency swaps\n require(\n verifyAccounts(self, msg.sender, requester),\n \"Error: Only verified accounts can perform currency swaps.\");\n\n /// @dev Immediately set this transaction to be confirmed before updating any params;\n require(\n setTxStatus(self, fxTxHash),\n \"Error: Failed to set transaction status to fulfilled.\");\n\n /// @dev Ensure contract has not yet expired;\n require(expiration >= now, \"Error: Transaction has expired!\");\n\n /// @dev Recover the address of the signature from the hashed digest;\n /// @dev Ensure it equals the requester's address\n require(\n ecrecover(fxTxHash, sigV, sigR, sigS) == requester,\n \"Error: Address derived from transaction signature does not match the requester address\");\n\n /// @dev Transfer funds from each account to another.\n require(\n forceTransfer(self, symbolA, msg.sender, requester, valueA, \"0x0\"),\n \"Error: Unable to transfer funds to account.\");\n\n require(\n forceTransfer(self, symbolB, requester, msg.sender, valueB, \"0x0\"),\n \"Error: Unable to transfer funds to account.\");\n\n emit FxSwap(symbolA, symbolB, valueA, valueB, expiration, fxTxHash);\n\n return true;\n }\n\n /**\n * @notice Deprecate a contract interface\n * @dev | This is a low-level method to deprecate a contract interface.\n * @dev | This is useful if the interface needs to be updated or becomes out of date\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Ethereum address of the contract interface\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function setDeprecatedContract(Data storage self, address contractAddress) internal returns (bool success) {\n require(contractAddress != 0x0,\n \"Error: cannot deprecate a null address.\");\n\n bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress));\n\n require(self.Storage.setBool(id, true),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Return the deprecation status of a contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Ethereum address of the contract interface\n * @return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}\n */\n function isContractDeprecated(Data storage self, address contractAddress) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Set the Account Spending Period Limit as UNIX timestamp\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param period Unix timestamp of the spending period\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingPeriod(Data storage self, address account, uint period) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('limit.spending.period', account));\n require(self.Storage.setUint(id, period),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Get the Account Spending Period Limit as UNIX timestamp\n * @dev | Each account has it's own daily spending limit\n * @dev | If the current spending period has expired, it will be set upon next `transfer()`\n * or `transferFrom()` request\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"period\" : \"Returns Unix timestamp of the current spending period\"}\n */\n function getAccountSpendingPeriod(Data storage self, address account) internal view returns (uint period) {\n bytes32 id = keccak256(abi.encodePacked('limit.spending.period', account));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the account spending limit amount\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param limit Spending limit amount\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingLimit(Data storage self, address account, uint limit) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.limit', account));\n require(self.Storage.setUint(id, limit),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Get the account spending limit amount\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"limit\" : \"Returns the account spending limit amount\"}\n */\n function getAccountSpendingLimit(Data storage self, address account) internal view returns (uint limit) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.limit', account));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the account spending amount for the daily period\n * @dev | Each account has it's own daily spending limit\n * @dev | This transaction will throw if the new spending amount is greater than the limit\n * @dev | This method is called in the `transfer()` and `transferFrom()` methods\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param amount Set the amount spent for the daily period\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingAmount(Data storage self, address account, uint amount) internal returns (bool success) {\n\n /// @dev NOTE: Always ensure the period is current when checking the daily spend limit\n require(updateAccountSpendingPeriod(self, account),\n \"Error: Unable to update account spending period.\");\n\n uint updatedAmount = getAccountSpendingAmount(self, account).add(amount);\n\n /// @dev Ensure the spend limit is greater than the amount spend for the period\n require(\n getAccountSpendingLimit(self, account) >= updatedAmount,\n \"Error: Account cannot exceed its daily spend limit.\");\n\n /// @dev Update the spending period amount if within limit\n bytes32 id = keccak256(abi.encodePacked('account.spending.amount', account, getAccountSpendingPeriod(self, account)));\n require(self.Storage.setUint(id, updatedAmount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Low-level API to ensure the account spending period is always current\n * @dev | This method is internally called by `setAccountSpendingAmount()` to ensure\n * spending period is always the most current daily period.\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function updateAccountSpendingPeriod(Data storage self, address account) internal returns (bool success) {\n uint begDate = getAccountSpendingPeriod(self, account);\n if (begDate > now) {\n return true;\n } else {\n uint duration = 86400; // 86400 seconds in a day\n require(\n setAccountSpendingPeriod(self, account, begDate.add(((now.sub(begDate)).div(duration).add(1)).mul(duration))),\n \"Error: Unable to update account spending period.\");\n\n return true;\n }\n }\n\n /**\n * @notice Return the amount spent during the current period\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"amount\" : \"Returns the amount spent by the account during the current period\"}\n */\n function getAccountSpendingAmount(Data storage self, address account) internal view returns (uint amount) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.amount', account, getAccountSpendingPeriod(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Return the amount remaining during the current period\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}\n */\n function getAccountSpendingRemaining(Data storage self, address account) internal view returns (uint remainingLimit) {\n return getAccountSpendingLimit(self, account).sub(getAccountSpendingAmount(self, account));\n }\n\n /**\n * @notice Set the foreign currency exchange rate to USD in basis points\n * @dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param bpsRate Basis point rate of foreign currency exchange rate to USD\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function setFxUSDBPSRate(Data storage self, string currency, uint bpsRate) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency));\n require(\n self.Storage.setUint(id, bpsRate),\n \"Error: Unable to update account spending period.\");\n\n return true;\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount in basis points\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDBPSRate(Data storage self, string currency) internal view returns (uint bpsRate) {\n bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param fxAmount Amount of foreign currency to exchange into USD\n * @return {\"amount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDAmount(Data storage self, string currency, uint fxAmount) internal view returns (uint amount) {\n uint usdDecimals = getTokenDecimals(self, 'USDx');\n uint fxDecimals = getTokenDecimals(self, currency);\n /// @dev ensure decimal precision is normalized to USD decimals\n uint usdAmount = ((fxAmount.mul(getFxUSDBPSRate(self, currency)).div(10000)).mul(10**usdDecimals)).div(10**fxDecimals);\n return usdAmount;\n }\n\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "exportedSymbols": { + "TokenIOLib": [ + 4622 + ] + }, + "id": 4623, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1638, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "file": "./SafeMath.sol", + "id": 1639, + "nodeType": "ImportDirective", + "scope": 4623, + "sourceUnit": 286, + "src": "842:24:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1640, + "nodeType": "ImportDirective", + "scope": 4623, + "sourceUnit": 5242, + "src": "867:30:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 4622, + "linearizedBaseContracts": [ + 4622 + ], + "name": "TokenIOLib", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1643, + "libraryName": { + "contractScope": null, + "id": 1641, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 285, + "src": "1020:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$285", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1014:24:8", + "typeName": { + "id": 1642, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1033:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "canonicalName": "TokenIOLib.Data", + "id": 1646, + "members": [ + { + "constant": false, + "id": 1645, + "name": "Storage", + "nodeType": "VariableDeclaration", + "scope": 1646, + "src": "1134:22:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + }, + "typeName": { + "contractScope": null, + "id": 1644, + "name": "TokenIOStorage", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5241, + "src": "1134:14:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Data", + "nodeType": "StructDefinition", + "scope": 4622, + "src": "1116:45:8", + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "@notice Not using `Log` prefix for events to be consistent with ERC20 named events;", + "id": 1654, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1648, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1654, + "src": "1270:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1647, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1270:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1650, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1654, + "src": "1293:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1649, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1293:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1652, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1654, + "src": "1318:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1651, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1318:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1269:61:8" + }, + "src": "1255:76:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1664, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 1663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1656, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1348:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1655, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1348:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1658, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1365:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1657, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1365:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1660, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1390:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1659, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1390:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1662, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1403:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1661, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1403:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1347:74:8" + }, + "src": "1334:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1674, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 1673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1666, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "1440:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1665, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1440:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1668, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "1457:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1667, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1457:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1670, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "1482:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1669, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1482:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1672, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "1495:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1671, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1495:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1439:74:8" + }, + "src": "1425:89:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1686, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1676, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1532:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1675, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1532:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1678, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1549:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1549:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1680, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1571:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1679, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1571:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1682, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1591:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1681, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1591:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1684, + "indexed": false, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1604:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1683, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1604:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1531:84:8" + }, + "src": "1517:99:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1694, + "name": "KYCApproval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1688, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "1637:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1687, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1637:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1690, + "indexed": false, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "1662:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1689, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1662:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1692, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "1675:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1691, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1675:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1636:57:8" + }, + "src": "1619:75:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1702, + "name": "AccountStatus", + "nodeType": "EventDefinition", + "parameters": { + "id": 1701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1696, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "1717:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1717:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1698, + "indexed": false, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "1742:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1697, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1742:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1700, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "1755:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1699, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1755:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1716:57:8" + }, + "src": "1697:77:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1716, + "name": "FxSwap", + "nodeType": "EventDefinition", + "parameters": { + "id": 1715, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1704, + "indexed": false, + "name": "tokenASymbol", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1790:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1703, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1790:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1706, + "indexed": false, + "name": "tokenBSymbol", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1810:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1705, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1810:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1708, + "indexed": false, + "name": "tokenAValue", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1830:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1707, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1830:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1710, + "indexed": false, + "name": "tokenBValue", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1847:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1709, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1847:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1712, + "indexed": false, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1865:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1711, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1865:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1714, + "indexed": false, + "name": "transactionHash", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1882:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1713, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1882:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1789:117:8" + }, + "src": "1777:130:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1722, + "name": "AccountForward", + "nodeType": "EventDefinition", + "parameters": { + "id": 1721, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1718, + "indexed": true, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 1722, + "src": "1931:31:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1717, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1931:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1720, + "indexed": true, + "name": "forwardedAccount", + "nodeType": "VariableDeclaration", + "scope": 1722, + "src": "1964:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1719, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1964:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1930:67:8" + }, + "src": "1910:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1728, + "name": "NewAuthority", + "nodeType": "EventDefinition", + "parameters": { + "id": 1727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1724, + "indexed": true, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 1728, + "src": "2020:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1723, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2020:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1726, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1728, + "src": "2047:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1725, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2047:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2019:46:8" + }, + "src": "2001:65:8" + }, + { + "body": { + "id": 1761, + "nodeType": "Block", + "src": "2556:275:8", + "statements": [ + { + "assignments": [ + 1738 + ], + "declarations": [ + { + "constant": false, + "id": 1738, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1762, + "src": "2562:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1737, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2562:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1748, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d65", + "id": 1742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2602:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + "value": "token.name" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1744, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "2624:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2616:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1740, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "2585:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1739, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "2575:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2575:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2562:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1753, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "2675:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1754, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1732, + "src": "2679:9:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1750, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1730, + "src": "2652:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1751, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "2652:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "2652:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2652:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2697:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1749, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2637:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2637:172:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1758, + "nodeType": "ExpressionStatement", + "src": "2637:172:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2822:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1736, + "id": 1760, + "nodeType": "Return", + "src": "2815:11:8" + } + ] + }, + "documentation": "@notice Set the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenName Name of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1762, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1730, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1762, + "src": "2487:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1729, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "2487:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1732, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 1762, + "src": "2506:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1731, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2506:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2486:37:8" + }, + "payable": false, + "returnParameters": { + "id": 1736, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1735, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1762, + "src": "2542:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1734, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2542:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2541:14:8" + }, + "scope": 4622, + "src": "2465:366:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1795, + "nodeType": "Block", + "src": "3331:279:8", + "statements": [ + { + "assignments": [ + 1772 + ], + "declarations": [ + { + "constant": false, + "id": 1772, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1796, + "src": "3337:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1771, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3337:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1782, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e73796d626f6c", + "id": 1776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3377:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + "value": "token.symbol" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1778, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "3401:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3393:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3393:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1774, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "3360:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3360:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3360:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1773, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "3350:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3350:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3337:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1787, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1772, + "src": "3452:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1788, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1766, + "src": "3456:11:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1784, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1764, + "src": "3429:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1785, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "3429:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "3429:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3429:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3476:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1783, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "3414:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3414:174:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1792, + "nodeType": "ExpressionStatement", + "src": "3414:174:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3601:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1770, + "id": 1794, + "nodeType": "Return", + "src": "3594:11:8" + } + ] + }, + "documentation": "@notice Set the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenSymbol Symbol of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1796, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenSymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1764, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1796, + "src": "3260:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1763, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "3260:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1766, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 1796, + "src": "3279:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1765, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3279:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3259:39:8" + }, + "payable": false, + "returnParameters": { + "id": 1770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1769, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1796, + "src": "3317:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1768, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3317:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3316:14:8" + }, + "scope": 4622, + "src": "3236:374:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1829, + "nodeType": "Block", + "src": "4122:273:8", + "statements": [ + { + "assignments": [ + 1806 + ], + "declarations": [ + { + "constant": false, + "id": 1806, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1830, + "src": "4128:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1805, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4128:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1816, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e746c61", + "id": 1810, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4168:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + "value": "token.tla" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1812, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "4189:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4181:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4181:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1808, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "4151:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4151:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4151:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1807, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "4141:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4141:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4128:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1821, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1806, + "src": "4240:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1822, + "name": "tokenTLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1800, + "src": "4244:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1818, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1798, + "src": "4217:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1819, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "4217:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "4217:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4217:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4261:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1817, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4202:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4202:171:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1826, + "nodeType": "ExpressionStatement", + "src": "4202:171:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4386:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1804, + "id": 1828, + "nodeType": "Return", + "src": "4379:11:8" + } + ] + }, + "documentation": "@notice Set the token three letter abreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenTLA TLA of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1830, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenTLA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1798, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1830, + "src": "4054:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1797, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "4054:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1800, + "name": "tokenTLA", + "nodeType": "VariableDeclaration", + "scope": 1830, + "src": "4073:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1799, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4073:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4053:36:8" + }, + "payable": false, + "returnParameters": { + "id": 1804, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1803, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1830, + "src": "4108:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1802, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4108:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4107:14:8" + }, + "scope": 4622, + "src": "4033:362:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1863, + "nodeType": "Block", + "src": "4944:281:8", + "statements": [ + { + "assignments": [ + 1840 + ], + "declarations": [ + { + "constant": false, + "id": 1840, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1864, + "src": "4950:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1839, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4950:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1850, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e76657273696f6e", + "id": 1844, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4990:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + "value": "token.version" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1846, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "5015:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5007:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5007:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1842, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "4973:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4973:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4973:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1841, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "4963:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4950:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1855, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "5066:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1856, + "name": "tokenVersion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1834, + "src": "5070:12:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1852, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1832, + "src": "5043:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "5043:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "5043:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5043:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5091:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1851, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5028:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5028:175:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1860, + "nodeType": "ExpressionStatement", + "src": "5028:175:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5216:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1838, + "id": 1862, + "nodeType": "Return", + "src": "5209:11:8" + } + ] + }, + "documentation": "@notice Set the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1864, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenVersion", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1835, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1832, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1864, + "src": "4872:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1831, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "4872:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1834, + "name": "tokenVersion", + "nodeType": "VariableDeclaration", + "scope": 1864, + "src": "4891:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1833, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4891:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4871:40:8" + }, + "payable": false, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1837, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1864, + "src": "4930:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1836, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4930:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4929:14:8" + }, + "scope": 4622, + "src": "4847:378:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1897, + "nodeType": "Block", + "src": "6053:276:8", + "statements": [ + { + "assignments": [ + 1876 + ], + "declarations": [ + { + "constant": false, + "id": 1876, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "6059:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1875, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6059:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1884, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e646563696d616c73", + "id": 1880, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6099:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + "value": "token.decimals" + }, + { + "argumentTypes": null, + "id": 1881, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1868, + "src": "6117:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1878, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "6082:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6082:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6082:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1877, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "6072:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6072:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6059:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1889, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1876, + "src": "6169:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1890, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1870, + "src": "6173:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1886, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1866, + "src": "6148:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1887, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "6148:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "6148:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6148:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6195:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1885, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6133:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6133:174:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1894, + "nodeType": "ExpressionStatement", + "src": "6133:174:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6320:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1874, + "id": 1896, + "nodeType": "Return", + "src": "6313:11:8" + } + ] + }, + "documentation": "@notice Set the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@dev This method is not set to the address of the contract, rather is maped to currency\n@dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param tokenDecimals Decimal representation of the token contract unit amount\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1898, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenDecimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1866, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "5965:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1865, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "5965:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1868, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "5984:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1867, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5984:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1870, + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "6001:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1869, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6001:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5964:56:8" + }, + "payable": false, + "returnParameters": { + "id": 1874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1873, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "6039:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1872, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6039:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6038:14:8" + }, + "scope": 4622, + "src": "5939:390:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1931, + "nodeType": "Block", + "src": "6889:267:8", + "statements": [ + { + "assignments": [ + 1908 + ], + "declarations": [ + { + "constant": false, + "id": 1908, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1932, + "src": "6895:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1907, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6895:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1918, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 1912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6935:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1914, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "6954:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6946:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6946:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1910, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "6918:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6918:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6918:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1909, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "6908:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6908:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6895:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1923, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1908, + "src": "7003:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1924, + "name": "feeBPS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1902, + "src": "7007:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1920, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1900, + "src": "6982:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1921, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "6982:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "6982:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6982:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7022:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1919, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6967:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6967:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1928, + "nodeType": "ExpressionStatement", + "src": "6967:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7147:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1906, + "id": 1930, + "nodeType": "Return", + "src": "7140:11:8" + } + ] + }, + "documentation": "@notice Set basis point fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeBPS Basis points fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1932, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeBPS", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1903, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1900, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1932, + "src": "6825:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1899, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "6825:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1902, + "name": "feeBPS", + "nodeType": "VariableDeclaration", + "scope": 1932, + "src": "6844:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1901, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6844:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6824:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1905, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1932, + "src": "6875:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1904, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6875:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6874:14:8" + }, + "scope": 4622, + "src": "6806:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1965, + "nodeType": "Block", + "src": "7707:267:8", + "statements": [ + { + "assignments": [ + 1942 + ], + "declarations": [ + { + "constant": false, + "id": 1942, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1966, + "src": "7713:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1941, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7713:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1952, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 1946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7753:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1948, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "7772:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7764:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7764:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1944, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "7736:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7736:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7736:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1943, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "7726:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7726:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7713:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1957, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7821:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1958, + "name": "feeMin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1936, + "src": "7825:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1954, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1934, + "src": "7800:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1955, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "7800:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "7800:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7800:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7840:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1953, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "7785:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7785:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1962, + "nodeType": "ExpressionStatement", + "src": "7785:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7965:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1940, + "id": 1964, + "nodeType": "Return", + "src": "7958:11:8" + } + ] + }, + "documentation": "@notice Set minimum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMin Minimum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1966, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1966, + "src": "7643:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1933, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "7643:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1936, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 1966, + "src": "7662:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1935, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7662:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7642:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1940, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1939, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1966, + "src": "7693:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1938, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7693:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7692:14:8" + }, + "scope": 4622, + "src": "7624:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1999, + "nodeType": "Block", + "src": "8525:267:8", + "statements": [ + { + "assignments": [ + 1976 + ], + "declarations": [ + { + "constant": false, + "id": 1976, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2000, + "src": "8531:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1975, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8531:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1986, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 1980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8571:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1982, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "8590:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8582:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8582:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1978, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "8554:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8554:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8554:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1977, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "8544:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8544:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8531:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1991, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "8639:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1992, + "name": "feeMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1970, + "src": "8643:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1988, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1968, + "src": "8618:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1989, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "8618:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "8618:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8618:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1994, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8658:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1987, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8603:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8603:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1996, + "nodeType": "ExpressionStatement", + "src": "8603:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8783:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1974, + "id": 1998, + "nodeType": "Return", + "src": "8776:11:8" + } + ] + }, + "documentation": "@notice Set maximum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMax Maximum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2000, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMax", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1968, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2000, + "src": "8461:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1967, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "8461:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1970, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 2000, + "src": "8480:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1969, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8480:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8460:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1974, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1973, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2000, + "src": "8511:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1972, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8511:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8510:14:8" + }, + "scope": 4622, + "src": "8442:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2033, + "nodeType": "Block", + "src": "9340:269:8", + "statements": [ + { + "assignments": [ + 2010 + ], + "declarations": [ + { + "constant": false, + "id": 2010, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2034, + "src": "9346:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2009, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9346:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2020, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9386:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2016, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "9406:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 2015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9398:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9398:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2012, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "9369:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9369:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9369:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2011, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "9359:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9359:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9346:67:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2025, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "9455:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2026, + "name": "feeFlat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2004, + "src": "9459:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2022, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2002, + "src": "9434:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2023, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "9434:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "9434:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 2027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9434:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9475:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2021, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "9419:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9419:168:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2030, + "nodeType": "ExpressionStatement", + "src": "9419:168:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9600:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2008, + "id": 2032, + "nodeType": "Return", + "src": "9593:11:8" + } + ] + }, + "documentation": "@notice Set flat fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeFlat Flat fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2034, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeFlat", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2002, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2034, + "src": "9275:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2001, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "9275:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2004, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 2034, + "src": "9294:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2003, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9294:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9274:33:8" + }, + "payable": false, + "returnParameters": { + "id": 2008, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2007, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2034, + "src": "9326:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2006, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9326:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9325:14:8" + }, + "scope": 4622, + "src": "9255:354:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2067, + "nodeType": "Block", + "src": "10190:268:8", + "statements": [ + { + "assignments": [ + 2044 + ], + "declarations": [ + { + "constant": false, + "id": 2044, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "10196:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2043, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10196:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2054, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d7367", + "id": 2048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10236:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + "value": "fee.msg" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2050, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "10255:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 2049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10247:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10247:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2046, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "10219:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10219:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10219:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2045, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "10209:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10209:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10196:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2059, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2044, + "src": "10305:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2060, + "name": "feeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2038, + "src": "10309:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2056, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2036, + "src": "10283:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2057, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "10283:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 5026, + "src": "10283:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,bytes memory) external returns (bool)" + } + }, + "id": 2061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10324:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2055, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "10268:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10268:168:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2064, + "nodeType": "ExpressionStatement", + "src": "10268:168:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10449:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2042, + "id": 2066, + "nodeType": "Return", + "src": "10442:11:8" + } + ] + }, + "documentation": "@notice Set fee message for contract interface\n@dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n@dev Fee messages vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMsg Fee message included in a transaction with fees\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2068, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMsg", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "10125:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2035, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "10125:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2038, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "10144:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2037, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10144:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10124:33:8" + }, + "payable": false, + "returnParameters": { + "id": 2042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2041, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "10176:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2040, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10176:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10175:14:8" + }, + "scope": 4622, + "src": "10106:352:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2101, + "nodeType": "Block", + "src": "11123:279:8", + "statements": [ + { + "assignments": [ + 2078 + ], + "declarations": [ + { + "constant": false, + "id": 2078, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2102, + "src": "11129:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2077, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11129:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2088, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6163636f756e74", + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11169:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + "value": "fee.account" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2084, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "11192:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11184:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11184:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2080, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "11152:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11152:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11152:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2079, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "11142:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11142:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11129:70:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2093, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2078, + "src": "11244:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2094, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2072, + "src": "11248:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2090, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2070, + "src": "11220:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2091, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "11220:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4966, + "src": "11220:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11220:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11268:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2089, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "11205:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11205:175:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2098, + "nodeType": "ExpressionStatement", + "src": "11205:175:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11393:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2076, + "id": 2100, + "nodeType": "Return", + "src": "11386:11:8" + } + ] + }, + "documentation": "@notice Set fee contract for a contract interface\n@dev feeContract must be a TokenIOFeeContract storage approved contract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@dev | This must be called directly from the interface contract\n@param self Internal storage proxying TokenIOStorage contract\n@param feeContract Set the fee contract for `this` contract address interface\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2102, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2073, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2070, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2102, + "src": "11051:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2069, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "11051:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2072, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 2102, + "src": "11070:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11070:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11050:40:8" + }, + "payable": false, + "returnParameters": { + "id": 2076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2075, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2102, + "src": "11109:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2074, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11109:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11108:14:8" + }, + "scope": 4622, + "src": "11027:375:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2135, + "nodeType": "Block", + "src": "12037:280:8", + "statements": [ + { + "assignments": [ + 2112 + ], + "declarations": [ + { + "constant": false, + "id": 2112, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2136, + "src": "12043:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2111, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12043:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2120, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d657370616365", + "id": 2116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12083:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + "value": "token.namespace" + }, + { + "argumentTypes": null, + "id": 2117, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2106, + "src": "12102:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2114, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "12066:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12066:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12066:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2113, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "12056:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12056:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12043:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2125, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "12157:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2127, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "12169:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12161:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12161:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2122, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2104, + "src": "12133:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "12133:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4966, + "src": "12133:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12133:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12183:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2121, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "12118:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12118:177:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2132, + "nodeType": "ExpressionStatement", + "src": "12118:177:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12308:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2110, + "id": 2134, + "nodeType": "Return", + "src": "12301:11:8" + } + ] + }, + "documentation": "@notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n@dev | This should only be called once from a token interface contract;\n@dev | This method has an `internal` view\n@dev | This method is experimental and may be deprecated/refactored\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2136, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2104, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2136, + "src": "11969:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2103, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "11969:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2106, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2136, + "src": "11988:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11988:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11968:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2109, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2136, + "src": "12023:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2108, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12023:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12022:14:8" + }, + "scope": 4622, + "src": "11942:375:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2180, + "nodeType": "Block", + "src": "13115:435:8", + "statements": [ + { + "assignments": [ + 2150 + ], + "declarations": [ + { + "constant": false, + "id": 2150, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13123:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2149, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13123:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2161, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e6b7963", + "id": 2154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13163:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + "value": "account.kyc" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2156, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "13198:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2157, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "13204:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2155, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "13178:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13178:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2152, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "13146:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13146:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13146:67:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2151, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "13136:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13136:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13123:91:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2166, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2150, + "src": "13260:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2167, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2142, + "src": "13264:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2163, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "13239:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "13239:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "13239:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 2168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13239:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13285:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2162, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "13222:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13222:177:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "13222:177:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2173, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "13494:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2174, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2142, + "src": "13503:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2175, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2144, + "src": "13515:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2172, + "name": "KYCApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1694, + "src": "13482:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,bool,string memory)" + } + }, + "id": 2176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13482:44:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2177, + "nodeType": "EmitStatement", + "src": "13477:49:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13541:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2148, + "id": 2179, + "nodeType": "Return", + "src": "13534:11:8" + } + ] + }, + "documentation": "@notice Set the KYC approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isApproved Boolean (true/false) KYC approval status for a given account\n@param issuerFirm Firm name for issuing KYC approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2181, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setKYCApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2145, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2138, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13011:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2137, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "13011:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13030:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2139, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13030:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2142, + "name": "isApproved", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13047:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2141, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13047:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2144, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13064:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2143, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "13064:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13010:72:8" + }, + "payable": false, + "returnParameters": { + "id": 2148, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2147, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13101:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2146, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13101:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13100:14:8" + }, + "scope": 4622, + "src": "12987:563:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2225, + "nodeType": "Block", + "src": "14345:419:8", + "statements": [ + { + "assignments": [ + 2195 + ], + "declarations": [ + { + "constant": false, + "id": 2195, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14351:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2194, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "14351:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2206, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e616c6c6f776564", + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14391:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + "value": "account.allowed" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2201, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2183, + "src": "14430:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2202, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2185, + "src": "14436:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2200, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "14410:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14410:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2197, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "14374:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14374:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14374:71:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2196, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "14364:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14351:95:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2211, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2195, + "src": "14488:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2212, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "14492:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2208, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2183, + "src": "14467:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2209, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "14467:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "14467:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 2213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14467:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14510:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2207, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "14452:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14452:170:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2216, + "nodeType": "ExpressionStatement", + "src": "14452:170:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2218, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2185, + "src": "14711:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2219, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "14720:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2220, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2189, + "src": "14731:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2217, + "name": "AccountStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1702, + "src": "14697:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,bool,string memory)" + } + }, + "id": 2221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14697:45:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2222, + "nodeType": "EmitStatement", + "src": "14692:50:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14755:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2193, + "id": 2224, + "nodeType": "Return", + "src": "14748:11:8" + } + ] + }, + "documentation": "@notice Set the global approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isAllowed Boolean (true/false) global status for a given account\n@param issuerFirm Firm name for issuing approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2226, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2190, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2183, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14242:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2182, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "14242:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2185, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14261:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2184, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14261:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2187, + "name": "isAllowed", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14278:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2186, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14278:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2189, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14294:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2188, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14294:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14241:71:8" + }, + "payable": false, + "returnParameters": { + "id": 2193, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2192, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14331:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2191, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14331:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14330:14:8" + }, + "scope": 4622, + "src": "14216:548:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2259, + "nodeType": "Block", + "src": "15649:289:8", + "statements": [ + { + "assignments": [ + 2238 + ], + "declarations": [ + { + "constant": false, + "id": 2238, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15655:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2237, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15655:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2246, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6d61737465722e6163636f756e74", + "id": 2242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15695:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + "value": "master.account" + }, + { + "argumentTypes": null, + "id": 2243, + "name": "forwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2232, + "src": "15713:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2240, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "15678:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15678:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15678:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2239, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "15668:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15668:63:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15655:76:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2251, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2238, + "src": "15776:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2252, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "15780:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2248, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2228, + "src": "15752:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "15752:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4966, + "src": "15752:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15752:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15804:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "15737:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15737:179:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2256, + "nodeType": "ExpressionStatement", + "src": "15737:179:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15929:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2236, + "id": 2258, + "nodeType": "Return", + "src": "15922:11:8" + } + ] + }, + "documentation": "@notice Set a forwarded address for an account.\n@dev | This method has an `internal` view\n@dev | Forwarded accounts must be set by an authority in case of account recovery;\n@dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n@dev | All transactions will be logged under the same KYC information as the original account holder;\n@param self Internal storage proxying TokenIOStorage contract\n@param originalAccount Original registered Ethereum address of the account holder\n@param forwardedAccount Forwarded Ethereum address of the account holder\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2260, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2233, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2228, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15547:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2227, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "15547:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2230, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15566:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15566:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2232, + "name": "forwardedAccount", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15591:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15591:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15546:70:8" + }, + "payable": false, + "returnParameters": { + "id": 2236, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2235, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15635:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2234, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15635:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15634:14:8" + }, + "scope": 4622, + "src": "15518:420:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2297, + "nodeType": "Block", + "src": "16517:242:8", + "statements": [ + { + "assignments": [ + 2270 + ], + "declarations": [ + { + "constant": false, + "id": 2270, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16523:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2269, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "16523:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2278, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6d61737465722e6163636f756e74", + "id": 2274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16563:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + "value": "master.account" + }, + { + "argumentTypes": null, + "id": 2275, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "16581:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2272, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "16546:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16546:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16546:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2271, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "16536:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16536:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16523:67:8" + }, + { + "assignments": [ + 2280 + ], + "declarations": [ + { + "constant": false, + "id": 2280, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16596:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16596:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2286, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2284, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "16646:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2281, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "16622:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2282, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "16622:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5180, + "src": "16622:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16622:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16596:53:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2287, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2280, + "src": "16659:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 2288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16678:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "16659:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2295, + "nodeType": "Block", + "src": "16726:29:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2293, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "16741:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2268, + "id": 2294, + "nodeType": "Return", + "src": "16734:14:8" + } + ] + }, + "id": 2296, + "nodeType": "IfStatement", + "src": "16655:100:8", + "trueBody": { + "id": 2292, + "nodeType": "Block", + "src": "16683:37:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2290, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2280, + "src": "16698:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2268, + "id": 2291, + "nodeType": "Return", + "src": "16691:22:8" + } + ] + } + } + ] + }, + "documentation": "@notice Get the original address for a forwarded account\n@dev | This method has an `internal` view\n@dev | Will return the registered account for the given forwarded account\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}", + "id": 2298, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2262, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16431:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2261, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "16431:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16450:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16450:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16430:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2267, + "name": "registeredAccount", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16490:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16490:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16489:27:8" + }, + "scope": 4622, + "src": "16402:357:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2326, + "nodeType": "Block", + "src": "17258:143:8", + "statements": [ + { + "assignments": [ + 2308 + ], + "declarations": [ + { + "constant": false, + "id": 2308, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2327, + "src": "17266:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2307, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2319, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e6b7963", + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17306:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + "value": "account.kyc" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2314, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2300, + "src": "17341:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2315, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2302, + "src": "17347:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2313, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "17321:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17321:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2310, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "17289:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17289:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17289:67:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2309, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "17279:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17279:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17266:91:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2323, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2308, + "src": "17393:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2320, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2300, + "src": "17372:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2321, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "17372:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "17372:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 2324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17372:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2306, + "id": 2325, + "nodeType": "Return", + "src": "17365:31:8" + } + ] + }, + "documentation": "@notice Get KYC approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the KYC approval status for an account holder\" }", + "id": 2327, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getKYCApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2300, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2327, + "src": "17186:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2299, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "17186:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2302, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2327, + "src": "17205:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2301, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17205:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17185:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2306, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2305, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 2327, + "src": "17245:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2304, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17245:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17244:13:8" + }, + "scope": 4622, + "src": "17162:239:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2355, + "nodeType": "Block", + "src": "17908:143:8", + "statements": [ + { + "assignments": [ + 2337 + ], + "declarations": [ + { + "constant": false, + "id": 2337, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2356, + "src": "17914:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2336, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17914:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2348, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e616c6c6f776564", + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17954:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + "value": "account.allowed" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2343, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2329, + "src": "17993:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2344, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2331, + "src": "17999:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2342, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "17973:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17973:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2339, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "17937:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17937:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17937:71:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2338, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "17927:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17927:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17914:95:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2352, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2337, + "src": "18043:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2349, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2329, + "src": "18022:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "18022:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "18022:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18022:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2335, + "id": 2354, + "nodeType": "Return", + "src": "18015:31:8" + } + ] + }, + "documentation": "@notice Get global approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the global approval status for an account holder\" }", + "id": 2356, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2332, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2329, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2356, + "src": "17836:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2328, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "17836:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2331, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2356, + "src": "17855:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2330, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17855:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17835:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2334, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 2356, + "src": "17895:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2333, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17895:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17894:13:8" + }, + "scope": 4622, + "src": "17810:241:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2381, + "nodeType": "Block", + "src": "18535:120:8", + "statements": [ + { + "assignments": [ + 2366 + ], + "declarations": [ + { + "constant": false, + "id": 2366, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2382, + "src": "18541:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2365, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "18541:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2374, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d657370616365", + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18581:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + "value": "token.namespace" + }, + { + "argumentTypes": null, + "id": 2371, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2360, + "src": "18600:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2368, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "18564:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18564:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18564:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2367, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "18554:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18554:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18541:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2378, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2366, + "src": "18647:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2375, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2358, + "src": "18623:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2376, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "18623:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5180, + "src": "18623:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18623:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2364, + "id": 2380, + "nodeType": "Return", + "src": "18616:34:8" + } + ] + }, + "documentation": "@notice Get the contract interface address associated with token symbol\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }", + "id": 2382, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2358, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2382, + "src": "18451:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2357, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "18451:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2360, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2382, + "src": "18470:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2359, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "18470:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18450:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2363, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2382, + "src": "18510:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18510:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18509:25:8" + }, + "scope": 4622, + "src": "18424:231:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2407, + "nodeType": "Block", + "src": "19153:121:8", + "statements": [ + { + "assignments": [ + 2392 + ], + "declarations": [ + { + "constant": false, + "id": 2392, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2408, + "src": "19159:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2391, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19159:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2400, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d65", + "id": 2396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19199:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + "value": "token.name" + }, + { + "argumentTypes": null, + "id": 2397, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2386, + "src": "19213:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2394, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "19182:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19182:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19182:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2393, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "19172:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19172:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19159:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2404, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2392, + "src": "19266:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2401, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2384, + "src": "19243:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2402, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "19243:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "19243:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19243:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2390, + "id": 2406, + "nodeType": "Return", + "src": "19236:33:8" + } + ] + }, + "documentation": "@notice Get the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenName\" : \"Name of the token contract\"}", + "id": 2408, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2384, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2408, + "src": "19068:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2383, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "19068:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2386, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2408, + "src": "19087:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19087:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19067:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2390, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2389, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 2408, + "src": "19135:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2388, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "19135:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19134:18:8" + }, + "scope": 4622, + "src": "19046:228:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "19782:123:8", + "statements": [ + { + "assignments": [ + 2418 + ], + "declarations": [ + { + "constant": false, + "id": 2418, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "19788:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2417, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19788:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2426, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e73796d626f6c", + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19828:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + "value": "token.symbol" + }, + { + "argumentTypes": null, + "id": 2423, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2412, + "src": "19844:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2420, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "19811:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19811:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19811:49:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2419, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "19801:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19801:60:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19788:73:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2430, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2418, + "src": "19897:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2427, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2410, + "src": "19874:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2428, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "19874:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "19874:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19874:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2416, + "id": 2432, + "nodeType": "Return", + "src": "19867:33:8" + } + ] + }, + "documentation": "@notice Get the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenSymbol\" : \"Symbol of the token contract\"}", + "id": 2434, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2410, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "19695:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2409, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "19695:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2412, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "19714:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2411, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19714:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19694:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2416, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2415, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "19762:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2414, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "19762:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19761:20:8" + }, + "scope": 4622, + "src": "19671:234:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2459, + "nodeType": "Block", + "src": "20426:120:8", + "statements": [ + { + "assignments": [ + 2444 + ], + "declarations": [ + { + "constant": false, + "id": 2444, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2460, + "src": "20432:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2443, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "20432:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2452, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e746c61", + "id": 2448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20472:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + "value": "token.tla" + }, + { + "argumentTypes": null, + "id": 2449, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2438, + "src": "20485:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2446, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "20455:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20455:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20455:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2445, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "20445:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20445:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20432:70:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2456, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2444, + "src": "20538:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2453, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2436, + "src": "20515:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2454, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "20515:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "20515:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20515:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2442, + "id": 2458, + "nodeType": "Return", + "src": "20508:33:8" + } + ] + }, + "documentation": "@notice Get the token Three letter abbreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenTLA\" : \"TLA of the token contract\"}", + "id": 2460, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenTLA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2436, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2460, + "src": "20342:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2435, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "20342:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2438, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2460, + "src": "20361:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20361:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20341:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2441, + "name": "tokenTLA", + "nodeType": "VariableDeclaration", + "scope": 2460, + "src": "20409:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2440, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20409:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20408:17:8" + }, + "scope": 4622, + "src": "20321:225:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2485, + "nodeType": "Block", + "src": "21055:124:8", + "statements": [ + { + "assignments": [ + 2470 + ], + "declarations": [ + { + "constant": false, + "id": 2470, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2486, + "src": "21061:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2469, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21061:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2478, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e76657273696f6e", + "id": 2474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21101:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + "value": "token.version" + }, + { + "argumentTypes": null, + "id": 2475, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2464, + "src": "21118:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2472, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "21084:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21084:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21084:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2471, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "21074:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21074:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21061:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2482, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2470, + "src": "21171:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2479, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "21148:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "21148:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "21148:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21148:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2468, + "id": 2484, + "nodeType": "Return", + "src": "21141:33:8" + } + ] + }, + "documentation": "@notice Get the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenVersion\" : \"Semantic version of the token contract\"}", + "id": 2486, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenVersion", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2462, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2486, + "src": "20980:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2461, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "20980:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2464, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2486, + "src": "20999:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20999:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20979:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2467, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2486, + "src": "21047:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2466, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "21047:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21046:8:8" + }, + "scope": 4622, + "src": "20955:224:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2511, + "nodeType": "Block", + "src": "21690:116:8", + "statements": [ + { + "assignments": [ + 2496 + ], + "declarations": [ + { + "constant": false, + "id": 2496, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "21696:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2495, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21696:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2504, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e646563696d616c73", + "id": 2500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21736:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + "value": "token.decimals" + }, + { + "argumentTypes": null, + "id": 2501, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2490, + "src": "21754:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2498, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "21719:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21719:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21719:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2497, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "21709:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21709:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21696:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2508, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2496, + "src": "21798:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2505, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2488, + "src": "21777:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2506, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "21777:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "21777:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21777:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2494, + "id": 2510, + "nodeType": "Return", + "src": "21770:31:8" + } + ] + }, + "documentation": "@notice Get the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"tokenDecimals\" : \"Decimals of the token contract\"}", + "id": 2512, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenDecimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2491, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2488, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "21611:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2487, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "21611:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2490, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "21630:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2489, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "21630:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21610:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2493, + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "21670:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2492, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "21670:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21669:20:8" + }, + "scope": 4622, + "src": "21585:221:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2537, + "nodeType": "Block", + "src": "22295:116:8", + "statements": [ + { + "assignments": [ + 2522 + ], + "declarations": [ + { + "constant": false, + "id": 2522, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "22301:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2521, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "22301:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2530, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 2526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22341:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "id": 2527, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2516, + "src": "22352:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2524, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "22324:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22324:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22324:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2523, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "22314:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22314:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22301:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2534, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2522, + "src": "22403:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2531, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2514, + "src": "22382:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2532, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "22382:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "22382:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22382:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2520, + "id": 2536, + "nodeType": "Return", + "src": "22375:31:8" + } + ] + }, + "documentation": "@notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}", + "id": 2538, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeBPS", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2514, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "22215:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2513, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "22215:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2516, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "22234:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22234:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22214:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2519, + "name": "feeBps", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "22282:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2518, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22282:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22281:13:8" + }, + "scope": 4622, + "src": "22196:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2563, + "nodeType": "Block", + "src": "22890:116:8", + "statements": [ + { + "assignments": [ + 2548 + ], + "declarations": [ + { + "constant": false, + "id": 2548, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "22896:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2547, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "22896:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2556, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 2552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22936:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "id": 2553, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "22947:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2550, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "22919:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22919:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22919:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2549, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "22909:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22909:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22896:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2560, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2548, + "src": "22998:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2557, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2540, + "src": "22977:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2558, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "22977:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "22977:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22977:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2546, + "id": 2562, + "nodeType": "Return", + "src": "22970:31:8" + } + ] + }, + "documentation": "@notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}", + "id": 2564, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2543, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2540, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "22810:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2539, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "22810:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2542, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "22829:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2541, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22829:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22809:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2545, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "22877:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2544, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22877:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22876:13:8" + }, + "scope": 4622, + "src": "22791:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2589, + "nodeType": "Block", + "src": "23485:116:8", + "statements": [ + { + "assignments": [ + 2574 + ], + "declarations": [ + { + "constant": false, + "id": 2574, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "23491:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2573, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "23491:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2582, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 2578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23531:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "id": 2579, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2568, + "src": "23542:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2576, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "23514:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23514:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23514:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2575, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "23504:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23504:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23491:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2586, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2574, + "src": "23593:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2583, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2566, + "src": "23572:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2584, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "23572:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "23572:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23572:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2572, + "id": 2588, + "nodeType": "Return", + "src": "23565:31:8" + } + ] + }, + "documentation": "@notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}", + "id": 2590, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMax", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2566, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "23405:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2565, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "23405:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2568, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "23424:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2567, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23424:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23404:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2572, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2571, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "23472:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2570, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "23472:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23471:13:8" + }, + "scope": 4622, + "src": "23386:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2615, + "nodeType": "Block", + "src": "24077:117:8", + "statements": [ + { + "assignments": [ + 2600 + ], + "declarations": [ + { + "constant": false, + "id": 2600, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2616, + "src": "24083:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2599, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "24083:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2608, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24123:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "id": 2605, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "24135:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2602, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "24106:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24106:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24106:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2601, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24096:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24096:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24083:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2612, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2600, + "src": "24186:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2609, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "24165:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "24165:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "24165:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24165:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2598, + "id": 2614, + "nodeType": "Return", + "src": "24158:31:8" + } + ] + }, + "documentation": "@notice Get the flat fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}", + "id": 2616, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeFlat", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2595, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2616, + "src": "23996:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2591, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "23996:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2594, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2616, + "src": "24015:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2593, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24015:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23995:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2597, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 2616, + "src": "24063:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2596, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "24063:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24062:14:8" + }, + "scope": 4622, + "src": "23976:218:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2641, + "nodeType": "Block", + "src": "24682:117:8", + "statements": [ + { + "assignments": [ + 2626 + ], + "declarations": [ + { + "constant": false, + "id": 2626, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "24688:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2625, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "24688:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2634, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d7367", + "id": 2630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24728:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + "value": "fee.msg" + }, + { + "argumentTypes": null, + "id": 2631, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2620, + "src": "24739:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2628, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "24711:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24711:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24711:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2627, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24701:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24701:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24688:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2638, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2626, + "src": "24791:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2635, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "24769:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2636, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "24769:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 5216, + "src": "24769:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes32) view external returns (bytes memory)" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24769:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 2624, + "id": 2640, + "nodeType": "Return", + "src": "24762:32:8" + } + ] + }, + "documentation": "@notice Get the flat message of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}", + "id": 2642, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMsg", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2618, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "24601:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2617, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "24601:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2620, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "24620:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2619, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24620:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24600:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2624, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2623, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "24668:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2622, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "24668:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24667:14:8" + }, + "scope": 4622, + "src": "24582:217:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2672, + "nodeType": "Block", + "src": "25356:276:8", + "statements": [ + { + "assignments": [ + 2652 + ], + "declarations": [ + { + "constant": false, + "id": 2652, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2673, + "src": "25362:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2651, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "25362:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2659, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e636f6e74726163742e6d6173746572", + "id": 2656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25402:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + }, + "value": "fee.contract.master" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 2654, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "25385:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25385:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25385:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2653, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "25375:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25375:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25362:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2664, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2652, + "src": "25470:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2665, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2646, + "src": "25474:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2661, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2644, + "src": "25446:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2662, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "25446:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4966, + "src": "25446:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25446:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25498:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2660, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "25431:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25431:179:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2669, + "nodeType": "ExpressionStatement", + "src": "25431:179:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25623:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2650, + "id": 2671, + "nodeType": "Return", + "src": "25616:11:8" + } + ] + }, + "documentation": "@notice Set the master fee contract used as the default fee contract when none is provided\n@dev | This method has an `internal` view\n@dev | This value is set in the TokenIOAuthority contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2673, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2644, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2673, + "src": "25280:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2643, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "25280:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2646, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2673, + "src": "25299:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25299:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25279:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2650, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2649, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2673, + "src": "25342:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2648, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "25342:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25341:14:8" + }, + "scope": 4622, + "src": "25250:382:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2695, + "nodeType": "Block", + "src": "26025:114:8", + "statements": [ + { + "assignments": [ + 2681 + ], + "declarations": [ + { + "constant": false, + "id": 2681, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2696, + "src": "26031:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2680, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "26031:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2688, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e636f6e74726163742e6d6173746572", + "id": 2685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26071:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + }, + "value": "fee.contract.master" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 2683, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "26054:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26054:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2686, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26054:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2682, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "26044:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26044:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26031:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2692, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "26131:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2689, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2675, + "src": "26107:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2690, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "26107:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5180, + "src": "26107:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26107:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2679, + "id": 2694, + "nodeType": "Return", + "src": "26100:34:8" + } + ] + }, + "documentation": "@notice Get the master fee contract set via the TokenIOAuthority contract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}", + "id": 2696, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2676, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2675, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2696, + "src": "25956:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2674, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "25956:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25955:19:8" + }, + "payable": false, + "returnParameters": { + "id": 2679, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2678, + "name": "masterFeeContract", + "nodeType": "VariableDeclaration", + "scope": 2696, + "src": "25998:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25998:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25997:27:8" + }, + "scope": 4622, + "src": "25926:213:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2735, + "nodeType": "Block", + "src": "26838:252:8", + "statements": [ + { + "assignments": [ + 2706 + ], + "declarations": [ + { + "constant": false, + "id": 2706, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26844:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2705, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "26844:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2714, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6163636f756e74", + "id": 2710, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26884:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + "value": "fee.account" + }, + { + "argumentTypes": null, + "id": 2711, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2700, + "src": "26899:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2708, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "26867:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26867:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26867:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2707, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "26857:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26857:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26844:72:8" + }, + { + "assignments": [ + 2716 + ], + "declarations": [ + { + "constant": false, + "id": 2716, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26923:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26923:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2722, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2720, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2706, + "src": "26968:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2717, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2698, + "src": "26944:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "26944:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5180, + "src": "26944:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26944:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26923:48:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2723, + "name": "feeAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2716, + "src": "26981:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 2724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26995:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "26981:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2733, + "nodeType": "Block", + "src": "27054:32:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2731, + "name": "feeAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2716, + "src": "27069:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2704, + "id": 2732, + "nodeType": "Return", + "src": "27062:17:8" + } + ] + }, + "id": 2734, + "nodeType": "IfStatement", + "src": "26977:109:8", + "trueBody": { + "id": 2730, + "nodeType": "Block", + "src": "27000:48:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2727, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2698, + "src": "27036:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + ], + "id": 2726, + "name": "getMasterFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2696, + "src": "27015:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer) view returns (address)" + } + }, + "id": 2728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27015:26:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2704, + "id": 2729, + "nodeType": "Return", + "src": "27008:33:8" + } + ] + } + } + ] + }, + "documentation": "@notice Get the fee contract set for a contract interface\n@dev | This method has an `internal` view\n@dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n@dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}", + "id": 2736, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2698, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26750:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2697, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "26750:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2700, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26769:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26769:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26749:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2703, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26817:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2702, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26817:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26816:21:8" + }, + "scope": 4622, + "src": "26726:364:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2761, + "nodeType": "Block", + "src": "27553:114:8", + "statements": [ + { + "assignments": [ + 2746 + ], + "declarations": [ + { + "constant": false, + "id": 2746, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2762, + "src": "27559:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2745, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "27559:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2754, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 2750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27599:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 2751, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2740, + "src": "27615:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2748, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "27582:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2749, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27582:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27582:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2747, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "27572:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27572:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27559:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2758, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2746, + "src": "27659:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2755, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2738, + "src": "27638:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "27638:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "27638:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27638:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2744, + "id": 2760, + "nodeType": "Return", + "src": "27631:31:8" + } + ] + }, + "documentation": "@notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"supply\" : \"Returns the token supply of the given currency\"}", + "id": 2762, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2741, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2738, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2762, + "src": "27481:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2737, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "27481:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2740, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2762, + "src": "27500:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2739, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "27500:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27480:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2744, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2743, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 2762, + "src": "27540:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2742, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "27540:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27539:13:8" + }, + "scope": 4622, + "src": "27457:210:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2799, + "nodeType": "Block", + "src": "28194:189:8", + "statements": [ + { + "assignments": [ + 2776 + ], + "declarations": [ + { + "constant": false, + "id": 2776, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28200:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2775, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "28200:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2792, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 2780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28240:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 2781, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2766, + "src": "28259:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2783, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2764, + "src": "28289:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2784, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2768, + "src": "28295:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2782, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "28269:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28269:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2787, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2764, + "src": "28325:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2788, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2770, + "src": "28331:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2786, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "28305:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28305:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2778, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "28223:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28223:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28223:117:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2777, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "28213:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28213:128:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28200:141:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2796, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2776, + "src": "28375:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2793, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2764, + "src": "28354:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "28354:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "28354:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28354:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2774, + "id": 2798, + "nodeType": "Return", + "src": "28347:31:8" + } + ] + }, + "documentation": "@notice Get the token spender allowance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param spender Ethereum address of spender\n@return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}", + "id": 2800, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2771, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2764, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28085:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2763, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "28085:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2766, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28104:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2765, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28104:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2768, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28121:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28121:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2770, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28138:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2769, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28138:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28084:70:8" + }, + "payable": false, + "returnParameters": { + "id": 2774, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2773, + "name": "allowance", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28178:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2772, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "28178:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28177:16:8" + }, + "scope": 4622, + "src": "28058:325:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2831, + "nodeType": "Block", + "src": "28906:151:8", + "statements": [ + { + "assignments": [ + 2812 + ], + "declarations": [ + { + "constant": false, + "id": 2812, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28912:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2811, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "28912:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2824, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 2816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28952:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 2817, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2804, + "src": "28969:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2819, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2802, + "src": "28999:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2820, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2806, + "src": "29005:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2818, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "28979:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28979:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2814, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "28935:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28935:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28935:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2813, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "28925:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28925:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28912:103:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2828, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2812, + "src": "29049:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2825, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2802, + "src": "29028:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "29028:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "29028:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29028:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2810, + "id": 2830, + "nodeType": "Return", + "src": "29021:31:8" + } + ] + }, + "documentation": "@notice Get the token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"balance\" : \"Return the balance of a given account for a specified currency\"}", + "id": 2832, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2807, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2802, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28816:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2801, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "28816:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2804, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28835:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2803, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28835:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2806, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28852:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2805, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28852:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28815:53:8" + }, + "payable": false, + "returnParameters": { + "id": 2810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28892:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2808, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "28892:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28891:14:8" + }, + "scope": 4622, + "src": "28791:266:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2863, + "nodeType": "Block", + "src": "29612:150:8", + "statements": [ + { + "assignments": [ + 2844 + ], + "declarations": [ + { + "constant": false, + "id": 2844, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29618:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2843, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "29618:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2856, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e66726f7a656e", + "id": 2848, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29658:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + "value": "token.frozen" + }, + { + "argumentTypes": null, + "id": 2849, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2836, + "src": "29674:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2851, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2834, + "src": "29704:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2852, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "29710:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2850, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "29684:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29684:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2846, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "29641:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2847, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29641:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29641:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2845, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "29631:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29631:89:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "29618:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2860, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "29754:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2857, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2834, + "src": "29733:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2858, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "29733:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "29733:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29733:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2842, + "id": 2862, + "nodeType": "Return", + "src": "29726:31:8" + } + ] + }, + "documentation": "@notice Get the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}", + "id": 2864, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenFrozenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2839, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2834, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29516:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2833, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "29516:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2836, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29535:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2835, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29535:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2838, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29552:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2837, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29552:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29515:53:8" + }, + "payable": false, + "returnParameters": { + "id": 2842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2841, + "name": "frozenBalance", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29592:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2840, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "29592:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29591:20:8" + }, + "scope": 4622, + "src": "29485:277:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2903, + "nodeType": "Block", + "src": "30358:303:8", + "statements": [ + { + "assignments": [ + 2878 + ], + "declarations": [ + { + "constant": false, + "id": 2878, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30364:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2877, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "30364:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2890, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e66726f7a656e", + "id": 2882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30404:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + "value": "token.frozen" + }, + { + "argumentTypes": null, + "id": 2883, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2868, + "src": "30420:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2885, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2866, + "src": "30450:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2886, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "30456:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2884, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "30430:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30430:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2880, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "30387:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30387:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30387:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2879, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "30377:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30377:89:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30364:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2895, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2878, + "src": "30508:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2896, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "30512:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2892, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2866, + "src": "30487:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2893, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "30487:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "30487:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30487:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30527:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2891, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "30472:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30472:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2900, + "nodeType": "ExpressionStatement", + "src": "30472:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30652:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2876, + "id": 2902, + "nodeType": "Return", + "src": "30645:11:8" + } + ] + }, + "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Amount of tokens to freeze for account\n@return { \"success\" : \"Return true if successfully called from another contract\"}", + "id": 2904, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenFrozenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2866, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30260:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2865, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "30260:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2868, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30279:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2867, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "30279:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2870, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30296:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2869, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30296:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2872, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30313:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2871, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "30313:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30259:66:8" + }, + "payable": false, + "returnParameters": { + "id": 2876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2875, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30344:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2874, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30344:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30343:14:8" + }, + "scope": 4622, + "src": "30229:432:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3003, + "nodeType": "Block", + "src": "31192:598:8", + "statements": [ + { + "assignments": [ + 2916 + ], + "declarations": [ + { + "constant": false, + "id": 2916, + "name": "maxFee", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31199:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2915, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31199:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2928, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31261:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "id": 2924, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2908, + "src": "31272:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2921, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "31244:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31244:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31244:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2920, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "31234:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31234:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2917, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "31213:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2918, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "31213:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "31213:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31213:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31199:91:8" + }, + { + "assignments": [ + 2930 + ], + "declarations": [ + { + "constant": false, + "id": 2930, + "name": "minFee", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31296:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2929, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31296:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31358:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "id": 2938, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2908, + "src": "31369:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2935, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "31341:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2936, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31341:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31341:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2934, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "31331:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31331:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2931, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "31310:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2932, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "31310:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "31310:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31310:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31296:91:8" + }, + { + "assignments": [ + 2944 + ], + "declarations": [ + { + "constant": false, + "id": 2944, + "name": "bpsFee", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31393:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2943, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31393:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2956, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31455:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "id": 2952, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2908, + "src": "31466:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2949, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "31438:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31438:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31438:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2948, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "31428:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31428:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2945, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "31407:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2946, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "31407:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "31407:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31407:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31393:91:8" + }, + { + "assignments": [ + 2958 + ], + "declarations": [ + { + "constant": false, + "id": 2958, + "name": "flatFee", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31490:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2957, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31490:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2970, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31553:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "id": 2966, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2908, + "src": "31565:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2963, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "31536:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31536:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31536:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2962, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "31526:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31526:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2959, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "31505:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "31505:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "31505:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31505:78:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31490:93:8" + }, + { + "assignments": [ + 2972 + ], + "declarations": [ + { + "constant": false, + "id": 2972, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31589:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2971, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31589:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2985, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2983, + "name": "flatFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "31639:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31627:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2975, + "name": "bpsFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2944, + "src": "31614:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2973, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2910, + "src": "31603:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "31603:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31603:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2977, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31602:20:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "31602:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31602:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2981, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31601:33:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "31601:37:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31601:46:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31589:58:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2986, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2972, + "src": "31658:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 2987, + "name": "maxFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "31665:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31658:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2992, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2972, + "src": "31711:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2993, + "name": "minFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2930, + "src": "31718:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31711:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3000, + "nodeType": "Block", + "src": "31760:26:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2998, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2972, + "src": "31775:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2914, + "id": 2999, + "nodeType": "Return", + "src": "31768:11:8" + } + ] + }, + "id": 3001, + "nodeType": "IfStatement", + "src": "31707:79:8", + "trueBody": { + "id": 2997, + "nodeType": "Block", + "src": "31726:28:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2995, + "name": "minFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2930, + "src": "31741:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2914, + "id": 2996, + "nodeType": "Return", + "src": "31734:13:8" + } + ] + } + }, + "id": 3002, + "nodeType": "IfStatement", + "src": "31654:132:8", + "trueBody": { + "id": 2991, + "nodeType": "Block", + "src": "31673:28:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2989, + "name": "maxFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "31688:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2914, + "id": 2990, + "nodeType": "Return", + "src": "31681:13:8" + } + ] + } + } + ] + }, + "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the fee contract\n@param amount Transaction value\n@return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }", + "id": 3004, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2906, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31091:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2905, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "31091:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2908, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31110:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31110:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2910, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31135:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31135:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31090:57:8" + }, + "payable": false, + "returnParameters": { + "id": 2914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2913, + "name": "calculatedFees", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31171:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2912, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31171:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31170:21:8" + }, + "scope": 4622, + "src": "31068:722:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3033, + "nodeType": "Block", + "src": "32390:334:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3017, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3006, + "src": "32425:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3018, + "name": "accountA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3008, + "src": "32431:8:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3016, + "name": "verifyAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3062, + "src": "32411:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32411:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32448:92:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + }, + "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + } + ], + "id": 3015, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "32396:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32396:150:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3022, + "nodeType": "ExpressionStatement", + "src": "32396:150:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3025, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3006, + "src": "32581:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3026, + "name": "accountB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3010, + "src": "32587:8:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3024, + "name": "verifyAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3062, + "src": "32567:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32567:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32604:92:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + }, + "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + } + ], + "id": 3023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "32552:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32552:150:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3030, + "nodeType": "ExpressionStatement", + "src": "32552:150:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32715:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3014, + "id": 3032, + "nodeType": "Return", + "src": "32708:11:8" + } + ] + }, + "documentation": "@notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param accountA Ethereum address of first account holder to verify\n@param accountB Ethereum address of second account holder to verify\n@return { \"verified\" : \"Returns true if both accounts are successfully verified\" }", + "id": 3034, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "verifyAccounts", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3006, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3034, + "src": "32297:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3005, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "32297:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3008, + "name": "accountA", + "nodeType": "VariableDeclaration", + "scope": 3034, + "src": "32316:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3007, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32316:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3010, + "name": "accountB", + "nodeType": "VariableDeclaration", + "scope": 3034, + "src": "32334:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3009, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32334:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32296:55:8" + }, + "payable": false, + "returnParameters": { + "id": 3014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3013, + "name": "verified", + "nodeType": "VariableDeclaration", + "scope": 3034, + "src": "32375:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3012, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "32375:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32374:15:8" + }, + "scope": 4622, + "src": "32273:451:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3061, + "nodeType": "Block", + "src": "33214:262:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3045, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3036, + "src": "33250:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3046, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3038, + "src": "33256:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3044, + "name": "getKYCApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2327, + "src": "33235:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33235:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e7420646f6573206e6f742068617665204b594320617070726f76616c2e", + "id": 3048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33272:44:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", + "typeString": "literal_string \"Error: Account does not have KYC approval.\"" + }, + "value": "Error: Account does not have KYC approval." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", + "typeString": "literal_string \"Error: Account does not have KYC approval.\"" + } + ], + "id": 3043, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "33220:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33220:102:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3050, + "nodeType": "ExpressionStatement", + "src": "33220:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3053, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3036, + "src": "33360:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3054, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3038, + "src": "33366:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3052, + "name": "getAccountStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2356, + "src": "33343:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33343:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e7420737461747573206973206066616c7365602e204163636f756e7420737461747573206d757374206265206074727565602e", + "id": 3056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33382:66:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", + "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" + }, + "value": "Error: Account status is `false`. Account status must be `true`." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", + "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" + } + ], + "id": 3051, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "33328:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33328:126:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3058, + "nodeType": "ExpressionStatement", + "src": "33328:126:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33467:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3042, + "id": 3060, + "nodeType": "Return", + "src": "33460:11:8" + } + ] + }, + "documentation": "@notice Verified KYC and global status for a single account and return true or throw if account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder to verify\n@return { \"verified\" : \"Returns true if account is successfully verified\" }", + "id": 3062, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "verifyAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3036, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3062, + "src": "33140:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3035, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "33140:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3038, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3062, + "src": "33159:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33159:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33139:36:8" + }, + "payable": false, + "returnParameters": { + "id": 3042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3041, + "name": "verified", + "nodeType": "VariableDeclaration", + "scope": 3062, + "src": "33199:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3040, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33199:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33198:15:8" + }, + "scope": 4622, + "src": "33117:359:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3155, + "nodeType": "Block", + "src": "34346:799:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3079, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "34368:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34360:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34360:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34375:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "34360:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f6020616464726573732063616e6e6f74206265206e756c6c2e", + "id": 3083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34380:37:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", + "typeString": "literal_string \"Error: `to` address cannot be null.\"" + }, + "value": "Error: `to` address cannot be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", + "typeString": "literal_string \"Error: `to` address cannot be null.\"" + } + ], + "id": 3077, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34352:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34352:67:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3085, + "nodeType": "ExpressionStatement", + "src": "34352:67:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3087, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "34433:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34442:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "34433:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060616d6f756e7460206d7573742062652067726561746572207468616e207a65726f", + "id": 3090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34445:43:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", + "typeString": "literal_string \"Error: `amount` must be greater than zero\"" + }, + "value": "Error: `amount` must be greater than zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", + "typeString": "literal_string \"Error: `amount` must be greater than zero\"" + } + ], + "id": 3086, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34425:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34425:64:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3092, + "nodeType": "ExpressionStatement", + "src": "34425:64:8" + }, + { + "assignments": [ + 3094 + ], + "declarations": [ + { + "constant": false, + "id": 3094, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34496:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34496:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3101, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3096, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34533:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3098, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "34547:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34539:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34539:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3095, + "name": "getFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2736, + "src": "34518:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34518:35:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34496:57:8" + }, + { + "assignments": [ + 3103 + ], + "declarations": [ + { + "constant": false, + "id": 3103, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34559:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3102, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "34559:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3105, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34585:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3106, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3094, + "src": "34591:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3107, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "34604:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3104, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3004, + "src": "34571:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34571:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34559:52:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3112, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34658:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3113, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "34664:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "34664:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3116, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34691:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3117, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "34697:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3118, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "34707:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3115, + "name": "getFxUSDAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4621, + "src": "34676:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34676:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3111, + "name": "setAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4400, + "src": "34633:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 3120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34633:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d6f756e7420666f72206163636f756e742e", + "id": 3121, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34723:51:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", + "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" + }, + "value": "Error: Unable to set spending amount for account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", + "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" + } + ], + "id": 3110, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34618:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34618:157:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3123, + "nodeType": "ExpressionStatement", + "src": "34618:157:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3126, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34811:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3127, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "34817:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3128, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "34827:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "34827:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3130, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "34839:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3131, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "34843:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3132, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3072, + "src": "34851:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3125, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "34797:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34797:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34864:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 3124, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34782:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34782:128:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3136, + "nodeType": "ExpressionStatement", + "src": "34782:128:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3139, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34988:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3140, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "34994:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3141, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "35004:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "35004:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3143, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3094, + "src": "35016:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3144, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3103, + "src": "35029:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3146, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "35045:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3147, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3094, + "src": "35051:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3145, + "name": "getFeeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2642, + "src": "35035:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35035:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3138, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "34974:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34974:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 3150, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35072:49:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 3137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34959:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34959:163:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3152, + "nodeType": "ExpressionStatement", + "src": "34959:163:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35136:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3076, + "id": 3154, + "nodeType": "Return", + "src": "35129:11:8" + } + ] + }, + "documentation": "@notice Transfer an amount of currency token from msg.sender account to another specified account\n@dev This function is called by an interface that is accessible directly to the account holder\n@dev | This method has an `internal` view\n@dev | This method uses `forceTransfer()` low-level api\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3156, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3073, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3064, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34241:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3063, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "34241:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3066, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34260:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3065, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "34260:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3068, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34277:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3067, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34277:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3070, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34289:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3069, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "34289:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3072, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34302:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3071, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "34302:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34240:73:8" + }, + "payable": false, + "returnParameters": { + "id": 3076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3075, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34332:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3074, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "34332:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34331:14:8" + }, + "scope": 4622, + "src": "34223:922:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3251, + "nodeType": "Block", + "src": "36402:1060:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3175, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3164, + "src": "36431:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36423:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36423:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3177, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36438:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "36423:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36449:39:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + }, + "value": "Error: `to` address must not be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + } + ], + "id": 3173, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "36408:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36408:86:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3181, + "nodeType": "ExpressionStatement", + "src": "36408:86:8" + }, + { + "assignments": [ + 3183 + ], + "declarations": [ + { + "constant": false, + "id": 3183, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36501:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36501:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3190, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3185, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36538:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3187, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "36552:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36544:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36544:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3184, + "name": "getFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2736, + "src": "36523:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36523:35:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36501:57:8" + }, + { + "assignments": [ + 3192 + ], + "declarations": [ + { + "constant": false, + "id": 3192, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36564:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3191, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "36564:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3198, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3194, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36590:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3195, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3183, + "src": "36596:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3196, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3166, + "src": "36609:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3193, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3004, + "src": "36576:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36576:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36564:52:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3201, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36756:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3202, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3162, + "src": "36762:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3204, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36783:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3205, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "36789:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3206, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3166, + "src": "36799:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3203, + "name": "getFxUSDAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4621, + "src": "36768:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 3207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36768:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3200, + "name": "setAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4400, + "src": "36731:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 3208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36731:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36815:47:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + }, + "value": "Error: Unable to set account spending amount." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + } + ], + "id": 3199, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "36716:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36716:152:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3211, + "nodeType": "ExpressionStatement", + "src": "36716:152:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3214, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36948:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3215, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "36954:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3216, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3162, + "src": "36964:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3217, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3164, + "src": "36970:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3218, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3166, + "src": "36974:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3219, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3168, + "src": "36982:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3213, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "36934:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36934:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 3221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36995:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 3212, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "36919:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36919:127:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3223, + "nodeType": "ExpressionStatement", + "src": "36919:127:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3226, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "37124:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3227, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "37130:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3228, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3162, + "src": "37140:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3229, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3183, + "src": "37146:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3230, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3192, + "src": "37159:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3232, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "37175:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3233, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3183, + "src": "37181:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3231, + "name": "getFeeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2642, + "src": "37165:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 3234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37165:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3225, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "37110:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37110:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 3236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37202:49:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 3224, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "37095:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37095:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3238, + "nodeType": "ExpressionStatement", + "src": "37095:162:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3241, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "37348:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3242, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "37354:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3243, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3162, + "src": "37364:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3244, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3166, + "src": "37370:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3240, + "name": "updateAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "37332:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256) returns (bool)" + } + }, + "id": 3245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37332:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e636520666f72207370656e6465722e", + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37385:48:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", + "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" + }, + "value": "Error: Unable to update allowance for spender." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", + "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" + } + ], + "id": 3239, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "37317:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37317:122:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3248, + "nodeType": "ExpressionStatement", + "src": "37317:122:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37453:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3172, + "id": 3250, + "nodeType": "Return", + "src": "37446:11:8" + } + ] + }, + "documentation": "@notice Transfer an amount of currency token from account to another specified account via an approved spender account\n@dev This function is called by an interface that is accessible directly to the account spender\n@dev | This method has an `internal` view\n@dev | Transactions will fail if the spending amount exceeds the daily limit\n@dev | This method uses `forceTransfer()` low-level api\n@dev | This method implements ERC20 transferFrom() method with approved spender behavior\n@dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3252, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3158, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36283:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3157, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "36283:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3160, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36302:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3159, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "36302:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3162, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36319:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36319:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3164, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36333:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3163, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36333:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3166, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36345:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3165, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "36345:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3168, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36358:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3167, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "36358:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36282:87:8" + }, + "payable": false, + "returnParameters": { + "id": 3172, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3171, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36388:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "36388:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36387:14:8" + }, + "scope": 4622, + "src": "36261:1201:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3350, + "nodeType": "Block", + "src": "38351:801:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3271, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "38380:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "38372:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38372:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38387:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "38372:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", + "id": 3275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38398:39:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + }, + "value": "Error: `to` address must not be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + } + ], + "id": 3269, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "38357:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38357:86:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3277, + "nodeType": "ExpressionStatement", + "src": "38357:86:8" + }, + { + "assignments": [ + 3279 + ], + "declarations": [ + { + "constant": false, + "id": 3279, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38450:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3278, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38450:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3291, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38492:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3284, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3256, + "src": "38509:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3286, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38539:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3287, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "38545:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3285, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "38519:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38519:31:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3281, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "38475:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "38475:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38475:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3280, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "38465:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38465:87:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38450:102:8" + }, + { + "assignments": [ + 3293 + ], + "declarations": [ + { + "constant": false, + "id": 3293, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38558:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3292, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38558:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3305, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38600:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3298, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3256, + "src": "38617:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3300, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38647:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3301, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "38653:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3299, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "38627:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38627:29:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3295, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "38583:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "38583:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38583:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3294, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "38573:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38573:85:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38558:100:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3310, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3279, + "src": "38701:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3317, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "38738:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3314, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3279, + "src": "38728:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3311, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38707:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "38707:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "38707:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38707:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "38707:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38707:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3307, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38680:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "38680:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "38680:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38680:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38754:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3306, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "38665:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38665:202:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3322, + "nodeType": "ExpressionStatement", + "src": "38665:202:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3327, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3293, + "src": "38909:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3334, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "38946:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3331, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3293, + "src": "38936:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3328, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38915:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3329, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "38915:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "38915:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38915:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "38915:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38915:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3324, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38888:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "38888:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "38888:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38888:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38962:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3323, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "38873:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38873:202:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3339, + "nodeType": "ExpressionStatement", + "src": "38873:202:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3341, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3256, + "src": "39096:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3342, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "39106:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3343, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "39112:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3344, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "39116:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3345, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "39124:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3340, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "39087:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,address,uint256,bytes memory)" + } + }, + "id": 3346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39087:42:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3347, + "nodeType": "EmitStatement", + "src": "39082:47:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39143:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3268, + "id": 3349, + "nodeType": "Return", + "src": "39136:11:8" + } + ] + }, + "documentation": "@notice Low-level transfer method\n@dev | This method has an `internal` view\n@dev | This method does not include fees or approved allowances.\n@dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3351, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "forceTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3254, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38232:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3253, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "38232:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3256, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38251:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3255, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "38251:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3258, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38268:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38268:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3260, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38282:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38282:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3262, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38294:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3261, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "38294:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3264, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38307:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3263, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "38307:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38231:87:8" + }, + "payable": false, + "returnParameters": { + "id": 3268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3267, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38337:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3266, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "38337:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38336:14:8" + }, + "scope": 4622, + "src": "38209:943:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3402, + "nodeType": "Block", + "src": "39829:376:8", + "statements": [ + { + "assignments": [ + 3365 + ], + "declarations": [ + { + "constant": false, + "id": 3365, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39835:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3364, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39835:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3382, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 3369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39875:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 3370, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3355, + "src": "39894:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3372, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "39924:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3373, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3357, + "src": "39930:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3371, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "39904:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39904:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3376, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "39960:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3377, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "39966:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "39966:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3375, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "39940:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39940:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3367, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "39858:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "39858:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39858:120:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3366, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "39848:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39848:131:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39835:144:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3387, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3365, + "src": "40021:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3394, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3359, + "src": "40054:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3391, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3365, + "src": "40046:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3388, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "40025:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "40025:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "40025:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40025:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "40025:28:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40025:36:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3384, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "40000:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3385, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "40000:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "40000:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40000:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40070:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3383, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "39985:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39985:198:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3399, + "nodeType": "ExpressionStatement", + "src": "39985:198:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40196:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3363, + "id": 3401, + "nodeType": "Return", + "src": "40189:11:8" + } + ] + }, + "documentation": "@notice Low-level method to update spender allowance for account\n@dev | This method is called inside the `transferFrom()` method\n@dev | msg.sender == spender address\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Value to reduce allowance by (i.e. the amount spent)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3403, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updateAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3353, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39731:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3352, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "39731:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3355, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39750:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3354, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "39750:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3357, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39767:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3356, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39767:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3359, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39784:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3358, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "39784:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39730:66:8" + }, + "payable": false, + "returnParameters": { + "id": 3363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3362, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39815:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3361, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "39815:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39814:14:8" + }, + "scope": 4622, + "src": "39706:499:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3523, + "nodeType": "Block", + "src": "40769:1110:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3415, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "40783:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40794:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "40783:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20607370656e6465726020616464726573732063616e6e6f74206265206e756c6c2e", + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40807:42:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", + "typeString": "literal_string \"Error: `spender` address cannot be null.\"" + }, + "value": "Error: `spender` address cannot be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", + "typeString": "literal_string \"Error: `spender` address cannot be null.\"" + } + ], + "id": 3414, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "40775:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40775:75:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3420, + "nodeType": "ExpressionStatement", + "src": "40775:75:8" + }, + { + "assignments": [ + 3422 + ], + "declarations": [ + { + "constant": false, + "id": 3422, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40857:22:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3421, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "40857:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3429, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3424, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "40897:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3426, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "40911:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "40903:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40903:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3423, + "name": "getTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2434, + "src": "40882:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40882:35:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40857:60:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3432, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "40961:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3433, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3422, + "src": "40967:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3435, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "40997:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3436, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "41003:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3434, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "40977:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40977:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3431, + "name": "getTokenFrozenBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2864, + "src": "40939:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 3438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40939:73:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41016:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "40939:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205370656e646572206d757374206e6f74206861766520612066726f7a656e2062616c616e6365206469726563746c79", + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41025:56:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", + "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" + }, + "value": "Error: Spender must not have a frozen balance directly" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", + "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" + } + ], + "id": 3430, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "40924:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40924:158:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3443, + "nodeType": "ExpressionStatement", + "src": "40924:158:8" + }, + { + "assignments": [ + 3445 + ], + "declarations": [ + { + "constant": false, + "id": 3445, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "41089:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3444, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41089:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3462, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 3449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41131:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 3450, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3422, + "src": "41150:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3452, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41180:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3453, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "41186:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41186:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3451, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "41160:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41160:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3457, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41219:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3458, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "41225:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3456, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "41199:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41199:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3447, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "41114:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41114:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41114:120:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3446, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "41104:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41104:131:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41089:146:8" + }, + { + "assignments": [ + 3464 + ], + "declarations": [ + { + "constant": false, + "id": 3464, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "41241:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3463, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41241:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3477, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41283:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3469, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3422, + "src": "41300:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3471, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41330:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3472, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "41336:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41336:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3470, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "41310:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41310:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3466, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "41266:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41266:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41266:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3465, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "41256:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41256:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41241:108:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3482, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "41392:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3479, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41371:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "41371:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "41371:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41371:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41401:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "41371:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3486, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3409, + "src": "41406:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41416:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "41406:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "41371:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283029206265666f72652073657474696e6720616e207570646174656420616c6c6f77616e636520666f72207370656e6465722e", + "id": 3490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41425:84:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", + "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" + }, + "value": "Error: Allowance must be zero (0) before setting an updated allowance for spender." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", + "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" + } + ], + "id": 3478, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "41356:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41356:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3492, + "nodeType": "ExpressionStatement", + "src": "41356:154:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3497, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "41553:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3494, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41532:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "41532:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "41532:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41532:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3499, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3409, + "src": "41562:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41532:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d73672e73656e64657220746f6b656e2062616c616e63652e", + "id": 3501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41576:58:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", + "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" + }, + "value": "Error: Allowance cannot exceed msg.sender token balance." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", + "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" + } + ], + "id": 3493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "41517:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41517:118:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3503, + "nodeType": "ExpressionStatement", + "src": "41517:118:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3508, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "41678:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3509, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3409, + "src": "41684:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3505, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41657:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3506, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "41657:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "41657:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41657:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41699:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3504, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "41642:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41642:165:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3513, + "nodeType": "ExpressionStatement", + "src": "41642:165:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3515, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "41828:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41828:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3517, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "41840:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3518, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3409, + "src": "41849:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3514, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1654, + "src": "41819:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41819:37:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3520, + "nodeType": "EmitStatement", + "src": "41814:42:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41870:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3413, + "id": 3522, + "nodeType": "Return", + "src": "41863:11:8" + } + ] + }, + "documentation": "@notice Low-level method to set the allowance for a spender\n@dev | This method is called inside the `approve()` ERC20 method\n@dev | msg.sender == account holder\n@param self Internal storage proxying TokenIOStorage contract\n@param spender Ethereum address of account spender\n@param amount Value to set for spender allowance\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3524, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approveAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3405, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40688:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3404, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "40688:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3407, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40707:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3406, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40707:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3409, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40724:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3408, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "40724:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "40687:49:8" + }, + "payable": false, + "returnParameters": { + "id": 3413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3412, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40755:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3411, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "40755:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "40754:14:8" + }, + "scope": 4622, + "src": "40662:1217:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3634, + "nodeType": "Block", + "src": "42706:943:8", + "statements": [ + { + "assignments": [ + 3540 + ], + "declarations": [ + { + "constant": false, + "id": 3540, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42712:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3539, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42712:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3552, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42754:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3545, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3528, + "src": "42771:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3547, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "42801:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3548, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3530, + "src": "42807:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3546, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "42781:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42781:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3542, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "42737:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42737:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42737:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3541, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "42727:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42727:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42712:105:8" + }, + { + "assignments": [ + 3554 + ], + "declarations": [ + { + "constant": false, + "id": 3554, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42823:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3553, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42823:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3563, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e697373756564", + "id": 3558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42865:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + "value": "token.issued" + }, + { + "argumentTypes": null, + "id": 3559, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3528, + "src": "42881:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3560, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3534, + "src": "42891:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3556, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "42848:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42848:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42848:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3555, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "42838:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42838:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42823:80:8" + }, + { + "assignments": [ + 3565 + ], + "declarations": [ + { + "constant": false, + "id": 3565, + "name": "id_c", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42909:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3564, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42909:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3573, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 3569, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42951:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 3570, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3528, + "src": "42967:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3567, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "42934:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42934:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42934:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3566, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "42924:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42924:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42909:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3578, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3540, + "src": "43014:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3585, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3532, + "src": "43051:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3582, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3540, + "src": "43041:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3579, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43020:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3580, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43020:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "43020:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43020:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43020:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43020:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3575, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "42993:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3576, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "42993:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "42993:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42993:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43067:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3574, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "42985:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42985:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3590, + "nodeType": "ExpressionStatement", + "src": "42985:190:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3595, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "43210:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3602, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3532, + "src": "43247:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3599, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "43237:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3596, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43216:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3597, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43216:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "43216:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43216:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43216:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43216:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3592, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43189:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3593, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43189:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "43189:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43189:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43263:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3591, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "43181:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43181:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3607, + "nodeType": "ExpressionStatement", + "src": "43181:190:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3612, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "43406:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3619, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3532, + "src": "43443:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3616, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "43433:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3613, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43412:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43412:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "43412:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43412:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43412:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43412:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3609, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43385:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43385:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "43385:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43385:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43459:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "43377:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43377:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3624, + "nodeType": "ExpressionStatement", + "src": "43377:190:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3626, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3528, + "src": "43587:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3627, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3530, + "src": "43597:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3628, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3532, + "src": "43606:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3629, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3534, + "src": "43614:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3625, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "43579:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,uint256,string memory)" + } + }, + "id": 3630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43579:46:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3631, + "nodeType": "EmitStatement", + "src": "43574:51:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3632, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43639:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3538, + "id": 3633, + "nodeType": "Return", + "src": "43632:11:8" + } + ] + }, + "documentation": "@notice Deposit an amount of currency into the Ethereum account holder\n@dev | The total supply of the token increases only when new funds are deposited 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to deposit for account\n@param issuerFirm Name of the issuing firm authorizing the deposit\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3635, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3526, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42589:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3525, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "42589:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3528, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42608:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3527, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "42608:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3530, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42625:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "42625:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3532, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42642:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3531, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "42642:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3534, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42655:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3533, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "42655:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "42588:85:8" + }, + "payable": false, + "returnParameters": { + "id": 3538, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3537, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42692:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3536, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42692:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "42691:14:8" + }, + "scope": 4622, + "src": "42572:1077:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3745, + "nodeType": "Block", + "src": "44480:1002:8", + "statements": [ + { + "assignments": [ + 3651 + ], + "declarations": [ + { + "constant": false, + "id": 3651, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44486:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3650, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44486:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3663, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44528:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3656, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3639, + "src": "44545:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3658, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "44575:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3659, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "44581:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3657, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "44555:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44555:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3653, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "44511:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44511:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44511:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3652, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "44501:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44501:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44486:105:8" + }, + { + "assignments": [ + 3665 + ], + "declarations": [ + { + "constant": false, + "id": 3665, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44597:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3664, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44597:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3674, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e697373756564", + "id": 3669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44639:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + "value": "token.issued" + }, + { + "argumentTypes": null, + "id": 3670, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3639, + "src": "44655:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3671, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3645, + "src": "44665:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3667, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "44622:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44622:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44622:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3666, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "44612:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44612:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44597:80:8" + }, + { + "assignments": [ + 3676 + ], + "declarations": [ + { + "constant": false, + "id": 3676, + "name": "id_c", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44721:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3675, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44721:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3684, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 3680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44763:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 3681, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3639, + "src": "44779:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3678, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "44746:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44746:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44746:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3677, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "44736:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44736:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44721:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3689, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3651, + "src": "44832:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3696, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3643, + "src": "44869:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3693, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3651, + "src": "44859:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3690, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "44838:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3691, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "44838:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "44838:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44838:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "44838:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44838:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3686, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "44811:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3687, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "44811:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "44811:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44811:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44885:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3685, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "44796:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44796:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3701, + "nodeType": "ExpressionStatement", + "src": "44796:197:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3706, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "45035:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3713, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3643, + "src": "45072:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3710, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "45062:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3707, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "45041:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3708, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "45041:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "45041:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45041:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "45041:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45041:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3703, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "45014:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "45014:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "45014:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45014:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45088:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3702, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "44999:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44999:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3718, + "nodeType": "ExpressionStatement", + "src": "44999:197:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3723, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3676, + "src": "45238:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3730, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3643, + "src": "45275:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3727, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3676, + "src": "45265:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3724, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "45244:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "45244:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "45244:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45244:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "45244:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45244:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3720, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "45217:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3721, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "45217:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "45217:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45217:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45291:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3719, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "45202:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45202:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3735, + "nodeType": "ExpressionStatement", + "src": "45202:197:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3737, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3639, + "src": "45420:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3738, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "45430:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3739, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3643, + "src": "45439:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3740, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3645, + "src": "45447:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3736, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "45411:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,uint256,string memory)" + } + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45411:47:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3742, + "nodeType": "EmitStatement", + "src": "45406:52:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45472:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3649, + "id": 3744, + "nodeType": "Return", + "src": "45465:11:8" + } + ] + }, + "documentation": "@notice Withdraw an amount of currency from the Ethereum account holder\n@dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to withdraw for account\n@param issuerFirm Name of the issuing firm authorizing the withdraw\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3746, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3637, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44363:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3636, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "44363:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3639, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44382:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3638, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "44382:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3641, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44399:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44399:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3643, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44416:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3642, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "44416:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3645, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44429:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "44429:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44362:85:8" + }, + "payable": false, + "returnParameters": { + "id": 3649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3648, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44466:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3647, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44466:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44465:14:8" + }, + "scope": 4622, + "src": "44345:1137:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3779, + "nodeType": "Block", + "src": "46215:275:8", + "statements": [ + { + "assignments": [ + 3758 + ], + "declarations": [ + { + "constant": false, + "id": 3758, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46221:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3757, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "46221:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3766, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e6669726d", + "id": 3762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46261:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + "value": "registered.firm" + }, + { + "argumentTypes": null, + "id": 3763, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3750, + "src": "46280:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3760, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "46244:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "46244:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46244:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3759, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "46234:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46234:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "46221:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3771, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3758, + "src": "46334:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3772, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3752, + "src": "46338:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3768, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3748, + "src": "46313:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "46313:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "46313:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 3773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46313:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46355:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3767, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "46298:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46298:170:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3776, + "nodeType": "ExpressionStatement", + "src": "46298:170:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46481:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3756, + "id": 3778, + "nodeType": "Return", + "src": "46474:11:8" + } + ] + }, + "documentation": "@notice Method for setting a registered issuer firm\n@dev | Only Token, Inc. and other authorized institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered\n@param approved Approval status to set for the firm (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3780, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3748, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46130:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3747, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "46130:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3750, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46149:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3749, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "46149:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3752, + "name": "approved", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46168:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3751, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "46168:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "46129:53:8" + }, + "payable": false, + "returnParameters": { + "id": 3756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3755, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46201:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3754, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "46201:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "46200:14:8" + }, + "scope": 4622, + "src": "46103:387:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3844, + "nodeType": "Block", + "src": "47323:679:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3795, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3782, + "src": "47361:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3796, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3784, + "src": "47367:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3794, + "name": "isRegisteredFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3900, + "src": "47344:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" + } + }, + "id": 3797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47344:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20606973737565724669726d60206d75737420626520726567697374657265642e", + "id": 3798, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47386:41:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", + "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" + }, + "value": "Error: `issuerFirm` must be registered." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", + "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" + } + ], + "id": 3793, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "47329:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47329:99:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3800, + "nodeType": "ExpressionStatement", + "src": "47329:99:8" + }, + { + "assignments": [ + 3802 + ], + "declarations": [ + { + "constant": false, + "id": 3802, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47435:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3801, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47435:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3811, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3806, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47477:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "id": 3807, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3784, + "src": "47501:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3808, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3786, + "src": "47513:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3804, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "47460:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "47460:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47460:70:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3803, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "47450:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47450:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "47435:96:8" + }, + { + "assignments": [ + 3813 + ], + "declarations": [ + { + "constant": false, + "id": 3813, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47537:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3812, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47537:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3821, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f726974792e6669726d", + "id": 3817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47579:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + "value": "registered.authority.firm" + }, + { + "argumentTypes": null, + "id": 3818, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3786, + "src": "47608:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3815, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "47562:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "47562:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47562:63:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3814, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "47552:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47552:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "47537:89:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3826, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3802, + "src": "47669:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3827, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "47675:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3823, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3782, + "src": "47648:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3824, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "47648:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "47648:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 3828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47648:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47692:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3822, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "47633:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47633:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3831, + "nodeType": "ExpressionStatement", + "src": "47633:167:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3836, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3813, + "src": "47845:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3837, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3784, + "src": "47851:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3833, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3782, + "src": "47822:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3834, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "47822:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "47822:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 3838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47822:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47870:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3832, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "47807:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47807:171:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3841, + "nodeType": "ExpressionStatement", + "src": "47807:171:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47993:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3792, + "id": 3843, + "nodeType": "Return", + "src": "47986:11:8" + } + ] + }, + "documentation": "@notice Method for setting a registered issuer firm authority\n@dev | Only Token, Inc. and other approved institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | Authority can only be set for a registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered to authority\n@param authorityAddress Ethereum address of the firm authority to be approved\n@param approved Approval status to set for the firm authority (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3845, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3782, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47212:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3781, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "47212:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3784, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47231:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3783, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "47231:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3786, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47250:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3785, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "47250:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3788, + "name": "approved", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47276:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3787, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "47276:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47211:79:8" + }, + "payable": false, + "returnParameters": { + "id": 3792, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3791, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47309:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3790, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "47309:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47308:14:8" + }, + "scope": 4622, + "src": "47180:822:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3873, + "nodeType": "Block", + "src": "48490:164:8", + "statements": [ + { + "assignments": [ + 3855 + ], + "declarations": [ + { + "constant": false, + "id": 3855, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3874, + "src": "48496:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3854, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "48496:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3866, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f726974792e6669726d", + "id": 3859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48536:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + "value": "registered.authority.firm" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3861, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3847, + "src": "48585:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3862, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3849, + "src": "48591:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3860, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "48565:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48565:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3857, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "48519:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "48519:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48519:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3856, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "48509:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48509:101:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "48496:114:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3870, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3855, + "src": "48646:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3867, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3847, + "src": "48623:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3868, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "48623:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "48623:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 3871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48623:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3853, + "id": 3872, + "nodeType": "Return", + "src": "48616:33:8" + } + ] + }, + "documentation": "@notice Get the issuer firm registered to the authority Ethereum address\n@dev | Only one firm can be registered per authority\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"issuerFirm\" : \"Name of the firm registered to authority\" }", + "id": 3874, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFirmFromAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3847, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3874, + "src": "48403:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3846, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "48403:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3849, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3874, + "src": "48422:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3848, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48422:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48402:45:8" + }, + "payable": false, + "returnParameters": { + "id": 3853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3852, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3874, + "src": "48471:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3851, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "48471:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48470:19:8" + }, + "scope": 4622, + "src": "48373:281:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3899, + "nodeType": "Block", + "src": "49052:119:8", + "statements": [ + { + "assignments": [ + 3884 + ], + "declarations": [ + { + "constant": false, + "id": 3884, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3900, + "src": "49058:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3883, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "49058:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3892, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e6669726d", + "id": 3888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49098:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + "value": "registered.firm" + }, + { + "argumentTypes": null, + "id": 3889, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "49117:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3886, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "49081:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "49081:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49081:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3885, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "49071:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49071:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "49058:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3896, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3884, + "src": "49163:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3893, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3876, + "src": "49142:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "49142:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "49142:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49142:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3882, + "id": 3898, + "nodeType": "Return", + "src": "49135:31:8" + } + ] + }, + "documentation": "@notice Return the boolean (true/false) registration status for an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@return { \"registered\" : \"Return if the issuer firm has been registered\" }", + "id": 3900, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3876, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3900, + "src": "48974:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3875, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "48974:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3878, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3900, + "src": "48993:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3877, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "48993:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48973:38:8" + }, + "payable": false, + "returnParameters": { + "id": 3882, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3881, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3900, + "src": "49035:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3880, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "49035:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49034:17:8" + }, + "scope": 4622, + "src": "48948:223:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3931, + "nodeType": "Block", + "src": "49703:169:8", + "statements": [ + { + "assignments": [ + 3912 + ], + "declarations": [ + { + "constant": false, + "id": 3912, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49709:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3911, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "49709:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3924, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49749:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "id": 3917, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3904, + "src": "49773:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3919, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3902, + "src": "49805:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3920, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3906, + "src": "49811:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3918, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "49785:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49785:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3914, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "49732:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "49732:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49732:97:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3913, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "49722:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49722:108:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "49709:121:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3928, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3912, + "src": "49864:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3925, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3902, + "src": "49843:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3926, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "49843:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "49843:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49843:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3910, + "id": 3930, + "nodeType": "Return", + "src": "49836:31:8" + } + ] + }, + "documentation": "@notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }", + "id": 3932, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredToFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3902, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49599:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3901, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "49599:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3904, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49618:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3903, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "49618:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3906, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49637:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49637:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49598:64:8" + }, + "payable": false, + "returnParameters": { + "id": 3910, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3909, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49686:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3908, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "49686:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49685:17:8" + }, + "scope": 4622, + "src": "49571:301:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3967, + "nodeType": "Block", + "src": "50348:230:8", + "statements": [ + { + "assignments": [ + 3942 + ], + "declarations": [ + { + "constant": false, + "id": 3942, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3968, + "src": "50354:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3941, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "50354:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3960, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50394:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3948, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3934, + "src": "50439:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3950, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3934, + "src": "50465:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3951, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3936, + "src": "50471:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3949, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "50445:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50445:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3947, + "name": "getFirmFromAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3874, + "src": "50418:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 3953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50418:71:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3955, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3934, + "src": "50511:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3956, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3936, + "src": "50517:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3954, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "50491:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50491:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3944, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "50377:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "50377:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50377:158:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3943, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "50367:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50367:169:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "50354:182:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3964, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3942, + "src": "50570:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3961, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3934, + "src": "50549:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3962, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "50549:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "50549:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50549:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3940, + "id": 3966, + "nodeType": "Return", + "src": "50542:31:8" + } + ] + }, + "documentation": "@notice Return if an authority address is registered\n@dev | This also checks the status of the registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered\" }", + "id": 3968, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3934, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3968, + "src": "50263:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3933, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "50263:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3936, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3968, + "src": "50282:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3935, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "50282:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50262:45:8" + }, + "payable": false, + "returnParameters": { + "id": 3940, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3939, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3968, + "src": "50331:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3938, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "50331:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50330:17:8" + }, + "scope": 4622, + "src": "50232:346:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3993, + "nodeType": "Block", + "src": "51023:109:8", + "statements": [ + { + "assignments": [ + 3978 + ], + "declarations": [ + { + "constant": false, + "id": 3978, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3994, + "src": "51029:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3977, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51029:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3986, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74782e737461747573", + "id": 3982, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51069:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + "value": "tx.status" + }, + { + "argumentTypes": null, + "id": 3983, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3972, + "src": "51082:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3980, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "51052:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "51052:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51052:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3979, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "51042:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51042:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51029:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3990, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3978, + "src": "51124:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3987, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3970, + "src": "51103:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3988, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "51103:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "51103:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51103:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3976, + "id": 3992, + "nodeType": "Return", + "src": "51096:31:8" + } + ] + }, + "documentation": "@notice Return boolean transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}", + "id": 3994, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTxStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3970, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3994, + "src": "50950:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3969, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "50950:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3972, + "name": "txHash", + "nodeType": "VariableDeclaration", + "scope": 3994, + "src": "50969:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3971, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "50969:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50949:35:8" + }, + "payable": false, + "returnParameters": { + "id": 3976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3975, + "name": "txStatus", + "nodeType": "VariableDeclaration", + "scope": 3994, + "src": "51008:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3974, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "51008:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51007:15:8" + }, + "scope": 4622, + "src": "50929:203:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4034, + "nodeType": "Block", + "src": "51541:486:8", + "statements": [ + { + "assignments": [ + 4004 + ], + "declarations": [ + { + "constant": false, + "id": 4004, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4035, + "src": "51547:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4003, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51547:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4012, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74782e737461747573", + "id": 4008, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51587:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + "value": "tx.status" + }, + { + "argumentTypes": null, + "id": 4009, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3998, + "src": "51600:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 4006, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "51570:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "51570:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51570:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4005, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "51560:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51560:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51547:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "51677:26:8", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4015, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3996, + "src": "51690:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4016, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3998, + "src": "51696:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4014, + "name": "getTxStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3994, + "src": "51678:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) view returns (bool)" + } + }, + "id": 4017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51678:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e20737461747573206d7573742062652066616c7365206265666f72652073657474696e6720746865207472616e73616374696f6e207374617475732e", + "id": 4019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51711:80:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", + "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" + }, + "value": "Error: Transaction status must be false before setting the transaction status." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", + "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" + } + ], + "id": 4013, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "51669:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51669:123:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4021, + "nodeType": "ExpressionStatement", + "src": "51669:123:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4026, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4004, + "src": "51879:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51883:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4023, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3996, + "src": "51858:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4024, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "51858:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "51858:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 4028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51858:30:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51896:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 4022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "51850:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51850:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4031, + "nodeType": "ExpressionStatement", + "src": "51850:154:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52018:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4002, + "id": 4033, + "nodeType": "Return", + "src": "52011:11:8" + } + ] + }, + "documentation": "@notice Set transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 4035, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTxStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3999, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3996, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4035, + "src": "51474:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3995, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "51474:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3998, + "name": "txHash", + "nodeType": "VariableDeclaration", + "scope": 4035, + "src": "51493:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3997, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51493:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51473:35:8" + }, + "payable": false, + "returnParameters": { + "id": 4002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4001, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4035, + "src": "51527:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4000, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "51527:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51526:14:8" + }, + "scope": 4622, + "src": "51453:574:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4148, + "nodeType": "Block", + "src": "53347:1436:8", + "statements": [ + { + "assignments": [ + 4061 + ], + "declarations": [ + { + "constant": false, + "id": 4061, + "name": "fxTxHash", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53354:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4060, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53354:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4073, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4065, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "53400:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4066, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4041, + "src": "53411:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4067, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4043, + "src": "53420:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4068, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "53429:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4069, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4047, + "src": "53437:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4070, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4055, + "src": "53445:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4063, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "53383:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "53383:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53383:73:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4062, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "53373:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53373:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "53354:103:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4076, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "53630:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4077, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "53636:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "53636:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4079, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "53648:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4075, + "name": "verifyAccounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3034, + "src": "53615:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) view returns (bool)" + } + }, + "id": 4080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53615:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204f6e6c79207665726966696564206163636f756e74732063616e20706572666f726d2063757272656e63792073776170732e", + "id": 4081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53666:59:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", + "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" + }, + "value": "Error: Only verified accounts can perform currency swaps." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", + "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" + } + ], + "id": 4074, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "53600:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53600:126:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4083, + "nodeType": "ExpressionStatement", + "src": "53600:126:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4086, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "53850:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4087, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4061, + "src": "53856:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4085, + "name": "setTxStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "53838:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) returns (bool)" + } + }, + "id": 4088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53838:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f20736574207472616e73616374696f6e2073746174757320746f2066756c66696c6c65642e", + "id": 4089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53873:55:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", + "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" + }, + "value": "Error: Failed to set transaction status to fulfilled." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", + "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" + } + ], + "id": 4084, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "53823:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53823:106:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4091, + "nodeType": "ExpressionStatement", + "src": "53823:106:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4093, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4055, + "src": "53994:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4094, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "54008:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53994:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e20686173206578706972656421", + "id": 4096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54013:33:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", + "typeString": "literal_string \"Error: Transaction has expired!\"" + }, + "value": "Error: Transaction has expired!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", + "typeString": "literal_string \"Error: Transaction has expired!\"" + } + ], + "id": 4092, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "53986:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53986:61:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4098, + "nodeType": "ExpressionStatement", + "src": "53986:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4101, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4061, + "src": "54207:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4102, + "name": "sigV", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4049, + "src": "54217:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 4103, + "name": "sigR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4051, + "src": "54223:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4104, + "name": "sigS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4053, + "src": "54229:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4100, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5248, + "src": "54197:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 4105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54197:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 4106, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "54238:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "54197:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204164647265737320646572697665642066726f6d207472616e73616374696f6e207369676e617475726520646f6573206e6f74206d6174636820746865207265717565737465722061646472657373", + "id": 4108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54255:88:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", + "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" + }, + "value": "Error: Address derived from transaction signature does not match the requester address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", + "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" + } + ], + "id": 4099, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "54182:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54182:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4110, + "nodeType": "ExpressionStatement", + "src": "54182:162:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4113, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "54438:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4114, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4041, + "src": "54444:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4115, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "54453:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "54453:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4117, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "54465:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4118, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "54476:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 4119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54484:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "id": 4112, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "54424:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54424:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 4121, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54498:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 4111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "54409:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54409:135:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4123, + "nodeType": "ExpressionStatement", + "src": "54409:135:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4126, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "54580:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4127, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4043, + "src": "54586:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4128, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "54595:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4129, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "54606:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "54606:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4131, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4047, + "src": "54618:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 4132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54626:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "id": 4125, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "54566:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54566:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54640:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 4124, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "54551:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54551:135:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4136, + "nodeType": "ExpressionStatement", + "src": "54551:135:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4138, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4041, + "src": "54705:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4139, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4043, + "src": "54714:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4140, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "54723:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4141, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4047, + "src": "54731:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4142, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4055, + "src": "54739:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4143, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4061, + "src": "54751:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4137, + "name": "FxSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1716, + "src": "54698:6:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (string memory,string memory,uint256,uint256,uint256,bytes32)" + } + }, + "id": 4144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54698:62:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4145, + "nodeType": "EmitStatement", + "src": "54693:67:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54774:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4059, + "id": 4147, + "nodeType": "Return", + "src": "54767:11:8" + } + ] + }, + "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev | This method can be called directly between peers\n@dev | This method does not take transaction fees from the swap\n@param self Internal storage proxying TokenIOStorage contract\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4149, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "execSwap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4037, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53123:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4036, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "53123:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4039, + "name": "requester", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53146:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4038, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "53146:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4041, + "name": "symbolA", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53169:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4040, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "53169:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4043, + "name": "symbolB", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53189:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4042, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "53189:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4045, + "name": "valueA", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53209:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4044, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53209:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4047, + "name": "valueB", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53226:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53226:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4049, + "name": "sigV", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53243:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4048, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "53243:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4051, + "name": "sigR", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53259:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4050, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53259:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4053, + "name": "sigS", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53277:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4052, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53277:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4055, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53295:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4054, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53295:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "53117:197:8" + }, + "payable": false, + "returnParameters": { + "id": 4059, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4058, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53333:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4057, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "53333:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "53332:14:8" + }, + "scope": 4622, + "src": "53100:1683:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4187, + "nodeType": "Block", + "src": "55336:350:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4159, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "55350:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 4160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55369:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "55350:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2063616e6e6f74206465707265636174652061206e756c6c20616464726573732e", + "id": 4162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55382:41:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", + "typeString": "literal_string \"Error: cannot deprecate a null address.\"" + }, + "value": "Error: cannot deprecate a null address." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", + "typeString": "literal_string \"Error: cannot deprecate a null address.\"" + } + ], + "id": 4158, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "55342:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55342:82:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4164, + "nodeType": "ExpressionStatement", + "src": "55342:82:8" + }, + { + "assignments": [ + 4166 + ], + "declarations": [ + { + "constant": false, + "id": 4166, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4188, + "src": "55431:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4165, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "55431:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4174, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6465706372656361746564", + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55471:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + "value": "depcrecated" + }, + { + "argumentTypes": null, + "id": 4171, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "55486:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4168, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "55454:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "55454:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55454:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4167, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "55444:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55444:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "55431:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4179, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4166, + "src": "55539:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55543:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4176, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4151, + "src": "55518:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "55518:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "55518:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 4181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55518:30:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55556:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "55510:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55510:153:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4184, + "nodeType": "ExpressionStatement", + "src": "55510:153:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55677:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4157, + "id": 4186, + "nodeType": "Return", + "src": "55670:11:8" + } + ] + }, + "documentation": "@notice Deprecate a contract interface\n@dev | This is a low-level method to deprecate a contract interface.\n@dev | This is useful if the interface needs to be updated or becomes out of date\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4188, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setDeprecatedContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4151, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4188, + "src": "55260:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4150, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "55260:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4153, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4188, + "src": "55279:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "55279:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "55259:44:8" + }, + "payable": false, + "returnParameters": { + "id": 4157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4156, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4188, + "src": "55322:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "55322:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "55321:14:8" + }, + "scope": 4622, + "src": "55229:457:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4213, + "nodeType": "Block", + "src": "56100:120:8", + "statements": [ + { + "assignments": [ + 4198 + ], + "declarations": [ + { + "constant": false, + "id": 4198, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4214, + "src": "56106:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4197, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "56106:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4206, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6465706372656361746564", + "id": 4202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56146:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + "value": "depcrecated" + }, + { + "argumentTypes": null, + "id": 4203, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4192, + "src": "56161:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4200, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "56129:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "56129:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56129:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4199, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "56119:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56119:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56106:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4210, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4198, + "src": "56212:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4207, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4190, + "src": "56191:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4208, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "56191:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "56191:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 4211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56191:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4196, + "id": 4212, + "nodeType": "Return", + "src": "56184:31:8" + } + ] + }, + "documentation": "@notice Return the deprecation status of a contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}", + "id": 4214, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isContractDeprecated", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4193, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4190, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4214, + "src": "56020:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4189, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "56020:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4192, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4214, + "src": "56039:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4191, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "56039:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56019:44:8" + }, + "payable": false, + "returnParameters": { + "id": 4196, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4195, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 4214, + "src": "56087:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4194, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "56087:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56086:13:8" + }, + "scope": 4622, + "src": "55990:230:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4247, + "nodeType": "Block", + "src": "56743:264:8", + "statements": [ + { + "assignments": [ + 4226 + ], + "declarations": [ + { + "constant": false, + "id": 4226, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56749:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4225, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "56749:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4234, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6c696d69742e7370656e64696e672e706572696f64", + "id": 4230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56789:23:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + "value": "limit.spending.period" + }, + { + "argumentTypes": null, + "id": 4231, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4218, + "src": "56814:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4228, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "56772:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "56772:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56772:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4227, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "56762:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56762:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56749:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4239, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4226, + "src": "56858:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4240, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4220, + "src": "56862:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4236, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4216, + "src": "56837:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4237, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "56837:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "56837:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56837:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56877:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4235, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "56829:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56829:155:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4244, + "nodeType": "ExpressionStatement", + "src": "56829:155:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56998:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4224, + "id": 4246, + "nodeType": "Return", + "src": "56991:11:8" + } + ] + }, + "documentation": "@notice Set the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param period Unix timestamp of the spending period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4248, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4221, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4216, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56662:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4215, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "56662:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4218, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56681:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4217, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "56681:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4220, + "name": "period", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56698:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4219, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "56698:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56661:49:8" + }, + "payable": false, + "returnParameters": { + "id": 4224, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4223, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56729:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4222, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "56729:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56728:14:8" + }, + "scope": 4622, + "src": "56628:379:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4273, + "nodeType": "Block", + "src": "57592:122:8", + "statements": [ + { + "assignments": [ + 4258 + ], + "declarations": [ + { + "constant": false, + "id": 4258, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4274, + "src": "57598:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4257, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "57598:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4266, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6c696d69742e7370656e64696e672e706572696f64", + "id": 4262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "57638:23:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + "value": "limit.spending.period" + }, + { + "argumentTypes": null, + "id": 4263, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4252, + "src": "57663:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4260, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "57621:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "57621:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57621:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4259, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "57611:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57611:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57598:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4270, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4258, + "src": "57706:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4267, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4250, + "src": "57685:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "57685:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "57685:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57685:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4256, + "id": 4272, + "nodeType": "Return", + "src": "57678:31:8" + } + ] + }, + "documentation": "@notice Get the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@dev | If the current spending period has expired, it will be set upon next `transfer()`\nor `transferFrom()` request\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"period\" : \"Returns Unix timestamp of the current spending period\"}", + "id": 4274, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4250, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4274, + "src": "57520:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4249, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "57520:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4252, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4274, + "src": "57539:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4251, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "57539:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57519:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4256, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4255, + "name": "period", + "nodeType": "VariableDeclaration", + "scope": 4274, + "src": "57579:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4254, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "57579:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57578:13:8" + }, + "scope": 4622, + "src": "57486:228:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4307, + "nodeType": "Block", + "src": "58200:264:8", + "statements": [ + { + "assignments": [ + 4286 + ], + "declarations": [ + { + "constant": false, + "id": 4286, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58206:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4285, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "58206:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4294, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", + "id": 4290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58246:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + "value": "account.spending.limit" + }, + { + "argumentTypes": null, + "id": 4291, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4278, + "src": "58272:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4288, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "58229:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "58229:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58229:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4287, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "58219:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58219:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "58206:75:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4299, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4286, + "src": "58316:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4300, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4280, + "src": "58320:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4296, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4276, + "src": "58295:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4297, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "58295:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "58295:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58295:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4302, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58334:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4295, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "58287:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58287:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4304, + "nodeType": "ExpressionStatement", + "src": "58287:154:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58455:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4284, + "id": 4306, + "nodeType": "Return", + "src": "58448:11:8" + } + ] + }, + "documentation": "@notice Set the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param limit Spending limit amount\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4308, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4276, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58120:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4275, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "58120:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4278, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58139:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4277, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "58139:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4280, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58156:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4279, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "58156:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58119:48:8" + }, + "payable": false, + "returnParameters": { + "id": 4284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4283, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58186:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4282, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "58186:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58185:14:8" + }, + "scope": 4622, + "src": "58087:377:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4333, + "nodeType": "Block", + "src": "58889:123:8", + "statements": [ + { + "assignments": [ + 4318 + ], + "declarations": [ + { + "constant": false, + "id": 4318, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4334, + "src": "58895:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4317, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "58895:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4326, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", + "id": 4322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58935:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + "value": "account.spending.limit" + }, + { + "argumentTypes": null, + "id": 4323, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4312, + "src": "58961:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4320, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "58918:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "58918:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58918:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4319, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "58908:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58908:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "58895:75:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4330, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4318, + "src": "59004:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4327, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4310, + "src": "58983:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "58983:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "58983:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58983:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4316, + "id": 4332, + "nodeType": "Return", + "src": "58976:31:8" + } + ] + }, + "documentation": "@notice Get the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"limit\" : \"Returns the account spending limit amount\"}", + "id": 4334, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4310, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4334, + "src": "58818:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4309, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "58818:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4312, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4334, + "src": "58837:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "58837:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58817:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4315, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 4334, + "src": "58877:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "58877:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58876:12:8" + }, + "scope": 4622, + "src": "58785:227:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4399, + "nodeType": "Block", + "src": "59712:887:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4347, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "59846:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4348, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "59852:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4346, + "name": "updateAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "59818:27:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 4349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59818:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59868:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4345, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "59810:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59810:109:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4352, + "nodeType": "ExpressionStatement", + "src": "59810:109:8" + }, + { + "assignments": [ + 4354 + ], + "declarations": [ + { + "constant": false, + "id": 4354, + "name": "updatedAmount", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59926:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4353, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "59926:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4362, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4360, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4340, + "src": "59991:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4356, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "59972:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4357, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "59978:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4355, + "name": "getAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4487, + "src": "59947:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59947:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "59947:43:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59947:51:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "59926:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4365, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "60128:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4366, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60134:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4364, + "name": "getAccountSpendingLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4334, + "src": "60104:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60104:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4368, + "name": "updatedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "60146:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60104:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e742063616e6e6f742065786365656420697473206461696c79207370656e64206c696d69742e", + "id": 4370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60167:53:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", + "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" + }, + "value": "Error: Account cannot exceed its daily spend limit." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", + "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" + } + ], + "id": 4363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "60089:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60089:132:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4372, + "nodeType": "ExpressionStatement", + "src": "60089:132:8" + }, + { + "assignments": [ + 4374 + ], + "declarations": [ + { + "constant": false, + "id": 4374, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "60291:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4373, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "60291:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4386, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", + "id": 4378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60331:25:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + "value": "account.spending.amount" + }, + { + "argumentTypes": null, + "id": 4379, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60358:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4381, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "60392:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4382, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60398:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4380, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4274, + "src": "60367:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60367:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4376, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "60314:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "60314:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60314:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4375, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "60304:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60304:104:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "60291:117:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4391, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4374, + "src": "60443:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4392, + "name": "updatedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "60447:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4388, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "60422:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4389, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "60422:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "60422:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60422:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60469:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "60414:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60414:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4396, + "nodeType": "ExpressionStatement", + "src": "60414:162:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4397, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60590:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4344, + "id": 4398, + "nodeType": "Return", + "src": "60583:11:8" + } + ] + }, + "documentation": "@notice Set the account spending amount for the daily period\n@dev | Each account has it's own daily spending limit\n@dev | This transaction will throw if the new spending amount is greater than the limit\n@dev | This method is called in the `transfer()` and `transferFrom()` methods\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param amount Set the amount spent for the daily period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4400, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4341, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4336, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59631:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4335, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "59631:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4338, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59650:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4337, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "59650:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4340, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59667:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4339, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "59667:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59630:49:8" + }, + "payable": false, + "returnParameters": { + "id": 4344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4343, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59698:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4342, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "59698:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59697:14:8" + }, + "scope": 4622, + "src": "59597:1002:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4456, + "nodeType": "Block", + "src": "61159:398:8", + "statements": [ + { + "assignments": [ + 4410 + ], + "declarations": [ + { + "constant": false, + "id": 4410, + "name": "begDate", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61165:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4409, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "61165:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4415, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4412, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4402, + "src": "61205:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4413, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4404, + "src": "61211:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4411, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4274, + "src": "61180:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61180:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "61165:54:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4416, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4410, + "src": "61229:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 4417, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "61239:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61229:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4454, + "nodeType": "Block", + "src": "61276:277:8", + "statements": [ + { + "assignments": [ + 4423 + ], + "declarations": [ + { + "constant": false, + "id": 4423, + "name": "duration", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61284:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4422, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "61284:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4425, + "initialValue": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 4424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61300:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "nodeType": "VariableDeclarationStatement", + "src": "61284:21:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4428, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4402, + "src": "61381:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4429, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4404, + "src": "61387:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4445, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4423, + "src": "61454:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 4441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61446:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4438, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4423, + "src": "61432:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4434, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4410, + "src": "61418:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4432, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "61410:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "61410:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61410:16:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4436, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61409:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "61409:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61409:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "61409:36:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61409:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4443, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61408:41:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "61408:45:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61408:55:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4430, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4410, + "src": "61396:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "61396:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61396:68:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4427, + "name": "setAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4248, + "src": "61356:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 4448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61356:109:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61475:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4426, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "61339:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61339:187:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4451, + "nodeType": "ExpressionStatement", + "src": "61339:187:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61542:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4408, + "id": 4453, + "nodeType": "Return", + "src": "61535:11:8" + } + ] + }, + "id": 4455, + "nodeType": "IfStatement", + "src": "61225:328:8", + "trueBody": { + "id": 4421, + "nodeType": "Block", + "src": "61244:26:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61259:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4408, + "id": 4420, + "nodeType": "Return", + "src": "61252:11:8" + } + ] + } + } + ] + }, + "documentation": "@notice Low-level API to ensure the account spending period is always current\n@dev | This method is internally called by `setAccountSpendingAmount()` to ensure\nspending period is always the most current daily period.\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4457, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updateAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4402, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61091:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4401, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "61091:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4404, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61110:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "61110:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61090:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4407, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61145:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4406, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "61145:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61144:14:8" + }, + "scope": 4622, + "src": "61054:503:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4486, + "nodeType": "Block", + "src": "62021:165:8", + "statements": [ + { + "assignments": [ + 4467 + ], + "declarations": [ + { + "constant": false, + "id": 4467, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4487, + "src": "62027:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4466, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "62027:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4479, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", + "id": 4471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "62067:25:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + "value": "account.spending.amount" + }, + { + "argumentTypes": null, + "id": 4472, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4461, + "src": "62094:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4474, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4459, + "src": "62128:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4475, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4461, + "src": "62134:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4473, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4274, + "src": "62103:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62103:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4469, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "62050:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "62050:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62050:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4468, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "62040:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62040:104:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62027:117:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4483, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4467, + "src": "62178:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4480, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4459, + "src": "62157:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4481, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "62157:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "62157:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62157:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4465, + "id": 4485, + "nodeType": "Return", + "src": "62150:31:8" + } + ] + }, + "documentation": "@notice Return the amount spent during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount spent by the account during the current period\"}", + "id": 4487, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4462, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4459, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4487, + "src": "61949:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4458, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "61949:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4461, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4487, + "src": "61968:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "61968:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61948:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4464, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4487, + "src": "62008:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4463, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "62008:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62007:13:8" + }, + "scope": 4622, + "src": "61915:271:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4507, + "nodeType": "Block", + "src": "62669:101:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4502, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4489, + "src": "62750:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4503, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4491, + "src": "62756:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4501, + "name": "getAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4487, + "src": "62725:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62725:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4497, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4489, + "src": "62706:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4498, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4491, + "src": "62712:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4496, + "name": "getAccountSpendingLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4334, + "src": "62682:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62682:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "62682:42:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62682:83:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4495, + "id": 4506, + "nodeType": "Return", + "src": "62675:90:8" + } + ] + }, + "documentation": "@notice Return the amount remaining during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}", + "id": 4508, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingRemaining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4492, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4489, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4508, + "src": "62589:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4488, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "62589:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4491, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4508, + "src": "62608:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4490, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "62608:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62588:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4495, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4494, + "name": "remainingLimit", + "nodeType": "VariableDeclaration", + "scope": 4508, + "src": "62648:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4493, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "62648:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62647:21:8" + }, + "scope": 4622, + "src": "62552:218:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4541, + "nodeType": "Block", + "src": "63363:207:8", + "statements": [ + { + "assignments": [ + 4520 + ], + "declarations": [ + { + "constant": false, + "id": 4520, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63369:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4519, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "63369:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4528, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66782e7573642e72617465", + "id": 4524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63409:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + "value": "fx.usd.rate" + }, + { + "argumentTypes": null, + "id": 4525, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4512, + "src": "63424:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4522, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "63392:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "63392:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63392:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4521, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "63382:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63382:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63369:65:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4533, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4520, + "src": "63476:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4534, + "name": "bpsRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4514, + "src": "63480:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4530, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4510, + "src": "63455:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4531, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "63455:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "63455:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63455:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63496:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4529, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "63440:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63440:107:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4538, + "nodeType": "ExpressionStatement", + "src": "63440:107:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63561:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4518, + "id": 4540, + "nodeType": "Return", + "src": "63554:11:8" + } + ] + }, + "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 4542, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFxUSDBPSRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4510, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63281:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4509, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "63281:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4512, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63300:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4511, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "63300:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4514, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63317:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4513, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "63317:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63280:50:8" + }, + "payable": false, + "returnParameters": { + "id": 4518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4517, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63349:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4516, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "63349:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63348:14:8" + }, + "scope": 4622, + "src": "63256:314:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4567, + "nodeType": "Block", + "src": "63976:113:8", + "statements": [ + { + "assignments": [ + 4552 + ], + "declarations": [ + { + "constant": false, + "id": 4552, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4568, + "src": "63982:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4551, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "63982:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4560, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66782e7573642e72617465", + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64022:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + "value": "fx.usd.rate" + }, + { + "argumentTypes": null, + "id": 4557, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4546, + "src": "64037:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4554, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "64005:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "64005:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64005:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4553, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "63995:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63995:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63982:65:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4564, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4552, + "src": "64081:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4561, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4544, + "src": "64060:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4562, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "64060:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "64060:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64060:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4550, + "id": 4566, + "nodeType": "Return", + "src": "64053:31:8" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount in basis points\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", + "id": 4568, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDBPSRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4544, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4568, + "src": "63903:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4543, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "63903:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4546, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4568, + "src": "63922:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4545, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "63922:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63902:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4549, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 4568, + "src": "63962:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4548, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "63962:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63961:14:8" + }, + "scope": 4622, + "src": "63878:211:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4620, + "nodeType": "Block", + "src": "64558:330:8", + "statements": [ + { + "assignments": [ + 4580 + ], + "declarations": [ + { + "constant": false, + "id": 4580, + "name": "usdDecimals", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64564:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4579, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64564:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4585, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4582, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4570, + "src": "64600:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "hexValue": "55534478", + "id": 4583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64606:6:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", + "typeString": "literal_string \"USDx\"" + }, + "value": "USDx" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", + "typeString": "literal_string \"USDx\"" + } + ], + "id": 4581, + "name": "getTokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2512, + "src": "64583:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64583:30:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64564:49:8" + }, + { + "assignments": [ + 4587 + ], + "declarations": [ + { + "constant": false, + "id": 4587, + "name": "fxDecimals", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64619:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4586, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64619:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4592, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4589, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4570, + "src": "64654:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4590, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4572, + "src": "64660:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4588, + "name": "getTokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2512, + "src": "64637:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64637:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64619:50:8" + }, + { + "assignments": [ + 4594 + ], + "declarations": [ + { + "constant": false, + "id": 4594, + "name": "usdAmount", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64743:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4593, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64743:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4617, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64846:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 4614, + "name": "fxDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4587, + "src": "64850:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64846:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64824:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 4608, + "name": "usdDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4580, + "src": "64828:11:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64824:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 4603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64812:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4598, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4570, + "src": "64791:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4599, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4572, + "src": "64797:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4597, + "name": "getFxUSDBPSRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4568, + "src": "64775:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64775:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4595, + "name": "fxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4574, + "src": "64762:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "64762:12:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64762:45:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "64762:49:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64762:56:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4605, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64761:58:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "64761:62:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64761:79:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4611, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64760:81:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "64760:85:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64760:101:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64743:118:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 4618, + "name": "usdAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4594, + "src": "64874:9:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4578, + "id": 4619, + "nodeType": "Return", + "src": "64867:16:8" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"amount\" : \"Returns the foreign currency amount in USD\"}", + "id": 4621, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4570, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64471:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4569, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "64471:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4572, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64490:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4571, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "64490:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4574, + "name": "fxAmount", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64507:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4573, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64507:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64470:51:8" + }, + "payable": false, + "returnParameters": { + "id": 4578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4577, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64545:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4576, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64545:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64544:13:8" + }, + "scope": 4622, + "src": "64447:441:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 4623, + "src": "900:63992:8" + } + ], + "src": "0:64893:8" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "exportedSymbols": { + "TokenIOLib": [ + 4622 + ] + }, + "id": 4623, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1638, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "file": "./SafeMath.sol", + "id": 1639, + "nodeType": "ImportDirective", + "scope": 4623, + "sourceUnit": 286, + "src": "842:24:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1640, + "nodeType": "ImportDirective", + "scope": 4623, + "sourceUnit": 5242, + "src": "867:30:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 4622, + "linearizedBaseContracts": [ + 4622 + ], + "name": "TokenIOLib", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1643, + "libraryName": { + "contractScope": null, + "id": 1641, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 285, + "src": "1020:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$285", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1014:24:8", + "typeName": { + "id": 1642, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1033:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "canonicalName": "TokenIOLib.Data", + "id": 1646, + "members": [ + { + "constant": false, + "id": 1645, + "name": "Storage", + "nodeType": "VariableDeclaration", + "scope": 1646, + "src": "1134:22:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + }, + "typeName": { + "contractScope": null, + "id": 1644, + "name": "TokenIOStorage", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5241, + "src": "1134:14:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Data", + "nodeType": "StructDefinition", + "scope": 4622, + "src": "1116:45:8", + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "@notice Not using `Log` prefix for events to be consistent with ERC20 named events;", + "id": 1654, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1648, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1654, + "src": "1270:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1647, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1270:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1650, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1654, + "src": "1293:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1649, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1293:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1652, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1654, + "src": "1318:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1651, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1318:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1269:61:8" + }, + "src": "1255:76:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1664, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 1663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1656, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1348:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1655, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1348:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1658, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1365:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1657, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1365:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1660, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1390:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1659, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1390:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1662, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1403:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1661, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1403:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1347:74:8" + }, + "src": "1334:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1674, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 1673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1666, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "1440:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1665, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1440:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1668, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "1457:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1667, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1457:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1670, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "1482:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1669, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1482:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1672, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "1495:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1671, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1495:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1439:74:8" + }, + "src": "1425:89:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1686, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1676, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1532:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1675, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1532:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1678, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1549:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1549:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1680, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1571:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1679, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1571:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1682, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1591:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1681, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1591:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1684, + "indexed": false, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1604:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1683, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1604:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1531:84:8" + }, + "src": "1517:99:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1694, + "name": "KYCApproval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1688, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "1637:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1687, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1637:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1690, + "indexed": false, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "1662:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1689, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1662:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1692, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "1675:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1691, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1675:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1636:57:8" + }, + "src": "1619:75:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1702, + "name": "AccountStatus", + "nodeType": "EventDefinition", + "parameters": { + "id": 1701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1696, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "1717:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1717:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1698, + "indexed": false, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "1742:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1697, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1742:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1700, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "1755:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1699, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1755:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1716:57:8" + }, + "src": "1697:77:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1716, + "name": "FxSwap", + "nodeType": "EventDefinition", + "parameters": { + "id": 1715, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1704, + "indexed": false, + "name": "tokenASymbol", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1790:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1703, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1790:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1706, + "indexed": false, + "name": "tokenBSymbol", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1810:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1705, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1810:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1708, + "indexed": false, + "name": "tokenAValue", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1830:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1707, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1830:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1710, + "indexed": false, + "name": "tokenBValue", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1847:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1709, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1847:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1712, + "indexed": false, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1865:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1711, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1865:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1714, + "indexed": false, + "name": "transactionHash", + "nodeType": "VariableDeclaration", + "scope": 1716, + "src": "1882:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1713, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1882:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1789:117:8" + }, + "src": "1777:130:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1722, + "name": "AccountForward", + "nodeType": "EventDefinition", + "parameters": { + "id": 1721, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1718, + "indexed": true, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 1722, + "src": "1931:31:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1717, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1931:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1720, + "indexed": true, + "name": "forwardedAccount", + "nodeType": "VariableDeclaration", + "scope": 1722, + "src": "1964:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1719, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1964:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1930:67:8" + }, + "src": "1910:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1728, + "name": "NewAuthority", + "nodeType": "EventDefinition", + "parameters": { + "id": 1727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1724, + "indexed": true, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 1728, + "src": "2020:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1723, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2020:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1726, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1728, + "src": "2047:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1725, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2047:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2019:46:8" + }, + "src": "2001:65:8" + }, + { + "body": { + "id": 1761, + "nodeType": "Block", + "src": "2556:275:8", + "statements": [ + { + "assignments": [ + 1738 + ], + "declarations": [ + { + "constant": false, + "id": 1738, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1762, + "src": "2562:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1737, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2562:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1748, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d65", + "id": 1742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2602:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + "value": "token.name" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1744, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "2624:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2616:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1740, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "2585:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1739, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "2575:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2575:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2562:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1753, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "2675:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1754, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1732, + "src": "2679:9:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1750, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1730, + "src": "2652:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1751, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "2652:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "2652:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2652:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2697:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1749, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2637:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2637:172:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1758, + "nodeType": "ExpressionStatement", + "src": "2637:172:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2822:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1736, + "id": 1760, + "nodeType": "Return", + "src": "2815:11:8" + } + ] + }, + "documentation": "@notice Set the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenName Name of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1762, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1730, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1762, + "src": "2487:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1729, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "2487:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1732, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 1762, + "src": "2506:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1731, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2506:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2486:37:8" + }, + "payable": false, + "returnParameters": { + "id": 1736, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1735, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1762, + "src": "2542:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1734, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2542:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2541:14:8" + }, + "scope": 4622, + "src": "2465:366:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1795, + "nodeType": "Block", + "src": "3331:279:8", + "statements": [ + { + "assignments": [ + 1772 + ], + "declarations": [ + { + "constant": false, + "id": 1772, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1796, + "src": "3337:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1771, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3337:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1782, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e73796d626f6c", + "id": 1776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3377:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + "value": "token.symbol" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1778, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "3401:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3393:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3393:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1774, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "3360:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3360:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3360:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1773, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "3350:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3350:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3337:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1787, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1772, + "src": "3452:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1788, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1766, + "src": "3456:11:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1784, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1764, + "src": "3429:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1785, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "3429:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "3429:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3429:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3476:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1783, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "3414:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3414:174:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1792, + "nodeType": "ExpressionStatement", + "src": "3414:174:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3601:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1770, + "id": 1794, + "nodeType": "Return", + "src": "3594:11:8" + } + ] + }, + "documentation": "@notice Set the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenSymbol Symbol of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1796, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenSymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1764, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1796, + "src": "3260:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1763, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "3260:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1766, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 1796, + "src": "3279:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1765, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3279:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3259:39:8" + }, + "payable": false, + "returnParameters": { + "id": 1770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1769, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1796, + "src": "3317:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1768, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3317:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3316:14:8" + }, + "scope": 4622, + "src": "3236:374:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1829, + "nodeType": "Block", + "src": "4122:273:8", + "statements": [ + { + "assignments": [ + 1806 + ], + "declarations": [ + { + "constant": false, + "id": 1806, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1830, + "src": "4128:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1805, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4128:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1816, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e746c61", + "id": 1810, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4168:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + "value": "token.tla" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1812, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "4189:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4181:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4181:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1808, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "4151:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4151:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4151:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1807, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "4141:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4141:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4128:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1821, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1806, + "src": "4240:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1822, + "name": "tokenTLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1800, + "src": "4244:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1818, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1798, + "src": "4217:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1819, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "4217:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "4217:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4217:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4261:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1817, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4202:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4202:171:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1826, + "nodeType": "ExpressionStatement", + "src": "4202:171:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4386:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1804, + "id": 1828, + "nodeType": "Return", + "src": "4379:11:8" + } + ] + }, + "documentation": "@notice Set the token three letter abreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenTLA TLA of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1830, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenTLA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1798, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1830, + "src": "4054:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1797, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "4054:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1800, + "name": "tokenTLA", + "nodeType": "VariableDeclaration", + "scope": 1830, + "src": "4073:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1799, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4073:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4053:36:8" + }, + "payable": false, + "returnParameters": { + "id": 1804, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1803, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1830, + "src": "4108:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1802, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4108:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4107:14:8" + }, + "scope": 4622, + "src": "4033:362:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1863, + "nodeType": "Block", + "src": "4944:281:8", + "statements": [ + { + "assignments": [ + 1840 + ], + "declarations": [ + { + "constant": false, + "id": 1840, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1864, + "src": "4950:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1839, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4950:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1850, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e76657273696f6e", + "id": 1844, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4990:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + "value": "token.version" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1846, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "5015:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5007:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5007:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1842, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "4973:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4973:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4973:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1841, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "4963:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4950:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1855, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "5066:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1856, + "name": "tokenVersion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1834, + "src": "5070:12:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1852, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1832, + "src": "5043:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "5043:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "5043:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5043:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5091:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1851, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "5028:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5028:175:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1860, + "nodeType": "ExpressionStatement", + "src": "5028:175:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5216:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1838, + "id": 1862, + "nodeType": "Return", + "src": "5209:11:8" + } + ] + }, + "documentation": "@notice Set the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1864, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenVersion", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1835, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1832, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1864, + "src": "4872:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1831, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "4872:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1834, + "name": "tokenVersion", + "nodeType": "VariableDeclaration", + "scope": 1864, + "src": "4891:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1833, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4891:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4871:40:8" + }, + "payable": false, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1837, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1864, + "src": "4930:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1836, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4930:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4929:14:8" + }, + "scope": 4622, + "src": "4847:378:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1897, + "nodeType": "Block", + "src": "6053:276:8", + "statements": [ + { + "assignments": [ + 1876 + ], + "declarations": [ + { + "constant": false, + "id": 1876, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "6059:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1875, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6059:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1884, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e646563696d616c73", + "id": 1880, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6099:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + "value": "token.decimals" + }, + { + "argumentTypes": null, + "id": 1881, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1868, + "src": "6117:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1878, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "6082:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6082:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6082:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1877, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "6072:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6072:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6059:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1889, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1876, + "src": "6169:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1890, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1870, + "src": "6173:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1886, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1866, + "src": "6148:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1887, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "6148:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "6148:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6148:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6195:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1885, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6133:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6133:174:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1894, + "nodeType": "ExpressionStatement", + "src": "6133:174:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6320:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1874, + "id": 1896, + "nodeType": "Return", + "src": "6313:11:8" + } + ] + }, + "documentation": "@notice Set the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@dev This method is not set to the address of the contract, rather is maped to currency\n@dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param tokenDecimals Decimal representation of the token contract unit amount\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1898, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenDecimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1866, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "5965:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1865, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "5965:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1868, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "5984:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1867, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5984:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1870, + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "6001:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1869, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6001:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5964:56:8" + }, + "payable": false, + "returnParameters": { + "id": 1874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1873, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "6039:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1872, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6039:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6038:14:8" + }, + "scope": 4622, + "src": "5939:390:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1931, + "nodeType": "Block", + "src": "6889:267:8", + "statements": [ + { + "assignments": [ + 1908 + ], + "declarations": [ + { + "constant": false, + "id": 1908, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1932, + "src": "6895:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1907, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6895:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1918, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 1912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6935:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1914, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "6954:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6946:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6946:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1910, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "6918:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6918:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6918:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1909, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "6908:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6908:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6895:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1923, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1908, + "src": "7003:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1924, + "name": "feeBPS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1902, + "src": "7007:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1920, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1900, + "src": "6982:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1921, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "6982:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "6982:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6982:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7022:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1919, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "6967:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6967:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1928, + "nodeType": "ExpressionStatement", + "src": "6967:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7147:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1906, + "id": 1930, + "nodeType": "Return", + "src": "7140:11:8" + } + ] + }, + "documentation": "@notice Set basis point fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeBPS Basis points fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1932, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeBPS", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1903, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1900, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1932, + "src": "6825:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1899, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "6825:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1902, + "name": "feeBPS", + "nodeType": "VariableDeclaration", + "scope": 1932, + "src": "6844:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1901, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6844:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6824:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1905, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1932, + "src": "6875:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1904, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6875:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6874:14:8" + }, + "scope": 4622, + "src": "6806:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1965, + "nodeType": "Block", + "src": "7707:267:8", + "statements": [ + { + "assignments": [ + 1942 + ], + "declarations": [ + { + "constant": false, + "id": 1942, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1966, + "src": "7713:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1941, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7713:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1952, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 1946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7753:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1948, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "7772:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7764:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7764:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1944, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "7736:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7736:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7736:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1943, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "7726:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7726:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7713:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1957, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7821:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1958, + "name": "feeMin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1936, + "src": "7825:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1954, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1934, + "src": "7800:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1955, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "7800:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "7800:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7800:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7840:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1953, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "7785:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7785:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1962, + "nodeType": "ExpressionStatement", + "src": "7785:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7965:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1940, + "id": 1964, + "nodeType": "Return", + "src": "7958:11:8" + } + ] + }, + "documentation": "@notice Set minimum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMin Minimum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1966, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1966, + "src": "7643:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1933, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "7643:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1936, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 1966, + "src": "7662:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1935, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7662:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7642:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1940, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1939, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1966, + "src": "7693:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1938, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7693:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7692:14:8" + }, + "scope": 4622, + "src": "7624:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1999, + "nodeType": "Block", + "src": "8525:267:8", + "statements": [ + { + "assignments": [ + 1976 + ], + "declarations": [ + { + "constant": false, + "id": 1976, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2000, + "src": "8531:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1975, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8531:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1986, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 1980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8571:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1982, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "8590:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8582:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8582:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1978, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "8554:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8554:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8554:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1977, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "8544:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8544:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8531:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1991, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "8639:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1992, + "name": "feeMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1970, + "src": "8643:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1988, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1968, + "src": "8618:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1989, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "8618:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "8618:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8618:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1994, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8658:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1987, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "8603:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8603:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1996, + "nodeType": "ExpressionStatement", + "src": "8603:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8783:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1974, + "id": 1998, + "nodeType": "Return", + "src": "8776:11:8" + } + ] + }, + "documentation": "@notice Set maximum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMax Maximum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2000, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMax", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1968, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2000, + "src": "8461:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1967, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "8461:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1970, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 2000, + "src": "8480:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1969, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8480:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8460:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1974, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1973, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2000, + "src": "8511:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1972, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8511:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8510:14:8" + }, + "scope": 4622, + "src": "8442:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2033, + "nodeType": "Block", + "src": "9340:269:8", + "statements": [ + { + "assignments": [ + 2010 + ], + "declarations": [ + { + "constant": false, + "id": 2010, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2034, + "src": "9346:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2009, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9346:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2020, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9386:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2016, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "9406:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 2015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9398:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9398:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2012, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "9369:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9369:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9369:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2011, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "9359:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9359:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9346:67:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2025, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "9455:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2026, + "name": "feeFlat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2004, + "src": "9459:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2022, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2002, + "src": "9434:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2023, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "9434:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "9434:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 2027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9434:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9475:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2021, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "9419:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9419:168:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2030, + "nodeType": "ExpressionStatement", + "src": "9419:168:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9600:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2008, + "id": 2032, + "nodeType": "Return", + "src": "9593:11:8" + } + ] + }, + "documentation": "@notice Set flat fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeFlat Flat fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2034, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeFlat", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2002, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2034, + "src": "9275:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2001, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "9275:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2004, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 2034, + "src": "9294:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2003, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9294:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9274:33:8" + }, + "payable": false, + "returnParameters": { + "id": 2008, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2007, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2034, + "src": "9326:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2006, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9326:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9325:14:8" + }, + "scope": 4622, + "src": "9255:354:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2067, + "nodeType": "Block", + "src": "10190:268:8", + "statements": [ + { + "assignments": [ + 2044 + ], + "declarations": [ + { + "constant": false, + "id": 2044, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "10196:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2043, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10196:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2054, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d7367", + "id": 2048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10236:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + "value": "fee.msg" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2050, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "10255:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 2049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10247:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10247:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2046, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "10219:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10219:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10219:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2045, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "10209:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10209:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10196:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2059, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2044, + "src": "10305:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2060, + "name": "feeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2038, + "src": "10309:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2056, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2036, + "src": "10283:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2057, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "10283:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 5026, + "src": "10283:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,bytes memory) external returns (bool)" + } + }, + "id": 2061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10324:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2055, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "10268:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10268:168:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2064, + "nodeType": "ExpressionStatement", + "src": "10268:168:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10449:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2042, + "id": 2066, + "nodeType": "Return", + "src": "10442:11:8" + } + ] + }, + "documentation": "@notice Set fee message for contract interface\n@dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n@dev Fee messages vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMsg Fee message included in a transaction with fees\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2068, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMsg", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "10125:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2035, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "10125:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2038, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "10144:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2037, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10144:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10124:33:8" + }, + "payable": false, + "returnParameters": { + "id": 2042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2041, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "10176:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2040, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10176:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10175:14:8" + }, + "scope": 4622, + "src": "10106:352:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2101, + "nodeType": "Block", + "src": "11123:279:8", + "statements": [ + { + "assignments": [ + 2078 + ], + "declarations": [ + { + "constant": false, + "id": 2078, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2102, + "src": "11129:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2077, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11129:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2088, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6163636f756e74", + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11169:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + "value": "fee.account" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2084, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "11192:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11184:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11184:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2080, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "11152:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11152:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11152:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2079, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "11142:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11142:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11129:70:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2093, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2078, + "src": "11244:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2094, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2072, + "src": "11248:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2090, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2070, + "src": "11220:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2091, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "11220:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4966, + "src": "11220:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11220:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11268:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2089, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "11205:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11205:175:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2098, + "nodeType": "ExpressionStatement", + "src": "11205:175:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11393:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2076, + "id": 2100, + "nodeType": "Return", + "src": "11386:11:8" + } + ] + }, + "documentation": "@notice Set fee contract for a contract interface\n@dev feeContract must be a TokenIOFeeContract storage approved contract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@dev | This must be called directly from the interface contract\n@param self Internal storage proxying TokenIOStorage contract\n@param feeContract Set the fee contract for `this` contract address interface\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2102, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2073, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2070, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2102, + "src": "11051:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2069, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "11051:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2072, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 2102, + "src": "11070:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11070:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11050:40:8" + }, + "payable": false, + "returnParameters": { + "id": 2076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2075, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2102, + "src": "11109:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2074, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11109:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11108:14:8" + }, + "scope": 4622, + "src": "11027:375:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2135, + "nodeType": "Block", + "src": "12037:280:8", + "statements": [ + { + "assignments": [ + 2112 + ], + "declarations": [ + { + "constant": false, + "id": 2112, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2136, + "src": "12043:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2111, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12043:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2120, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d657370616365", + "id": 2116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12083:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + "value": "token.namespace" + }, + { + "argumentTypes": null, + "id": 2117, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2106, + "src": "12102:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2114, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "12066:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12066:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12066:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2113, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "12056:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12056:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12043:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2125, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "12157:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2127, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "12169:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12161:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12161:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2122, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2104, + "src": "12133:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "12133:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4966, + "src": "12133:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12133:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12183:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2121, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "12118:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12118:177:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2132, + "nodeType": "ExpressionStatement", + "src": "12118:177:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12308:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2110, + "id": 2134, + "nodeType": "Return", + "src": "12301:11:8" + } + ] + }, + "documentation": "@notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n@dev | This should only be called once from a token interface contract;\n@dev | This method has an `internal` view\n@dev | This method is experimental and may be deprecated/refactored\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2136, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2104, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2136, + "src": "11969:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2103, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "11969:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2106, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2136, + "src": "11988:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11988:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11968:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2109, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2136, + "src": "12023:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2108, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12023:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12022:14:8" + }, + "scope": 4622, + "src": "11942:375:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2180, + "nodeType": "Block", + "src": "13115:435:8", + "statements": [ + { + "assignments": [ + 2150 + ], + "declarations": [ + { + "constant": false, + "id": 2150, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13123:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2149, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13123:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2161, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e6b7963", + "id": 2154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13163:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + "value": "account.kyc" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2156, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "13198:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2157, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "13204:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2155, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "13178:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13178:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2152, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "13146:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13146:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13146:67:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2151, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "13136:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13136:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13123:91:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2166, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2150, + "src": "13260:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2167, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2142, + "src": "13264:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2163, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "13239:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "13239:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "13239:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 2168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13239:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13285:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2162, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "13222:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13222:177:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "13222:177:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2173, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "13494:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2174, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2142, + "src": "13503:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2175, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2144, + "src": "13515:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2172, + "name": "KYCApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1694, + "src": "13482:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,bool,string memory)" + } + }, + "id": 2176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13482:44:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2177, + "nodeType": "EmitStatement", + "src": "13477:49:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13541:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2148, + "id": 2179, + "nodeType": "Return", + "src": "13534:11:8" + } + ] + }, + "documentation": "@notice Set the KYC approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isApproved Boolean (true/false) KYC approval status for a given account\n@param issuerFirm Firm name for issuing KYC approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2181, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setKYCApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2145, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2138, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13011:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2137, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "13011:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13030:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2139, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13030:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2142, + "name": "isApproved", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13047:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2141, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13047:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2144, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13064:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2143, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "13064:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13010:72:8" + }, + "payable": false, + "returnParameters": { + "id": 2148, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2147, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "13101:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2146, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13101:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13100:14:8" + }, + "scope": 4622, + "src": "12987:563:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2225, + "nodeType": "Block", + "src": "14345:419:8", + "statements": [ + { + "assignments": [ + 2195 + ], + "declarations": [ + { + "constant": false, + "id": 2195, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14351:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2194, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "14351:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2206, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e616c6c6f776564", + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14391:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + "value": "account.allowed" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2201, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2183, + "src": "14430:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2202, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2185, + "src": "14436:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2200, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "14410:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14410:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2197, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "14374:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14374:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14374:71:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2196, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "14364:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14351:95:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2211, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2195, + "src": "14488:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2212, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "14492:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2208, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2183, + "src": "14467:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2209, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "14467:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "14467:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 2213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14467:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14510:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2207, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "14452:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14452:170:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2216, + "nodeType": "ExpressionStatement", + "src": "14452:170:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2218, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2185, + "src": "14711:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2219, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "14720:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2220, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2189, + "src": "14731:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2217, + "name": "AccountStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1702, + "src": "14697:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,bool,string memory)" + } + }, + "id": 2221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14697:45:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2222, + "nodeType": "EmitStatement", + "src": "14692:50:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14755:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2193, + "id": 2224, + "nodeType": "Return", + "src": "14748:11:8" + } + ] + }, + "documentation": "@notice Set the global approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isAllowed Boolean (true/false) global status for a given account\n@param issuerFirm Firm name for issuing approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2226, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2190, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2183, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14242:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2182, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "14242:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2185, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14261:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2184, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14261:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2187, + "name": "isAllowed", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14278:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2186, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14278:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2189, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14294:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2188, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14294:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14241:71:8" + }, + "payable": false, + "returnParameters": { + "id": 2193, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2192, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2226, + "src": "14331:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2191, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14331:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14330:14:8" + }, + "scope": 4622, + "src": "14216:548:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2259, + "nodeType": "Block", + "src": "15649:289:8", + "statements": [ + { + "assignments": [ + 2238 + ], + "declarations": [ + { + "constant": false, + "id": 2238, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15655:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2237, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15655:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2246, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6d61737465722e6163636f756e74", + "id": 2242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15695:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + "value": "master.account" + }, + { + "argumentTypes": null, + "id": 2243, + "name": "forwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2232, + "src": "15713:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2240, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "15678:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15678:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15678:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2239, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "15668:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15668:63:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15655:76:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2251, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2238, + "src": "15776:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2252, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "15780:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2248, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2228, + "src": "15752:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "15752:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4966, + "src": "15752:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15752:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15804:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "15737:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15737:179:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2256, + "nodeType": "ExpressionStatement", + "src": "15737:179:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15929:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2236, + "id": 2258, + "nodeType": "Return", + "src": "15922:11:8" + } + ] + }, + "documentation": "@notice Set a forwarded address for an account.\n@dev | This method has an `internal` view\n@dev | Forwarded accounts must be set by an authority in case of account recovery;\n@dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n@dev | All transactions will be logged under the same KYC information as the original account holder;\n@param self Internal storage proxying TokenIOStorage contract\n@param originalAccount Original registered Ethereum address of the account holder\n@param forwardedAccount Forwarded Ethereum address of the account holder\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2260, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2233, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2228, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15547:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2227, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "15547:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2230, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15566:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15566:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2232, + "name": "forwardedAccount", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15591:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15591:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15546:70:8" + }, + "payable": false, + "returnParameters": { + "id": 2236, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2235, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2260, + "src": "15635:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2234, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15635:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15634:14:8" + }, + "scope": 4622, + "src": "15518:420:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2297, + "nodeType": "Block", + "src": "16517:242:8", + "statements": [ + { + "assignments": [ + 2270 + ], + "declarations": [ + { + "constant": false, + "id": 2270, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16523:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2269, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "16523:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2278, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6d61737465722e6163636f756e74", + "id": 2274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16563:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + "value": "master.account" + }, + { + "argumentTypes": null, + "id": 2275, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "16581:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2272, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "16546:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16546:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16546:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2271, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "16536:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16536:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16523:67:8" + }, + { + "assignments": [ + 2280 + ], + "declarations": [ + { + "constant": false, + "id": 2280, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16596:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16596:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2286, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2284, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "16646:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2281, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "16622:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2282, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "16622:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5180, + "src": "16622:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16622:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16596:53:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2287, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2280, + "src": "16659:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 2288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16678:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "16659:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2295, + "nodeType": "Block", + "src": "16726:29:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2293, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "16741:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2268, + "id": 2294, + "nodeType": "Return", + "src": "16734:14:8" + } + ] + }, + "id": 2296, + "nodeType": "IfStatement", + "src": "16655:100:8", + "trueBody": { + "id": 2292, + "nodeType": "Block", + "src": "16683:37:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2290, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2280, + "src": "16698:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2268, + "id": 2291, + "nodeType": "Return", + "src": "16691:22:8" + } + ] + } + } + ] + }, + "documentation": "@notice Get the original address for a forwarded account\n@dev | This method has an `internal` view\n@dev | Will return the registered account for the given forwarded account\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}", + "id": 2298, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2262, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16431:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2261, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "16431:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16450:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16450:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16430:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2267, + "name": "registeredAccount", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "16490:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16490:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16489:27:8" + }, + "scope": 4622, + "src": "16402:357:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2326, + "nodeType": "Block", + "src": "17258:143:8", + "statements": [ + { + "assignments": [ + 2308 + ], + "declarations": [ + { + "constant": false, + "id": 2308, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2327, + "src": "17266:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2307, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2319, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e6b7963", + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17306:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + "value": "account.kyc" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2314, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2300, + "src": "17341:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2315, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2302, + "src": "17347:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2313, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "17321:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17321:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2310, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "17289:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17289:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17289:67:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2309, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "17279:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17279:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17266:91:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2323, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2308, + "src": "17393:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2320, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2300, + "src": "17372:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2321, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "17372:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "17372:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 2324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17372:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2306, + "id": 2325, + "nodeType": "Return", + "src": "17365:31:8" + } + ] + }, + "documentation": "@notice Get KYC approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the KYC approval status for an account holder\" }", + "id": 2327, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getKYCApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2300, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2327, + "src": "17186:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2299, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "17186:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2302, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2327, + "src": "17205:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2301, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17205:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17185:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2306, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2305, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 2327, + "src": "17245:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2304, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17245:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17244:13:8" + }, + "scope": 4622, + "src": "17162:239:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2355, + "nodeType": "Block", + "src": "17908:143:8", + "statements": [ + { + "assignments": [ + 2337 + ], + "declarations": [ + { + "constant": false, + "id": 2337, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2356, + "src": "17914:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2336, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17914:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2348, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e616c6c6f776564", + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17954:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + "value": "account.allowed" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2343, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2329, + "src": "17993:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2344, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2331, + "src": "17999:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2342, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "17973:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17973:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2339, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "17937:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17937:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17937:71:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2338, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "17927:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17927:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17914:95:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2352, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2337, + "src": "18043:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2349, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2329, + "src": "18022:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "18022:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "18022:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18022:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2335, + "id": 2354, + "nodeType": "Return", + "src": "18015:31:8" + } + ] + }, + "documentation": "@notice Get global approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the global approval status for an account holder\" }", + "id": 2356, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2332, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2329, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2356, + "src": "17836:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2328, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "17836:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2331, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2356, + "src": "17855:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2330, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17855:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17835:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2334, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 2356, + "src": "17895:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2333, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17895:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17894:13:8" + }, + "scope": 4622, + "src": "17810:241:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2381, + "nodeType": "Block", + "src": "18535:120:8", + "statements": [ + { + "assignments": [ + 2366 + ], + "declarations": [ + { + "constant": false, + "id": 2366, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2382, + "src": "18541:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2365, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "18541:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2374, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d657370616365", + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18581:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + "value": "token.namespace" + }, + { + "argumentTypes": null, + "id": 2371, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2360, + "src": "18600:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2368, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "18564:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18564:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18564:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2367, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "18554:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18554:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18541:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2378, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2366, + "src": "18647:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2375, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2358, + "src": "18623:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2376, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "18623:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5180, + "src": "18623:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18623:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2364, + "id": 2380, + "nodeType": "Return", + "src": "18616:34:8" + } + ] + }, + "documentation": "@notice Get the contract interface address associated with token symbol\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }", + "id": 2382, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2358, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2382, + "src": "18451:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2357, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "18451:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2360, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2382, + "src": "18470:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2359, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "18470:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18450:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2363, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2382, + "src": "18510:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18510:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18509:25:8" + }, + "scope": 4622, + "src": "18424:231:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2407, + "nodeType": "Block", + "src": "19153:121:8", + "statements": [ + { + "assignments": [ + 2392 + ], + "declarations": [ + { + "constant": false, + "id": 2392, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2408, + "src": "19159:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2391, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19159:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2400, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d65", + "id": 2396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19199:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + "value": "token.name" + }, + { + "argumentTypes": null, + "id": 2397, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2386, + "src": "19213:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2394, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "19182:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19182:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19182:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2393, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "19172:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19172:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19159:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2404, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2392, + "src": "19266:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2401, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2384, + "src": "19243:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2402, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "19243:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "19243:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19243:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2390, + "id": 2406, + "nodeType": "Return", + "src": "19236:33:8" + } + ] + }, + "documentation": "@notice Get the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenName\" : \"Name of the token contract\"}", + "id": 2408, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2384, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2408, + "src": "19068:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2383, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "19068:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2386, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2408, + "src": "19087:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19087:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19067:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2390, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2389, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 2408, + "src": "19135:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2388, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "19135:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19134:18:8" + }, + "scope": 4622, + "src": "19046:228:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "19782:123:8", + "statements": [ + { + "assignments": [ + 2418 + ], + "declarations": [ + { + "constant": false, + "id": 2418, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "19788:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2417, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19788:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2426, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e73796d626f6c", + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19828:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + "value": "token.symbol" + }, + { + "argumentTypes": null, + "id": 2423, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2412, + "src": "19844:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2420, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "19811:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19811:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19811:49:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2419, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "19801:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19801:60:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19788:73:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2430, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2418, + "src": "19897:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2427, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2410, + "src": "19874:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2428, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "19874:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "19874:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19874:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2416, + "id": 2432, + "nodeType": "Return", + "src": "19867:33:8" + } + ] + }, + "documentation": "@notice Get the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenSymbol\" : \"Symbol of the token contract\"}", + "id": 2434, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2410, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "19695:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2409, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "19695:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2412, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "19714:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2411, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19714:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19694:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2416, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2415, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "19762:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2414, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "19762:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19761:20:8" + }, + "scope": 4622, + "src": "19671:234:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2459, + "nodeType": "Block", + "src": "20426:120:8", + "statements": [ + { + "assignments": [ + 2444 + ], + "declarations": [ + { + "constant": false, + "id": 2444, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2460, + "src": "20432:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2443, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "20432:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2452, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e746c61", + "id": 2448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20472:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + "value": "token.tla" + }, + { + "argumentTypes": null, + "id": 2449, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2438, + "src": "20485:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2446, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "20455:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20455:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20455:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2445, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "20445:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20445:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20432:70:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2456, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2444, + "src": "20538:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2453, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2436, + "src": "20515:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2454, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "20515:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "20515:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20515:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2442, + "id": 2458, + "nodeType": "Return", + "src": "20508:33:8" + } + ] + }, + "documentation": "@notice Get the token Three letter abbreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenTLA\" : \"TLA of the token contract\"}", + "id": 2460, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenTLA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2436, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2460, + "src": "20342:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2435, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "20342:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2438, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2460, + "src": "20361:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20361:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20341:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2441, + "name": "tokenTLA", + "nodeType": "VariableDeclaration", + "scope": 2460, + "src": "20409:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2440, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20409:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20408:17:8" + }, + "scope": 4622, + "src": "20321:225:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2485, + "nodeType": "Block", + "src": "21055:124:8", + "statements": [ + { + "assignments": [ + 2470 + ], + "declarations": [ + { + "constant": false, + "id": 2470, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2486, + "src": "21061:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2469, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21061:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2478, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e76657273696f6e", + "id": 2474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21101:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + "value": "token.version" + }, + { + "argumentTypes": null, + "id": 2475, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2464, + "src": "21118:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2472, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "21084:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21084:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21084:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2471, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "21074:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21074:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21061:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2482, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2470, + "src": "21171:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2479, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "21148:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "21148:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "21148:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21148:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2468, + "id": 2484, + "nodeType": "Return", + "src": "21141:33:8" + } + ] + }, + "documentation": "@notice Get the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenVersion\" : \"Semantic version of the token contract\"}", + "id": 2486, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenVersion", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2462, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2486, + "src": "20980:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2461, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "20980:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2464, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2486, + "src": "20999:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20999:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20979:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2467, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2486, + "src": "21047:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2466, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "21047:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21046:8:8" + }, + "scope": 4622, + "src": "20955:224:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2511, + "nodeType": "Block", + "src": "21690:116:8", + "statements": [ + { + "assignments": [ + 2496 + ], + "declarations": [ + { + "constant": false, + "id": 2496, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "21696:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2495, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21696:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2504, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e646563696d616c73", + "id": 2500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21736:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + "value": "token.decimals" + }, + { + "argumentTypes": null, + "id": 2501, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2490, + "src": "21754:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2498, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "21719:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21719:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21719:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2497, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "21709:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21709:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21696:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2508, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2496, + "src": "21798:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2505, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2488, + "src": "21777:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2506, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "21777:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "21777:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21777:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2494, + "id": 2510, + "nodeType": "Return", + "src": "21770:31:8" + } + ] + }, + "documentation": "@notice Get the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"tokenDecimals\" : \"Decimals of the token contract\"}", + "id": 2512, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenDecimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2491, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2488, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "21611:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2487, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "21611:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2490, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "21630:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2489, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "21630:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21610:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2493, + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "21670:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2492, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "21670:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21669:20:8" + }, + "scope": 4622, + "src": "21585:221:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2537, + "nodeType": "Block", + "src": "22295:116:8", + "statements": [ + { + "assignments": [ + 2522 + ], + "declarations": [ + { + "constant": false, + "id": 2522, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "22301:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2521, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "22301:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2530, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 2526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22341:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "id": 2527, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2516, + "src": "22352:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2524, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "22324:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22324:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22324:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2523, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "22314:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22314:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22301:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2534, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2522, + "src": "22403:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2531, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2514, + "src": "22382:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2532, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "22382:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "22382:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22382:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2520, + "id": 2536, + "nodeType": "Return", + "src": "22375:31:8" + } + ] + }, + "documentation": "@notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}", + "id": 2538, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeBPS", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2514, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "22215:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2513, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "22215:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2516, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "22234:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22234:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22214:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2519, + "name": "feeBps", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "22282:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2518, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22282:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22281:13:8" + }, + "scope": 4622, + "src": "22196:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2563, + "nodeType": "Block", + "src": "22890:116:8", + "statements": [ + { + "assignments": [ + 2548 + ], + "declarations": [ + { + "constant": false, + "id": 2548, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "22896:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2547, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "22896:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2556, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 2552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22936:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "id": 2553, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "22947:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2550, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "22919:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22919:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22919:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2549, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "22909:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22909:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22896:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2560, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2548, + "src": "22998:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2557, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2540, + "src": "22977:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2558, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "22977:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "22977:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22977:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2546, + "id": 2562, + "nodeType": "Return", + "src": "22970:31:8" + } + ] + }, + "documentation": "@notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}", + "id": 2564, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2543, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2540, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "22810:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2539, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "22810:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2542, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "22829:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2541, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22829:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22809:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2545, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "22877:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2544, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22877:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22876:13:8" + }, + "scope": 4622, + "src": "22791:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2589, + "nodeType": "Block", + "src": "23485:116:8", + "statements": [ + { + "assignments": [ + 2574 + ], + "declarations": [ + { + "constant": false, + "id": 2574, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "23491:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2573, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "23491:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2582, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 2578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23531:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "id": 2579, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2568, + "src": "23542:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2576, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "23514:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23514:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23514:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2575, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "23504:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23504:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23491:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2586, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2574, + "src": "23593:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2583, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2566, + "src": "23572:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2584, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "23572:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "23572:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23572:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2572, + "id": 2588, + "nodeType": "Return", + "src": "23565:31:8" + } + ] + }, + "documentation": "@notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}", + "id": 2590, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMax", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2566, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "23405:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2565, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "23405:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2568, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "23424:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2567, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23424:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23404:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2572, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2571, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "23472:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2570, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "23472:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23471:13:8" + }, + "scope": 4622, + "src": "23386:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2615, + "nodeType": "Block", + "src": "24077:117:8", + "statements": [ + { + "assignments": [ + 2600 + ], + "declarations": [ + { + "constant": false, + "id": 2600, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2616, + "src": "24083:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2599, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "24083:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2608, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24123:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "id": 2605, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "24135:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2602, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "24106:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24106:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24106:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2601, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24096:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24096:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24083:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2612, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2600, + "src": "24186:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2609, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "24165:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "24165:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "24165:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24165:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2598, + "id": 2614, + "nodeType": "Return", + "src": "24158:31:8" + } + ] + }, + "documentation": "@notice Get the flat fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}", + "id": 2616, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeFlat", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2595, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2616, + "src": "23996:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2591, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "23996:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2594, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2616, + "src": "24015:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2593, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24015:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23995:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2597, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 2616, + "src": "24063:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2596, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "24063:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24062:14:8" + }, + "scope": 4622, + "src": "23976:218:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2641, + "nodeType": "Block", + "src": "24682:117:8", + "statements": [ + { + "assignments": [ + 2626 + ], + "declarations": [ + { + "constant": false, + "id": 2626, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "24688:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2625, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "24688:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2634, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d7367", + "id": 2630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24728:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + "value": "fee.msg" + }, + { + "argumentTypes": null, + "id": 2631, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2620, + "src": "24739:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2628, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "24711:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24711:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24711:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2627, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24701:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24701:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24688:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2638, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2626, + "src": "24791:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2635, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "24769:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2636, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "24769:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 5216, + "src": "24769:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes32) view external returns (bytes memory)" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24769:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 2624, + "id": 2640, + "nodeType": "Return", + "src": "24762:32:8" + } + ] + }, + "documentation": "@notice Get the flat message of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}", + "id": 2642, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMsg", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2618, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "24601:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2617, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "24601:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2620, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "24620:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2619, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24620:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24600:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2624, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2623, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "24668:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2622, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "24668:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24667:14:8" + }, + "scope": 4622, + "src": "24582:217:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2672, + "nodeType": "Block", + "src": "25356:276:8", + "statements": [ + { + "assignments": [ + 2652 + ], + "declarations": [ + { + "constant": false, + "id": 2652, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2673, + "src": "25362:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2651, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "25362:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2659, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e636f6e74726163742e6d6173746572", + "id": 2656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25402:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + }, + "value": "fee.contract.master" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 2654, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "25385:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25385:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25385:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2653, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "25375:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25375:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25362:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2664, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2652, + "src": "25470:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2665, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2646, + "src": "25474:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2661, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2644, + "src": "25446:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2662, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "25446:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4966, + "src": "25446:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25446:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25498:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2660, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "25431:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25431:179:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2669, + "nodeType": "ExpressionStatement", + "src": "25431:179:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25623:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2650, + "id": 2671, + "nodeType": "Return", + "src": "25616:11:8" + } + ] + }, + "documentation": "@notice Set the master fee contract used as the default fee contract when none is provided\n@dev | This method has an `internal` view\n@dev | This value is set in the TokenIOAuthority contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2673, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2644, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2673, + "src": "25280:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2643, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "25280:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2646, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2673, + "src": "25299:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25299:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25279:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2650, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2649, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2673, + "src": "25342:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2648, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "25342:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25341:14:8" + }, + "scope": 4622, + "src": "25250:382:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2695, + "nodeType": "Block", + "src": "26025:114:8", + "statements": [ + { + "assignments": [ + 2681 + ], + "declarations": [ + { + "constant": false, + "id": 2681, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2696, + "src": "26031:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2680, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "26031:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2688, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e636f6e74726163742e6d6173746572", + "id": 2685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26071:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + }, + "value": "fee.contract.master" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 2683, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "26054:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26054:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2686, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26054:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2682, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "26044:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26044:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26031:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2692, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "26131:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2689, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2675, + "src": "26107:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2690, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "26107:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5180, + "src": "26107:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26107:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2679, + "id": 2694, + "nodeType": "Return", + "src": "26100:34:8" + } + ] + }, + "documentation": "@notice Get the master fee contract set via the TokenIOAuthority contract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}", + "id": 2696, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2676, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2675, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2696, + "src": "25956:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2674, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "25956:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25955:19:8" + }, + "payable": false, + "returnParameters": { + "id": 2679, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2678, + "name": "masterFeeContract", + "nodeType": "VariableDeclaration", + "scope": 2696, + "src": "25998:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25998:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25997:27:8" + }, + "scope": 4622, + "src": "25926:213:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2735, + "nodeType": "Block", + "src": "26838:252:8", + "statements": [ + { + "assignments": [ + 2706 + ], + "declarations": [ + { + "constant": false, + "id": 2706, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26844:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2705, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "26844:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2714, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6163636f756e74", + "id": 2710, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26884:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + "value": "fee.account" + }, + { + "argumentTypes": null, + "id": 2711, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2700, + "src": "26899:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2708, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "26867:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26867:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26867:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2707, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "26857:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26857:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26844:72:8" + }, + { + "assignments": [ + 2716 + ], + "declarations": [ + { + "constant": false, + "id": 2716, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26923:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26923:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2722, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2720, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2706, + "src": "26968:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2717, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2698, + "src": "26944:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "26944:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5180, + "src": "26944:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26944:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26923:48:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2723, + "name": "feeAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2716, + "src": "26981:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 2724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26995:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "26981:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2733, + "nodeType": "Block", + "src": "27054:32:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2731, + "name": "feeAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2716, + "src": "27069:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2704, + "id": 2732, + "nodeType": "Return", + "src": "27062:17:8" + } + ] + }, + "id": 2734, + "nodeType": "IfStatement", + "src": "26977:109:8", + "trueBody": { + "id": 2730, + "nodeType": "Block", + "src": "27000:48:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2727, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2698, + "src": "27036:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + ], + "id": 2726, + "name": "getMasterFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2696, + "src": "27015:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer) view returns (address)" + } + }, + "id": 2728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27015:26:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2704, + "id": 2729, + "nodeType": "Return", + "src": "27008:33:8" + } + ] + } + } + ] + }, + "documentation": "@notice Get the fee contract set for a contract interface\n@dev | This method has an `internal` view\n@dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n@dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}", + "id": 2736, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2698, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26750:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2697, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "26750:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2700, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26769:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26769:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26749:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2703, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 2736, + "src": "26817:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2702, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26817:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26816:21:8" + }, + "scope": 4622, + "src": "26726:364:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2761, + "nodeType": "Block", + "src": "27553:114:8", + "statements": [ + { + "assignments": [ + 2746 + ], + "declarations": [ + { + "constant": false, + "id": 2746, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2762, + "src": "27559:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2745, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "27559:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2754, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 2750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27599:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 2751, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2740, + "src": "27615:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2748, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "27582:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2749, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27582:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27582:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2747, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "27572:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27572:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27559:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2758, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2746, + "src": "27659:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2755, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2738, + "src": "27638:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "27638:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "27638:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27638:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2744, + "id": 2760, + "nodeType": "Return", + "src": "27631:31:8" + } + ] + }, + "documentation": "@notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"supply\" : \"Returns the token supply of the given currency\"}", + "id": 2762, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2741, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2738, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2762, + "src": "27481:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2737, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "27481:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2740, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2762, + "src": "27500:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2739, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "27500:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27480:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2744, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2743, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 2762, + "src": "27540:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2742, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "27540:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27539:13:8" + }, + "scope": 4622, + "src": "27457:210:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2799, + "nodeType": "Block", + "src": "28194:189:8", + "statements": [ + { + "assignments": [ + 2776 + ], + "declarations": [ + { + "constant": false, + "id": 2776, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28200:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2775, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "28200:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2792, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 2780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28240:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 2781, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2766, + "src": "28259:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2783, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2764, + "src": "28289:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2784, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2768, + "src": "28295:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2782, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "28269:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28269:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2787, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2764, + "src": "28325:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2788, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2770, + "src": "28331:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2786, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "28305:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28305:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2778, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "28223:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28223:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28223:117:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2777, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "28213:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28213:128:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28200:141:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2796, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2776, + "src": "28375:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2793, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2764, + "src": "28354:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "28354:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "28354:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28354:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2774, + "id": 2798, + "nodeType": "Return", + "src": "28347:31:8" + } + ] + }, + "documentation": "@notice Get the token spender allowance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param spender Ethereum address of spender\n@return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}", + "id": 2800, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2771, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2764, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28085:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2763, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "28085:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2766, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28104:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2765, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28104:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2768, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28121:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28121:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2770, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28138:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2769, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28138:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28084:70:8" + }, + "payable": false, + "returnParameters": { + "id": 2774, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2773, + "name": "allowance", + "nodeType": "VariableDeclaration", + "scope": 2800, + "src": "28178:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2772, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "28178:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28177:16:8" + }, + "scope": 4622, + "src": "28058:325:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2831, + "nodeType": "Block", + "src": "28906:151:8", + "statements": [ + { + "assignments": [ + 2812 + ], + "declarations": [ + { + "constant": false, + "id": 2812, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28912:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2811, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "28912:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2824, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 2816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28952:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 2817, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2804, + "src": "28969:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2819, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2802, + "src": "28999:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2820, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2806, + "src": "29005:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2818, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "28979:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28979:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2814, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "28935:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28935:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28935:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2813, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "28925:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28925:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28912:103:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2828, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2812, + "src": "29049:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2825, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2802, + "src": "29028:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "29028:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "29028:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29028:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2810, + "id": 2830, + "nodeType": "Return", + "src": "29021:31:8" + } + ] + }, + "documentation": "@notice Get the token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"balance\" : \"Return the balance of a given account for a specified currency\"}", + "id": 2832, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2807, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2802, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28816:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2801, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "28816:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2804, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28835:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2803, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28835:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2806, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28852:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2805, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28852:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28815:53:8" + }, + "payable": false, + "returnParameters": { + "id": 2810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 2832, + "src": "28892:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2808, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "28892:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28891:14:8" + }, + "scope": 4622, + "src": "28791:266:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2863, + "nodeType": "Block", + "src": "29612:150:8", + "statements": [ + { + "assignments": [ + 2844 + ], + "declarations": [ + { + "constant": false, + "id": 2844, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29618:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2843, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "29618:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2856, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e66726f7a656e", + "id": 2848, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29658:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + "value": "token.frozen" + }, + { + "argumentTypes": null, + "id": 2849, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2836, + "src": "29674:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2851, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2834, + "src": "29704:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2852, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "29710:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2850, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "29684:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29684:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2846, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "29641:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2847, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29641:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29641:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2845, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "29631:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29631:89:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "29618:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2860, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "29754:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2857, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2834, + "src": "29733:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2858, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "29733:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "29733:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29733:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2842, + "id": 2862, + "nodeType": "Return", + "src": "29726:31:8" + } + ] + }, + "documentation": "@notice Get the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}", + "id": 2864, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenFrozenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2839, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2834, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29516:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2833, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "29516:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2836, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29535:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2835, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29535:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2838, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29552:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2837, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29552:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29515:53:8" + }, + "payable": false, + "returnParameters": { + "id": 2842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2841, + "name": "frozenBalance", + "nodeType": "VariableDeclaration", + "scope": 2864, + "src": "29592:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2840, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "29592:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29591:20:8" + }, + "scope": 4622, + "src": "29485:277:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2903, + "nodeType": "Block", + "src": "30358:303:8", + "statements": [ + { + "assignments": [ + 2878 + ], + "declarations": [ + { + "constant": false, + "id": 2878, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30364:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2877, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "30364:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2890, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e66726f7a656e", + "id": 2882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30404:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + "value": "token.frozen" + }, + { + "argumentTypes": null, + "id": 2883, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2868, + "src": "30420:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2885, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2866, + "src": "30450:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2886, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "30456:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2884, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "30430:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30430:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2880, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "30387:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30387:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30387:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2879, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "30377:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30377:89:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30364:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2895, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2878, + "src": "30508:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2896, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "30512:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2892, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2866, + "src": "30487:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2893, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "30487:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "30487:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30487:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30527:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2891, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "30472:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30472:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2900, + "nodeType": "ExpressionStatement", + "src": "30472:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30652:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2876, + "id": 2902, + "nodeType": "Return", + "src": "30645:11:8" + } + ] + }, + "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Amount of tokens to freeze for account\n@return { \"success\" : \"Return true if successfully called from another contract\"}", + "id": 2904, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenFrozenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2866, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30260:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2865, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "30260:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2868, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30279:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2867, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "30279:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2870, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30296:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2869, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30296:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2872, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30313:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2871, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "30313:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30259:66:8" + }, + "payable": false, + "returnParameters": { + "id": 2876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2875, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2904, + "src": "30344:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2874, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30344:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30343:14:8" + }, + "scope": 4622, + "src": "30229:432:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3003, + "nodeType": "Block", + "src": "31192:598:8", + "statements": [ + { + "assignments": [ + 2916 + ], + "declarations": [ + { + "constant": false, + "id": 2916, + "name": "maxFee", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31199:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2915, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31199:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2928, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31261:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "id": 2924, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2908, + "src": "31272:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2921, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "31244:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31244:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31244:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2920, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "31234:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31234:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2917, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "31213:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2918, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "31213:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "31213:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31213:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31199:91:8" + }, + { + "assignments": [ + 2930 + ], + "declarations": [ + { + "constant": false, + "id": 2930, + "name": "minFee", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31296:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2929, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31296:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31358:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "id": 2938, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2908, + "src": "31369:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2935, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "31341:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2936, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31341:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31341:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2934, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "31331:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31331:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2931, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "31310:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2932, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "31310:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "31310:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31310:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31296:91:8" + }, + { + "assignments": [ + 2944 + ], + "declarations": [ + { + "constant": false, + "id": 2944, + "name": "bpsFee", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31393:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2943, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31393:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2956, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31455:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "id": 2952, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2908, + "src": "31466:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2949, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "31438:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31438:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31438:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2948, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "31428:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31428:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2945, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "31407:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2946, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "31407:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "31407:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31407:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31393:91:8" + }, + { + "assignments": [ + 2958 + ], + "declarations": [ + { + "constant": false, + "id": 2958, + "name": "flatFee", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31490:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2957, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31490:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2970, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31553:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "id": 2966, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2908, + "src": "31565:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2963, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "31536:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31536:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31536:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2962, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "31526:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31526:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2959, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "31505:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "31505:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "31505:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31505:78:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31490:93:8" + }, + { + "assignments": [ + 2972 + ], + "declarations": [ + { + "constant": false, + "id": 2972, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31589:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2971, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31589:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2985, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2983, + "name": "flatFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "31639:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31627:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2975, + "name": "bpsFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2944, + "src": "31614:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2973, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2910, + "src": "31603:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "31603:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31603:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2977, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31602:20:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "31602:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31602:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2981, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31601:33:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "31601:37:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31601:46:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31589:58:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2986, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2972, + "src": "31658:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 2987, + "name": "maxFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "31665:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31658:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2992, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2972, + "src": "31711:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2993, + "name": "minFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2930, + "src": "31718:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31711:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3000, + "nodeType": "Block", + "src": "31760:26:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2998, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2972, + "src": "31775:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2914, + "id": 2999, + "nodeType": "Return", + "src": "31768:11:8" + } + ] + }, + "id": 3001, + "nodeType": "IfStatement", + "src": "31707:79:8", + "trueBody": { + "id": 2997, + "nodeType": "Block", + "src": "31726:28:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2995, + "name": "minFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2930, + "src": "31741:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2914, + "id": 2996, + "nodeType": "Return", + "src": "31734:13:8" + } + ] + } + }, + "id": 3002, + "nodeType": "IfStatement", + "src": "31654:132:8", + "trueBody": { + "id": 2991, + "nodeType": "Block", + "src": "31673:28:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2989, + "name": "maxFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "31688:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2914, + "id": 2990, + "nodeType": "Return", + "src": "31681:13:8" + } + ] + } + } + ] + }, + "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the fee contract\n@param amount Transaction value\n@return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }", + "id": 3004, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2906, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31091:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2905, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "31091:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2908, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31110:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31110:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2910, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31135:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31135:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31090:57:8" + }, + "payable": false, + "returnParameters": { + "id": 2914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2913, + "name": "calculatedFees", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "31171:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2912, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31171:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31170:21:8" + }, + "scope": 4622, + "src": "31068:722:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3033, + "nodeType": "Block", + "src": "32390:334:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3017, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3006, + "src": "32425:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3018, + "name": "accountA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3008, + "src": "32431:8:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3016, + "name": "verifyAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3062, + "src": "32411:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32411:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32448:92:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + }, + "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + } + ], + "id": 3015, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "32396:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32396:150:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3022, + "nodeType": "ExpressionStatement", + "src": "32396:150:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3025, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3006, + "src": "32581:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3026, + "name": "accountB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3010, + "src": "32587:8:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3024, + "name": "verifyAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3062, + "src": "32567:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32567:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32604:92:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + }, + "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + } + ], + "id": 3023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "32552:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32552:150:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3030, + "nodeType": "ExpressionStatement", + "src": "32552:150:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32715:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3014, + "id": 3032, + "nodeType": "Return", + "src": "32708:11:8" + } + ] + }, + "documentation": "@notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param accountA Ethereum address of first account holder to verify\n@param accountB Ethereum address of second account holder to verify\n@return { \"verified\" : \"Returns true if both accounts are successfully verified\" }", + "id": 3034, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "verifyAccounts", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3006, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3034, + "src": "32297:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3005, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "32297:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3008, + "name": "accountA", + "nodeType": "VariableDeclaration", + "scope": 3034, + "src": "32316:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3007, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32316:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3010, + "name": "accountB", + "nodeType": "VariableDeclaration", + "scope": 3034, + "src": "32334:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3009, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32334:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32296:55:8" + }, + "payable": false, + "returnParameters": { + "id": 3014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3013, + "name": "verified", + "nodeType": "VariableDeclaration", + "scope": 3034, + "src": "32375:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3012, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "32375:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32374:15:8" + }, + "scope": 4622, + "src": "32273:451:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3061, + "nodeType": "Block", + "src": "33214:262:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3045, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3036, + "src": "33250:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3046, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3038, + "src": "33256:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3044, + "name": "getKYCApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2327, + "src": "33235:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33235:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e7420646f6573206e6f742068617665204b594320617070726f76616c2e", + "id": 3048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33272:44:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", + "typeString": "literal_string \"Error: Account does not have KYC approval.\"" + }, + "value": "Error: Account does not have KYC approval." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", + "typeString": "literal_string \"Error: Account does not have KYC approval.\"" + } + ], + "id": 3043, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "33220:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33220:102:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3050, + "nodeType": "ExpressionStatement", + "src": "33220:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3053, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3036, + "src": "33360:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3054, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3038, + "src": "33366:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3052, + "name": "getAccountStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2356, + "src": "33343:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33343:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e7420737461747573206973206066616c7365602e204163636f756e7420737461747573206d757374206265206074727565602e", + "id": 3056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33382:66:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", + "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" + }, + "value": "Error: Account status is `false`. Account status must be `true`." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", + "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" + } + ], + "id": 3051, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "33328:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33328:126:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3058, + "nodeType": "ExpressionStatement", + "src": "33328:126:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33467:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3042, + "id": 3060, + "nodeType": "Return", + "src": "33460:11:8" + } + ] + }, + "documentation": "@notice Verified KYC and global status for a single account and return true or throw if account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder to verify\n@return { \"verified\" : \"Returns true if account is successfully verified\" }", + "id": 3062, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "verifyAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3036, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3062, + "src": "33140:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3035, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "33140:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3038, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3062, + "src": "33159:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33159:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33139:36:8" + }, + "payable": false, + "returnParameters": { + "id": 3042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3041, + "name": "verified", + "nodeType": "VariableDeclaration", + "scope": 3062, + "src": "33199:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3040, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33199:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33198:15:8" + }, + "scope": 4622, + "src": "33117:359:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3155, + "nodeType": "Block", + "src": "34346:799:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3079, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "34368:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34360:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34360:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34375:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "34360:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f6020616464726573732063616e6e6f74206265206e756c6c2e", + "id": 3083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34380:37:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", + "typeString": "literal_string \"Error: `to` address cannot be null.\"" + }, + "value": "Error: `to` address cannot be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", + "typeString": "literal_string \"Error: `to` address cannot be null.\"" + } + ], + "id": 3077, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34352:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34352:67:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3085, + "nodeType": "ExpressionStatement", + "src": "34352:67:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3087, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "34433:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34442:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "34433:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060616d6f756e7460206d7573742062652067726561746572207468616e207a65726f", + "id": 3090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34445:43:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", + "typeString": "literal_string \"Error: `amount` must be greater than zero\"" + }, + "value": "Error: `amount` must be greater than zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", + "typeString": "literal_string \"Error: `amount` must be greater than zero\"" + } + ], + "id": 3086, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34425:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34425:64:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3092, + "nodeType": "ExpressionStatement", + "src": "34425:64:8" + }, + { + "assignments": [ + 3094 + ], + "declarations": [ + { + "constant": false, + "id": 3094, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34496:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34496:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3101, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3096, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34533:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3098, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "34547:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34539:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34539:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3095, + "name": "getFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2736, + "src": "34518:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34518:35:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34496:57:8" + }, + { + "assignments": [ + 3103 + ], + "declarations": [ + { + "constant": false, + "id": 3103, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34559:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3102, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "34559:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3105, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34585:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3106, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3094, + "src": "34591:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3107, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "34604:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3104, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3004, + "src": "34571:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34571:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34559:52:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3112, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34658:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3113, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "34664:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "34664:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3116, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34691:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3117, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "34697:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3118, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "34707:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3115, + "name": "getFxUSDAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4621, + "src": "34676:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34676:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3111, + "name": "setAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4400, + "src": "34633:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 3120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34633:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d6f756e7420666f72206163636f756e742e", + "id": 3121, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34723:51:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", + "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" + }, + "value": "Error: Unable to set spending amount for account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", + "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" + } + ], + "id": 3110, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34618:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34618:157:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3123, + "nodeType": "ExpressionStatement", + "src": "34618:157:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3126, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34811:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3127, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "34817:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3128, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "34827:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "34827:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3130, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "34839:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3131, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "34843:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3132, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3072, + "src": "34851:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3125, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "34797:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34797:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34864:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 3124, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34782:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34782:128:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3136, + "nodeType": "ExpressionStatement", + "src": "34782:128:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3139, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "34988:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3140, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "34994:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3141, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "35004:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "35004:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3143, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3094, + "src": "35016:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3144, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3103, + "src": "35029:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3146, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "35045:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3147, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3094, + "src": "35051:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3145, + "name": "getFeeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2642, + "src": "35035:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35035:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3138, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "34974:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34974:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 3150, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35072:49:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 3137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "34959:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34959:163:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3152, + "nodeType": "ExpressionStatement", + "src": "34959:163:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35136:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3076, + "id": 3154, + "nodeType": "Return", + "src": "35129:11:8" + } + ] + }, + "documentation": "@notice Transfer an amount of currency token from msg.sender account to another specified account\n@dev This function is called by an interface that is accessible directly to the account holder\n@dev | This method has an `internal` view\n@dev | This method uses `forceTransfer()` low-level api\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3156, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3073, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3064, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34241:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3063, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "34241:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3066, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34260:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3065, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "34260:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3068, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34277:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3067, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34277:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3070, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34289:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3069, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "34289:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3072, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34302:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3071, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "34302:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34240:73:8" + }, + "payable": false, + "returnParameters": { + "id": 3076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3075, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3156, + "src": "34332:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3074, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "34332:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34331:14:8" + }, + "scope": 4622, + "src": "34223:922:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3251, + "nodeType": "Block", + "src": "36402:1060:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3175, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3164, + "src": "36431:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36423:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36423:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3177, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36438:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "36423:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36449:39:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + }, + "value": "Error: `to` address must not be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + } + ], + "id": 3173, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "36408:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36408:86:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3181, + "nodeType": "ExpressionStatement", + "src": "36408:86:8" + }, + { + "assignments": [ + 3183 + ], + "declarations": [ + { + "constant": false, + "id": 3183, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36501:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36501:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3190, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3185, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36538:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3187, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "36552:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36544:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36544:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3184, + "name": "getFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2736, + "src": "36523:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36523:35:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36501:57:8" + }, + { + "assignments": [ + 3192 + ], + "declarations": [ + { + "constant": false, + "id": 3192, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36564:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3191, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "36564:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3198, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3194, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36590:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3195, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3183, + "src": "36596:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3196, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3166, + "src": "36609:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3193, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3004, + "src": "36576:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36576:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36564:52:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3201, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36756:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3202, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3162, + "src": "36762:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3204, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36783:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3205, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "36789:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3206, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3166, + "src": "36799:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3203, + "name": "getFxUSDAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4621, + "src": "36768:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 3207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36768:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3200, + "name": "setAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4400, + "src": "36731:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 3208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36731:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36815:47:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + }, + "value": "Error: Unable to set account spending amount." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + } + ], + "id": 3199, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "36716:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36716:152:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3211, + "nodeType": "ExpressionStatement", + "src": "36716:152:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3214, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "36948:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3215, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "36954:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3216, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3162, + "src": "36964:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3217, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3164, + "src": "36970:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3218, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3166, + "src": "36974:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3219, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3168, + "src": "36982:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3213, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "36934:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36934:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 3221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36995:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 3212, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "36919:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36919:127:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3223, + "nodeType": "ExpressionStatement", + "src": "36919:127:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3226, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "37124:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3227, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "37130:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3228, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3162, + "src": "37140:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3229, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3183, + "src": "37146:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3230, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3192, + "src": "37159:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3232, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "37175:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3233, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3183, + "src": "37181:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3231, + "name": "getFeeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2642, + "src": "37165:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 3234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37165:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3225, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "37110:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37110:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 3236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37202:49:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 3224, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "37095:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37095:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3238, + "nodeType": "ExpressionStatement", + "src": "37095:162:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3241, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3158, + "src": "37348:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3242, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "37354:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3243, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3162, + "src": "37364:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3244, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3166, + "src": "37370:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3240, + "name": "updateAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "37332:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256) returns (bool)" + } + }, + "id": 3245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37332:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e636520666f72207370656e6465722e", + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37385:48:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", + "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" + }, + "value": "Error: Unable to update allowance for spender." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", + "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" + } + ], + "id": 3239, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "37317:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37317:122:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3248, + "nodeType": "ExpressionStatement", + "src": "37317:122:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37453:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3172, + "id": 3250, + "nodeType": "Return", + "src": "37446:11:8" + } + ] + }, + "documentation": "@notice Transfer an amount of currency token from account to another specified account via an approved spender account\n@dev This function is called by an interface that is accessible directly to the account spender\n@dev | This method has an `internal` view\n@dev | Transactions will fail if the spending amount exceeds the daily limit\n@dev | This method uses `forceTransfer()` low-level api\n@dev | This method implements ERC20 transferFrom() method with approved spender behavior\n@dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3252, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3158, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36283:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3157, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "36283:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3160, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36302:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3159, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "36302:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3162, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36319:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36319:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3164, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36333:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3163, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36333:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3166, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36345:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3165, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "36345:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3168, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36358:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3167, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "36358:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36282:87:8" + }, + "payable": false, + "returnParameters": { + "id": 3172, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3171, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3252, + "src": "36388:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "36388:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36387:14:8" + }, + "scope": 4622, + "src": "36261:1201:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3350, + "nodeType": "Block", + "src": "38351:801:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3271, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "38380:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "38372:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38372:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38387:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "38372:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", + "id": 3275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38398:39:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + }, + "value": "Error: `to` address must not be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + } + ], + "id": 3269, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "38357:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38357:86:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3277, + "nodeType": "ExpressionStatement", + "src": "38357:86:8" + }, + { + "assignments": [ + 3279 + ], + "declarations": [ + { + "constant": false, + "id": 3279, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38450:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3278, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38450:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3291, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38492:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3284, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3256, + "src": "38509:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3286, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38539:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3287, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "38545:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3285, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "38519:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38519:31:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3281, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "38475:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "38475:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38475:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3280, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "38465:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38465:87:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38450:102:8" + }, + { + "assignments": [ + 3293 + ], + "declarations": [ + { + "constant": false, + "id": 3293, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38558:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3292, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38558:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3305, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38600:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3298, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3256, + "src": "38617:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3300, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38647:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3301, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "38653:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3299, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "38627:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38627:29:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3295, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "38583:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "38583:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38583:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3294, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "38573:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38573:85:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38558:100:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3310, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3279, + "src": "38701:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3317, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "38738:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3314, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3279, + "src": "38728:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3311, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38707:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "38707:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "38707:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38707:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "38707:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38707:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3307, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38680:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "38680:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "38680:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38680:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38754:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3306, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "38665:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38665:202:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3322, + "nodeType": "ExpressionStatement", + "src": "38665:202:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3327, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3293, + "src": "38909:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3334, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "38946:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3331, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3293, + "src": "38936:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3328, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38915:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3329, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "38915:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "38915:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38915:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "38915:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38915:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3324, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3254, + "src": "38888:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "38888:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "38888:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38888:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38962:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3323, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "38873:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38873:202:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3339, + "nodeType": "ExpressionStatement", + "src": "38873:202:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3341, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3256, + "src": "39096:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3342, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "39106:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3343, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "39112:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3344, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "39116:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3345, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "39124:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3340, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "39087:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,address,uint256,bytes memory)" + } + }, + "id": 3346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39087:42:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3347, + "nodeType": "EmitStatement", + "src": "39082:47:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39143:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3268, + "id": 3349, + "nodeType": "Return", + "src": "39136:11:8" + } + ] + }, + "documentation": "@notice Low-level transfer method\n@dev | This method has an `internal` view\n@dev | This method does not include fees or approved allowances.\n@dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3351, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "forceTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3254, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38232:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3253, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "38232:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3256, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38251:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3255, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "38251:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3258, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38268:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38268:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3260, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38282:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38282:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3262, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38294:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3261, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "38294:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3264, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38307:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3263, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "38307:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38231:87:8" + }, + "payable": false, + "returnParameters": { + "id": 3268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3267, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "38337:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3266, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "38337:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38336:14:8" + }, + "scope": 4622, + "src": "38209:943:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3402, + "nodeType": "Block", + "src": "39829:376:8", + "statements": [ + { + "assignments": [ + 3365 + ], + "declarations": [ + { + "constant": false, + "id": 3365, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39835:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3364, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39835:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3382, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 3369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39875:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 3370, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3355, + "src": "39894:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3372, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "39924:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3373, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3357, + "src": "39930:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3371, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "39904:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39904:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3376, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "39960:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3377, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "39966:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "39966:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3375, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "39940:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39940:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3367, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "39858:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "39858:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39858:120:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3366, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "39848:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39848:131:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39835:144:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3387, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3365, + "src": "40021:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3394, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3359, + "src": "40054:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3391, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3365, + "src": "40046:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3388, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "40025:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "40025:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "40025:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40025:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "40025:28:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40025:36:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3384, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "40000:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3385, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "40000:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "40000:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40000:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40070:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3383, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "39985:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39985:198:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3399, + "nodeType": "ExpressionStatement", + "src": "39985:198:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40196:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3363, + "id": 3401, + "nodeType": "Return", + "src": "40189:11:8" + } + ] + }, + "documentation": "@notice Low-level method to update spender allowance for account\n@dev | This method is called inside the `transferFrom()` method\n@dev | msg.sender == spender address\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Value to reduce allowance by (i.e. the amount spent)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3403, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updateAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3353, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39731:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3352, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "39731:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3355, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39750:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3354, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "39750:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3357, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39767:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3356, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39767:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3359, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39784:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3358, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "39784:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39730:66:8" + }, + "payable": false, + "returnParameters": { + "id": 3363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3362, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "39815:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3361, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "39815:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39814:14:8" + }, + "scope": 4622, + "src": "39706:499:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3523, + "nodeType": "Block", + "src": "40769:1110:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3415, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "40783:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40794:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "40783:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20607370656e6465726020616464726573732063616e6e6f74206265206e756c6c2e", + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40807:42:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", + "typeString": "literal_string \"Error: `spender` address cannot be null.\"" + }, + "value": "Error: `spender` address cannot be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", + "typeString": "literal_string \"Error: `spender` address cannot be null.\"" + } + ], + "id": 3414, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "40775:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40775:75:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3420, + "nodeType": "ExpressionStatement", + "src": "40775:75:8" + }, + { + "assignments": [ + 3422 + ], + "declarations": [ + { + "constant": false, + "id": 3422, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40857:22:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3421, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "40857:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3429, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3424, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "40897:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3426, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5277, + "src": "40911:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + ], + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "40903:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40903:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3423, + "name": "getTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2434, + "src": "40882:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40882:35:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40857:60:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3432, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "40961:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3433, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3422, + "src": "40967:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3435, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "40997:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3436, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "41003:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3434, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "40977:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40977:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3431, + "name": "getTokenFrozenBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2864, + "src": "40939:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 3438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40939:73:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41016:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "40939:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205370656e646572206d757374206e6f74206861766520612066726f7a656e2062616c616e6365206469726563746c79", + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41025:56:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", + "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" + }, + "value": "Error: Spender must not have a frozen balance directly" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", + "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" + } + ], + "id": 3430, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "40924:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40924:158:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3443, + "nodeType": "ExpressionStatement", + "src": "40924:158:8" + }, + { + "assignments": [ + 3445 + ], + "declarations": [ + { + "constant": false, + "id": 3445, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "41089:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3444, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41089:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3462, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 3449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41131:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 3450, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3422, + "src": "41150:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3452, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41180:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3453, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "41186:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41186:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3451, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "41160:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41160:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3457, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41219:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3458, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "41225:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3456, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "41199:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41199:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3447, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "41114:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41114:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41114:120:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3446, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "41104:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41104:131:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41089:146:8" + }, + { + "assignments": [ + 3464 + ], + "declarations": [ + { + "constant": false, + "id": 3464, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "41241:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3463, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41241:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3477, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41283:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3469, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3422, + "src": "41300:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3471, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41330:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3472, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "41336:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41336:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3470, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "41310:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41310:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3466, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "41266:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41266:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41266:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3465, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "41256:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41256:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41241:108:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3482, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "41392:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3479, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41371:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "41371:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "41371:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41371:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41401:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "41371:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3486, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3409, + "src": "41406:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41416:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "41406:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "41371:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283029206265666f72652073657474696e6720616e207570646174656420616c6c6f77616e636520666f72207370656e6465722e", + "id": 3490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41425:84:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", + "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" + }, + "value": "Error: Allowance must be zero (0) before setting an updated allowance for spender." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", + "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" + } + ], + "id": 3478, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "41356:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41356:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3492, + "nodeType": "ExpressionStatement", + "src": "41356:154:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3497, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "41553:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3494, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41532:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "41532:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "41532:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41532:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3499, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3409, + "src": "41562:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41532:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d73672e73656e64657220746f6b656e2062616c616e63652e", + "id": 3501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41576:58:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", + "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" + }, + "value": "Error: Allowance cannot exceed msg.sender token balance." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", + "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" + } + ], + "id": 3493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "41517:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41517:118:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3503, + "nodeType": "ExpressionStatement", + "src": "41517:118:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3508, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "41678:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3509, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3409, + "src": "41684:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3505, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "41657:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3506, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "41657:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "41657:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41657:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41699:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3504, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "41642:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41642:165:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3513, + "nodeType": "ExpressionStatement", + "src": "41642:165:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3515, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "41828:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41828:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3517, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "41840:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3518, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3409, + "src": "41849:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3514, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1654, + "src": "41819:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41819:37:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3520, + "nodeType": "EmitStatement", + "src": "41814:42:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41870:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3413, + "id": 3522, + "nodeType": "Return", + "src": "41863:11:8" + } + ] + }, + "documentation": "@notice Low-level method to set the allowance for a spender\n@dev | This method is called inside the `approve()` ERC20 method\n@dev | msg.sender == account holder\n@param self Internal storage proxying TokenIOStorage contract\n@param spender Ethereum address of account spender\n@param amount Value to set for spender allowance\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3524, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approveAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3405, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40688:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3404, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "40688:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3407, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40707:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3406, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40707:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3409, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40724:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3408, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "40724:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "40687:49:8" + }, + "payable": false, + "returnParameters": { + "id": 3413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3412, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3524, + "src": "40755:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3411, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "40755:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "40754:14:8" + }, + "scope": 4622, + "src": "40662:1217:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3634, + "nodeType": "Block", + "src": "42706:943:8", + "statements": [ + { + "assignments": [ + 3540 + ], + "declarations": [ + { + "constant": false, + "id": 3540, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42712:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3539, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42712:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3552, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42754:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3545, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3528, + "src": "42771:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3547, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "42801:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3548, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3530, + "src": "42807:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3546, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "42781:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42781:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3542, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "42737:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42737:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42737:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3541, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "42727:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42727:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42712:105:8" + }, + { + "assignments": [ + 3554 + ], + "declarations": [ + { + "constant": false, + "id": 3554, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42823:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3553, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42823:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3563, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e697373756564", + "id": 3558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42865:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + "value": "token.issued" + }, + { + "argumentTypes": null, + "id": 3559, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3528, + "src": "42881:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3560, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3534, + "src": "42891:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3556, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "42848:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42848:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42848:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3555, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "42838:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42838:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42823:80:8" + }, + { + "assignments": [ + 3565 + ], + "declarations": [ + { + "constant": false, + "id": 3565, + "name": "id_c", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42909:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3564, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42909:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3573, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 3569, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42951:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 3570, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3528, + "src": "42967:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3567, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "42934:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42934:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42934:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3566, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "42924:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42924:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42909:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3578, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3540, + "src": "43014:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3585, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3532, + "src": "43051:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3582, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3540, + "src": "43041:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3579, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43020:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3580, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43020:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "43020:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43020:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43020:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43020:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3575, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "42993:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3576, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "42993:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "42993:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42993:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43067:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3574, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "42985:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42985:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3590, + "nodeType": "ExpressionStatement", + "src": "42985:190:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3595, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "43210:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3602, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3532, + "src": "43247:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3599, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "43237:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3596, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43216:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3597, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43216:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "43216:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43216:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43216:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43216:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3592, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43189:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3593, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43189:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "43189:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43189:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43263:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3591, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "43181:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43181:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3607, + "nodeType": "ExpressionStatement", + "src": "43181:190:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3612, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "43406:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3619, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3532, + "src": "43443:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3616, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "43433:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3613, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43412:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43412:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "43412:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43412:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43412:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43412:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3609, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3526, + "src": "43385:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "43385:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "43385:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43385:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43459:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "43377:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43377:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3624, + "nodeType": "ExpressionStatement", + "src": "43377:190:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3626, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3528, + "src": "43587:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3627, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3530, + "src": "43597:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3628, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3532, + "src": "43606:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3629, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3534, + "src": "43614:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3625, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "43579:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,uint256,string memory)" + } + }, + "id": 3630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43579:46:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3631, + "nodeType": "EmitStatement", + "src": "43574:51:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3632, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43639:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3538, + "id": 3633, + "nodeType": "Return", + "src": "43632:11:8" + } + ] + }, + "documentation": "@notice Deposit an amount of currency into the Ethereum account holder\n@dev | The total supply of the token increases only when new funds are deposited 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to deposit for account\n@param issuerFirm Name of the issuing firm authorizing the deposit\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3635, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3526, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42589:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3525, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "42589:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3528, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42608:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3527, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "42608:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3530, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42625:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "42625:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3532, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42642:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3531, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "42642:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3534, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42655:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3533, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "42655:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "42588:85:8" + }, + "payable": false, + "returnParameters": { + "id": 3538, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3537, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3635, + "src": "42692:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3536, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42692:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "42691:14:8" + }, + "scope": 4622, + "src": "42572:1077:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3745, + "nodeType": "Block", + "src": "44480:1002:8", + "statements": [ + { + "assignments": [ + 3651 + ], + "declarations": [ + { + "constant": false, + "id": 3651, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44486:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3650, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44486:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3663, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44528:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3656, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3639, + "src": "44545:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3658, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "44575:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3659, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "44581:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3657, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "44555:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44555:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3653, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "44511:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44511:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44511:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3652, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "44501:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44501:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44486:105:8" + }, + { + "assignments": [ + 3665 + ], + "declarations": [ + { + "constant": false, + "id": 3665, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44597:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3664, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44597:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3674, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e697373756564", + "id": 3669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44639:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + "value": "token.issued" + }, + { + "argumentTypes": null, + "id": 3670, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3639, + "src": "44655:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3671, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3645, + "src": "44665:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3667, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "44622:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44622:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44622:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3666, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "44612:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44612:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44597:80:8" + }, + { + "assignments": [ + 3676 + ], + "declarations": [ + { + "constant": false, + "id": 3676, + "name": "id_c", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44721:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3675, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44721:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3684, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 3680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44763:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 3681, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3639, + "src": "44779:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3678, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "44746:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44746:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44746:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3677, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "44736:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44736:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44721:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3689, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3651, + "src": "44832:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3696, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3643, + "src": "44869:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3693, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3651, + "src": "44859:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3690, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "44838:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3691, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "44838:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "44838:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44838:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "44838:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44838:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3686, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "44811:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3687, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "44811:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "44811:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44811:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44885:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3685, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "44796:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44796:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3701, + "nodeType": "ExpressionStatement", + "src": "44796:197:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3706, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "45035:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3713, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3643, + "src": "45072:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3710, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "45062:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3707, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "45041:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3708, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "45041:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "45041:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45041:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "45041:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45041:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3703, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "45014:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "45014:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "45014:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45014:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45088:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3702, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "44999:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44999:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3718, + "nodeType": "ExpressionStatement", + "src": "44999:197:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3723, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3676, + "src": "45238:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3730, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3643, + "src": "45275:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3727, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3676, + "src": "45265:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3724, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "45244:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "45244:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "45244:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45244:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "45244:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45244:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3720, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "45217:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3721, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "45217:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "45217:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45217:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45291:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3719, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "45202:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45202:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3735, + "nodeType": "ExpressionStatement", + "src": "45202:197:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3737, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3639, + "src": "45420:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3738, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "45430:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3739, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3643, + "src": "45439:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3740, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3645, + "src": "45447:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3736, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "45411:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,uint256,string memory)" + } + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45411:47:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3742, + "nodeType": "EmitStatement", + "src": "45406:52:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45472:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3649, + "id": 3744, + "nodeType": "Return", + "src": "45465:11:8" + } + ] + }, + "documentation": "@notice Withdraw an amount of currency from the Ethereum account holder\n@dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to withdraw for account\n@param issuerFirm Name of the issuing firm authorizing the withdraw\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3746, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3637, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44363:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3636, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "44363:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3639, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44382:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3638, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "44382:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3641, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44399:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44399:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3643, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44416:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3642, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "44416:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3645, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44429:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "44429:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44362:85:8" + }, + "payable": false, + "returnParameters": { + "id": 3649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3648, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3746, + "src": "44466:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3647, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44466:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44465:14:8" + }, + "scope": 4622, + "src": "44345:1137:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3779, + "nodeType": "Block", + "src": "46215:275:8", + "statements": [ + { + "assignments": [ + 3758 + ], + "declarations": [ + { + "constant": false, + "id": 3758, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46221:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3757, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "46221:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3766, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e6669726d", + "id": 3762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46261:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + "value": "registered.firm" + }, + { + "argumentTypes": null, + "id": 3763, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3750, + "src": "46280:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3760, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "46244:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "46244:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46244:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3759, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "46234:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46234:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "46221:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3771, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3758, + "src": "46334:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3772, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3752, + "src": "46338:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3768, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3748, + "src": "46313:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "46313:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "46313:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 3773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46313:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46355:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3767, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "46298:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46298:170:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3776, + "nodeType": "ExpressionStatement", + "src": "46298:170:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46481:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3756, + "id": 3778, + "nodeType": "Return", + "src": "46474:11:8" + } + ] + }, + "documentation": "@notice Method for setting a registered issuer firm\n@dev | Only Token, Inc. and other authorized institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered\n@param approved Approval status to set for the firm (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3780, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3748, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46130:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3747, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "46130:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3750, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46149:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3749, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "46149:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3752, + "name": "approved", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46168:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3751, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "46168:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "46129:53:8" + }, + "payable": false, + "returnParameters": { + "id": 3756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3755, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3780, + "src": "46201:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3754, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "46201:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "46200:14:8" + }, + "scope": 4622, + "src": "46103:387:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3844, + "nodeType": "Block", + "src": "47323:679:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3795, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3782, + "src": "47361:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3796, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3784, + "src": "47367:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3794, + "name": "isRegisteredFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3900, + "src": "47344:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" + } + }, + "id": 3797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47344:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20606973737565724669726d60206d75737420626520726567697374657265642e", + "id": 3798, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47386:41:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", + "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" + }, + "value": "Error: `issuerFirm` must be registered." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", + "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" + } + ], + "id": 3793, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "47329:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47329:99:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3800, + "nodeType": "ExpressionStatement", + "src": "47329:99:8" + }, + { + "assignments": [ + 3802 + ], + "declarations": [ + { + "constant": false, + "id": 3802, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47435:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3801, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47435:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3811, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3806, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47477:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "id": 3807, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3784, + "src": "47501:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3808, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3786, + "src": "47513:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3804, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "47460:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "47460:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47460:70:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3803, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "47450:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47450:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "47435:96:8" + }, + { + "assignments": [ + 3813 + ], + "declarations": [ + { + "constant": false, + "id": 3813, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47537:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3812, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47537:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3821, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f726974792e6669726d", + "id": 3817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47579:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + "value": "registered.authority.firm" + }, + { + "argumentTypes": null, + "id": 3818, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3786, + "src": "47608:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3815, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "47562:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "47562:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47562:63:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3814, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "47552:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47552:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "47537:89:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3826, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3802, + "src": "47669:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3827, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "47675:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3823, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3782, + "src": "47648:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3824, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "47648:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "47648:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 3828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47648:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47692:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3822, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "47633:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47633:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3831, + "nodeType": "ExpressionStatement", + "src": "47633:167:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3836, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3813, + "src": "47845:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3837, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3784, + "src": "47851:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3833, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3782, + "src": "47822:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3834, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "47822:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "47822:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 3838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47822:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47870:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3832, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "47807:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47807:171:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3841, + "nodeType": "ExpressionStatement", + "src": "47807:171:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47993:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3792, + "id": 3843, + "nodeType": "Return", + "src": "47986:11:8" + } + ] + }, + "documentation": "@notice Method for setting a registered issuer firm authority\n@dev | Only Token, Inc. and other approved institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | Authority can only be set for a registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered to authority\n@param authorityAddress Ethereum address of the firm authority to be approved\n@param approved Approval status to set for the firm authority (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3845, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3782, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47212:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3781, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "47212:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3784, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47231:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3783, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "47231:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3786, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47250:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3785, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "47250:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3788, + "name": "approved", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47276:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3787, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "47276:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47211:79:8" + }, + "payable": false, + "returnParameters": { + "id": 3792, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3791, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3845, + "src": "47309:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3790, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "47309:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47308:14:8" + }, + "scope": 4622, + "src": "47180:822:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3873, + "nodeType": "Block", + "src": "48490:164:8", + "statements": [ + { + "assignments": [ + 3855 + ], + "declarations": [ + { + "constant": false, + "id": 3855, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3874, + "src": "48496:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3854, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "48496:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3866, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f726974792e6669726d", + "id": 3859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48536:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + "value": "registered.authority.firm" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3861, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3847, + "src": "48585:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3862, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3849, + "src": "48591:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3860, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "48565:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48565:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3857, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "48519:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "48519:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48519:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3856, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "48509:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48509:101:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "48496:114:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3870, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3855, + "src": "48646:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3867, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3847, + "src": "48623:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3868, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "48623:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5204, + "src": "48623:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 3871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48623:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3853, + "id": 3872, + "nodeType": "Return", + "src": "48616:33:8" + } + ] + }, + "documentation": "@notice Get the issuer firm registered to the authority Ethereum address\n@dev | Only one firm can be registered per authority\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"issuerFirm\" : \"Name of the firm registered to authority\" }", + "id": 3874, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFirmFromAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3847, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3874, + "src": "48403:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3846, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "48403:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3849, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3874, + "src": "48422:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3848, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48422:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48402:45:8" + }, + "payable": false, + "returnParameters": { + "id": 3853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3852, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3874, + "src": "48471:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3851, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "48471:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48470:19:8" + }, + "scope": 4622, + "src": "48373:281:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3899, + "nodeType": "Block", + "src": "49052:119:8", + "statements": [ + { + "assignments": [ + 3884 + ], + "declarations": [ + { + "constant": false, + "id": 3884, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3900, + "src": "49058:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3883, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "49058:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3892, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e6669726d", + "id": 3888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49098:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + "value": "registered.firm" + }, + { + "argumentTypes": null, + "id": 3889, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "49117:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3886, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "49081:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "49081:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49081:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3885, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "49071:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49071:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "49058:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3896, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3884, + "src": "49163:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3893, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3876, + "src": "49142:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "49142:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "49142:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49142:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3882, + "id": 3898, + "nodeType": "Return", + "src": "49135:31:8" + } + ] + }, + "documentation": "@notice Return the boolean (true/false) registration status for an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@return { \"registered\" : \"Return if the issuer firm has been registered\" }", + "id": 3900, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3876, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3900, + "src": "48974:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3875, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "48974:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3878, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3900, + "src": "48993:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3877, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "48993:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48973:38:8" + }, + "payable": false, + "returnParameters": { + "id": 3882, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3881, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3900, + "src": "49035:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3880, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "49035:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49034:17:8" + }, + "scope": 4622, + "src": "48948:223:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3931, + "nodeType": "Block", + "src": "49703:169:8", + "statements": [ + { + "assignments": [ + 3912 + ], + "declarations": [ + { + "constant": false, + "id": 3912, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49709:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3911, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "49709:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3924, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49749:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "id": 3917, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3904, + "src": "49773:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3919, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3902, + "src": "49805:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3920, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3906, + "src": "49811:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3918, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "49785:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49785:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3914, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "49732:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "49732:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49732:97:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3913, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "49722:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49722:108:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "49709:121:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3928, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3912, + "src": "49864:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3925, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3902, + "src": "49843:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3926, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "49843:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "49843:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49843:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3910, + "id": 3930, + "nodeType": "Return", + "src": "49836:31:8" + } + ] + }, + "documentation": "@notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }", + "id": 3932, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredToFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3902, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49599:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3901, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "49599:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3904, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49618:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3903, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "49618:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3906, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49637:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49637:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49598:64:8" + }, + "payable": false, + "returnParameters": { + "id": 3910, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3909, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3932, + "src": "49686:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3908, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "49686:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49685:17:8" + }, + "scope": 4622, + "src": "49571:301:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3967, + "nodeType": "Block", + "src": "50348:230:8", + "statements": [ + { + "assignments": [ + 3942 + ], + "declarations": [ + { + "constant": false, + "id": 3942, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3968, + "src": "50354:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3941, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "50354:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3960, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50394:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3948, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3934, + "src": "50439:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3950, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3934, + "src": "50465:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3951, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3936, + "src": "50471:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3949, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "50445:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50445:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3947, + "name": "getFirmFromAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3874, + "src": "50418:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 3953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50418:71:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3955, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3934, + "src": "50511:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3956, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3936, + "src": "50517:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3954, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "50491:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50491:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3944, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "50377:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "50377:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50377:158:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3943, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "50367:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50367:169:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "50354:182:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3964, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3942, + "src": "50570:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3961, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3934, + "src": "50549:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3962, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "50549:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "50549:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50549:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3940, + "id": 3966, + "nodeType": "Return", + "src": "50542:31:8" + } + ] + }, + "documentation": "@notice Return if an authority address is registered\n@dev | This also checks the status of the registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered\" }", + "id": 3968, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3934, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3968, + "src": "50263:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3933, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "50263:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3936, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3968, + "src": "50282:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3935, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "50282:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50262:45:8" + }, + "payable": false, + "returnParameters": { + "id": 3940, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3939, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3968, + "src": "50331:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3938, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "50331:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50330:17:8" + }, + "scope": 4622, + "src": "50232:346:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3993, + "nodeType": "Block", + "src": "51023:109:8", + "statements": [ + { + "assignments": [ + 3978 + ], + "declarations": [ + { + "constant": false, + "id": 3978, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3994, + "src": "51029:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3977, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51029:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3986, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74782e737461747573", + "id": 3982, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51069:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + "value": "tx.status" + }, + { + "argumentTypes": null, + "id": 3983, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3972, + "src": "51082:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3980, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "51052:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "51052:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51052:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3979, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "51042:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51042:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51029:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3990, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3978, + "src": "51124:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3987, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3970, + "src": "51103:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3988, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "51103:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "51103:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51103:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3976, + "id": 3992, + "nodeType": "Return", + "src": "51096:31:8" + } + ] + }, + "documentation": "@notice Return boolean transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}", + "id": 3994, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTxStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3970, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3994, + "src": "50950:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3969, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "50950:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3972, + "name": "txHash", + "nodeType": "VariableDeclaration", + "scope": 3994, + "src": "50969:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3971, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "50969:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50949:35:8" + }, + "payable": false, + "returnParameters": { + "id": 3976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3975, + "name": "txStatus", + "nodeType": "VariableDeclaration", + "scope": 3994, + "src": "51008:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3974, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "51008:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51007:15:8" + }, + "scope": 4622, + "src": "50929:203:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4034, + "nodeType": "Block", + "src": "51541:486:8", + "statements": [ + { + "assignments": [ + 4004 + ], + "declarations": [ + { + "constant": false, + "id": 4004, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4035, + "src": "51547:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4003, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51547:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4012, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74782e737461747573", + "id": 4008, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51587:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + "value": "tx.status" + }, + { + "argumentTypes": null, + "id": 4009, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3998, + "src": "51600:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 4006, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "51570:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "51570:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51570:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4005, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "51560:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51560:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51547:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "51677:26:8", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4015, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3996, + "src": "51690:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4016, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3998, + "src": "51696:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4014, + "name": "getTxStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3994, + "src": "51678:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) view returns (bool)" + } + }, + "id": 4017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51678:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e20737461747573206d7573742062652066616c7365206265666f72652073657474696e6720746865207472616e73616374696f6e207374617475732e", + "id": 4019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51711:80:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", + "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" + }, + "value": "Error: Transaction status must be false before setting the transaction status." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", + "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" + } + ], + "id": 4013, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "51669:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51669:123:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4021, + "nodeType": "ExpressionStatement", + "src": "51669:123:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4026, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4004, + "src": "51879:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51883:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4023, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3996, + "src": "51858:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4024, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "51858:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "51858:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 4028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51858:30:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51896:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 4022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "51850:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51850:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4031, + "nodeType": "ExpressionStatement", + "src": "51850:154:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52018:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4002, + "id": 4033, + "nodeType": "Return", + "src": "52011:11:8" + } + ] + }, + "documentation": "@notice Set transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 4035, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTxStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3999, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3996, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4035, + "src": "51474:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3995, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "51474:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3998, + "name": "txHash", + "nodeType": "VariableDeclaration", + "scope": 4035, + "src": "51493:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3997, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51493:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51473:35:8" + }, + "payable": false, + "returnParameters": { + "id": 4002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4001, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4035, + "src": "51527:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4000, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "51527:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51526:14:8" + }, + "scope": 4622, + "src": "51453:574:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4148, + "nodeType": "Block", + "src": "53347:1436:8", + "statements": [ + { + "assignments": [ + 4061 + ], + "declarations": [ + { + "constant": false, + "id": 4061, + "name": "fxTxHash", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53354:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4060, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53354:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4073, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4065, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "53400:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4066, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4041, + "src": "53411:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4067, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4043, + "src": "53420:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4068, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "53429:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4069, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4047, + "src": "53437:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4070, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4055, + "src": "53445:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4063, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "53383:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "53383:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53383:73:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4062, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "53373:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53373:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "53354:103:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4076, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "53630:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4077, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "53636:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "53636:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4079, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "53648:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4075, + "name": "verifyAccounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3034, + "src": "53615:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) view returns (bool)" + } + }, + "id": 4080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53615:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204f6e6c79207665726966696564206163636f756e74732063616e20706572666f726d2063757272656e63792073776170732e", + "id": 4081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53666:59:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", + "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" + }, + "value": "Error: Only verified accounts can perform currency swaps." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", + "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" + } + ], + "id": 4074, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "53600:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53600:126:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4083, + "nodeType": "ExpressionStatement", + "src": "53600:126:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4086, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "53850:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4087, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4061, + "src": "53856:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4085, + "name": "setTxStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "53838:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) returns (bool)" + } + }, + "id": 4088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53838:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f20736574207472616e73616374696f6e2073746174757320746f2066756c66696c6c65642e", + "id": 4089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53873:55:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", + "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" + }, + "value": "Error: Failed to set transaction status to fulfilled." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", + "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" + } + ], + "id": 4084, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "53823:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53823:106:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4091, + "nodeType": "ExpressionStatement", + "src": "53823:106:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4093, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4055, + "src": "53994:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4094, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "54008:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53994:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e20686173206578706972656421", + "id": 4096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54013:33:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", + "typeString": "literal_string \"Error: Transaction has expired!\"" + }, + "value": "Error: Transaction has expired!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", + "typeString": "literal_string \"Error: Transaction has expired!\"" + } + ], + "id": 4092, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "53986:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53986:61:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4098, + "nodeType": "ExpressionStatement", + "src": "53986:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4101, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4061, + "src": "54207:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4102, + "name": "sigV", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4049, + "src": "54217:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 4103, + "name": "sigR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4051, + "src": "54223:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4104, + "name": "sigS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4053, + "src": "54229:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4100, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5248, + "src": "54197:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 4105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54197:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 4106, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "54238:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "54197:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204164647265737320646572697665642066726f6d207472616e73616374696f6e207369676e617475726520646f6573206e6f74206d6174636820746865207265717565737465722061646472657373", + "id": 4108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54255:88:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", + "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" + }, + "value": "Error: Address derived from transaction signature does not match the requester address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", + "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" + } + ], + "id": 4099, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "54182:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54182:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4110, + "nodeType": "ExpressionStatement", + "src": "54182:162:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4113, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "54438:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4114, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4041, + "src": "54444:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4115, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "54453:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "54453:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4117, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "54465:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4118, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "54476:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 4119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54484:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "id": 4112, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "54424:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54424:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 4121, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54498:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 4111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "54409:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54409:135:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4123, + "nodeType": "ExpressionStatement", + "src": "54409:135:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4126, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "54580:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4127, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4043, + "src": "54586:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4128, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "54595:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4129, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "54606:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "54606:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4131, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4047, + "src": "54618:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 4132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54626:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "id": 4125, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "54566:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54566:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54640:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 4124, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "54551:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54551:135:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4136, + "nodeType": "ExpressionStatement", + "src": "54551:135:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4138, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4041, + "src": "54705:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4139, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4043, + "src": "54714:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4140, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "54723:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4141, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4047, + "src": "54731:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4142, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4055, + "src": "54739:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4143, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4061, + "src": "54751:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4137, + "name": "FxSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1716, + "src": "54698:6:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (string memory,string memory,uint256,uint256,uint256,bytes32)" + } + }, + "id": 4144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54698:62:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4145, + "nodeType": "EmitStatement", + "src": "54693:67:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54774:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4059, + "id": 4147, + "nodeType": "Return", + "src": "54767:11:8" + } + ] + }, + "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev | This method can be called directly between peers\n@dev | This method does not take transaction fees from the swap\n@param self Internal storage proxying TokenIOStorage contract\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4149, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "execSwap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4037, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53123:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4036, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "53123:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4039, + "name": "requester", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53146:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4038, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "53146:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4041, + "name": "symbolA", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53169:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4040, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "53169:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4043, + "name": "symbolB", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53189:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4042, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "53189:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4045, + "name": "valueA", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53209:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4044, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53209:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4047, + "name": "valueB", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53226:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53226:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4049, + "name": "sigV", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53243:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4048, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "53243:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4051, + "name": "sigR", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53259:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4050, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53259:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4053, + "name": "sigS", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53277:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4052, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53277:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4055, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53295:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4054, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53295:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "53117:197:8" + }, + "payable": false, + "returnParameters": { + "id": 4059, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4058, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4149, + "src": "53333:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4057, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "53333:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "53332:14:8" + }, + "scope": 4622, + "src": "53100:1683:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4187, + "nodeType": "Block", + "src": "55336:350:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4159, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "55350:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 4160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55369:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "55350:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2063616e6e6f74206465707265636174652061206e756c6c20616464726573732e", + "id": 4162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55382:41:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", + "typeString": "literal_string \"Error: cannot deprecate a null address.\"" + }, + "value": "Error: cannot deprecate a null address." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", + "typeString": "literal_string \"Error: cannot deprecate a null address.\"" + } + ], + "id": 4158, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "55342:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55342:82:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4164, + "nodeType": "ExpressionStatement", + "src": "55342:82:8" + }, + { + "assignments": [ + 4166 + ], + "declarations": [ + { + "constant": false, + "id": 4166, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4188, + "src": "55431:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4165, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "55431:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4174, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6465706372656361746564", + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55471:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + "value": "depcrecated" + }, + { + "argumentTypes": null, + "id": 4171, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "55486:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4168, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "55454:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "55454:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55454:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4167, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "55444:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55444:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "55431:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4179, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4166, + "src": "55539:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55543:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4176, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4151, + "src": "55518:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "55518:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5046, + "src": "55518:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 4181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55518:30:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55556:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "55510:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55510:153:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4184, + "nodeType": "ExpressionStatement", + "src": "55510:153:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55677:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4157, + "id": 4186, + "nodeType": "Return", + "src": "55670:11:8" + } + ] + }, + "documentation": "@notice Deprecate a contract interface\n@dev | This is a low-level method to deprecate a contract interface.\n@dev | This is useful if the interface needs to be updated or becomes out of date\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4188, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setDeprecatedContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4151, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4188, + "src": "55260:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4150, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "55260:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4153, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4188, + "src": "55279:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "55279:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "55259:44:8" + }, + "payable": false, + "returnParameters": { + "id": 4157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4156, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4188, + "src": "55322:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "55322:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "55321:14:8" + }, + "scope": 4622, + "src": "55229:457:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4213, + "nodeType": "Block", + "src": "56100:120:8", + "statements": [ + { + "assignments": [ + 4198 + ], + "declarations": [ + { + "constant": false, + "id": 4198, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4214, + "src": "56106:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4197, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "56106:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4206, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6465706372656361746564", + "id": 4202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56146:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + "value": "depcrecated" + }, + { + "argumentTypes": null, + "id": 4203, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4192, + "src": "56161:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4200, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "56129:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "56129:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56129:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4199, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "56119:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56119:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56106:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4210, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4198, + "src": "56212:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4207, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4190, + "src": "56191:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4208, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "56191:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5228, + "src": "56191:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 4211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56191:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4196, + "id": 4212, + "nodeType": "Return", + "src": "56184:31:8" + } + ] + }, + "documentation": "@notice Return the deprecation status of a contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}", + "id": 4214, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isContractDeprecated", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4193, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4190, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4214, + "src": "56020:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4189, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "56020:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4192, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4214, + "src": "56039:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4191, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "56039:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56019:44:8" + }, + "payable": false, + "returnParameters": { + "id": 4196, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4195, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 4214, + "src": "56087:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4194, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "56087:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56086:13:8" + }, + "scope": 4622, + "src": "55990:230:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4247, + "nodeType": "Block", + "src": "56743:264:8", + "statements": [ + { + "assignments": [ + 4226 + ], + "declarations": [ + { + "constant": false, + "id": 4226, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56749:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4225, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "56749:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4234, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6c696d69742e7370656e64696e672e706572696f64", + "id": 4230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56789:23:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + "value": "limit.spending.period" + }, + { + "argumentTypes": null, + "id": 4231, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4218, + "src": "56814:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4228, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "56772:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "56772:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56772:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4227, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "56762:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56762:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56749:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4239, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4226, + "src": "56858:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4240, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4220, + "src": "56862:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4236, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4216, + "src": "56837:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4237, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "56837:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "56837:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56837:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56877:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4235, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "56829:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56829:155:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4244, + "nodeType": "ExpressionStatement", + "src": "56829:155:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56998:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4224, + "id": 4246, + "nodeType": "Return", + "src": "56991:11:8" + } + ] + }, + "documentation": "@notice Set the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param period Unix timestamp of the spending period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4248, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4221, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4216, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56662:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4215, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "56662:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4218, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56681:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4217, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "56681:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4220, + "name": "period", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56698:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4219, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "56698:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56661:49:8" + }, + "payable": false, + "returnParameters": { + "id": 4224, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4223, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4248, + "src": "56729:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4222, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "56729:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56728:14:8" + }, + "scope": 4622, + "src": "56628:379:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4273, + "nodeType": "Block", + "src": "57592:122:8", + "statements": [ + { + "assignments": [ + 4258 + ], + "declarations": [ + { + "constant": false, + "id": 4258, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4274, + "src": "57598:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4257, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "57598:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4266, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6c696d69742e7370656e64696e672e706572696f64", + "id": 4262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "57638:23:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + "value": "limit.spending.period" + }, + { + "argumentTypes": null, + "id": 4263, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4252, + "src": "57663:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4260, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "57621:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "57621:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57621:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4259, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "57611:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57611:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57598:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4270, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4258, + "src": "57706:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4267, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4250, + "src": "57685:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "57685:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "57685:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57685:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4256, + "id": 4272, + "nodeType": "Return", + "src": "57678:31:8" + } + ] + }, + "documentation": "@notice Get the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@dev | If the current spending period has expired, it will be set upon next `transfer()`\nor `transferFrom()` request\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"period\" : \"Returns Unix timestamp of the current spending period\"}", + "id": 4274, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4250, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4274, + "src": "57520:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4249, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "57520:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4252, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4274, + "src": "57539:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4251, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "57539:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57519:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4256, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4255, + "name": "period", + "nodeType": "VariableDeclaration", + "scope": 4274, + "src": "57579:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4254, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "57579:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57578:13:8" + }, + "scope": 4622, + "src": "57486:228:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4307, + "nodeType": "Block", + "src": "58200:264:8", + "statements": [ + { + "assignments": [ + 4286 + ], + "declarations": [ + { + "constant": false, + "id": 4286, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58206:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4285, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "58206:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4294, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", + "id": 4290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58246:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + "value": "account.spending.limit" + }, + { + "argumentTypes": null, + "id": 4291, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4278, + "src": "58272:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4288, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "58229:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "58229:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58229:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4287, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "58219:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58219:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "58206:75:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4299, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4286, + "src": "58316:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4300, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4280, + "src": "58320:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4296, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4276, + "src": "58295:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4297, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "58295:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "58295:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58295:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4302, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58334:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4295, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "58287:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58287:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4304, + "nodeType": "ExpressionStatement", + "src": "58287:154:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58455:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4284, + "id": 4306, + "nodeType": "Return", + "src": "58448:11:8" + } + ] + }, + "documentation": "@notice Set the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param limit Spending limit amount\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4308, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4276, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58120:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4275, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "58120:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4278, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58139:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4277, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "58139:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4280, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58156:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4279, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "58156:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58119:48:8" + }, + "payable": false, + "returnParameters": { + "id": 4284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4283, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4308, + "src": "58186:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4282, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "58186:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58185:14:8" + }, + "scope": 4622, + "src": "58087:377:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4333, + "nodeType": "Block", + "src": "58889:123:8", + "statements": [ + { + "assignments": [ + 4318 + ], + "declarations": [ + { + "constant": false, + "id": 4318, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4334, + "src": "58895:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4317, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "58895:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4326, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", + "id": 4322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58935:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + "value": "account.spending.limit" + }, + { + "argumentTypes": null, + "id": 4323, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4312, + "src": "58961:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4320, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "58918:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "58918:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58918:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4319, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "58908:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58908:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "58895:75:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4330, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4318, + "src": "59004:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4327, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4310, + "src": "58983:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "58983:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "58983:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58983:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4316, + "id": 4332, + "nodeType": "Return", + "src": "58976:31:8" + } + ] + }, + "documentation": "@notice Get the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"limit\" : \"Returns the account spending limit amount\"}", + "id": 4334, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4310, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4334, + "src": "58818:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4309, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "58818:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4312, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4334, + "src": "58837:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "58837:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58817:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4315, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 4334, + "src": "58877:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "58877:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58876:12:8" + }, + "scope": 4622, + "src": "58785:227:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4399, + "nodeType": "Block", + "src": "59712:887:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4347, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "59846:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4348, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "59852:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4346, + "name": "updateAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "59818:27:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 4349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59818:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59868:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4345, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "59810:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59810:109:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4352, + "nodeType": "ExpressionStatement", + "src": "59810:109:8" + }, + { + "assignments": [ + 4354 + ], + "declarations": [ + { + "constant": false, + "id": 4354, + "name": "updatedAmount", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59926:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4353, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "59926:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4362, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4360, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4340, + "src": "59991:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4356, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "59972:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4357, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "59978:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4355, + "name": "getAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4487, + "src": "59947:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59947:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "59947:43:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59947:51:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "59926:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4365, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "60128:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4366, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60134:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4364, + "name": "getAccountSpendingLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4334, + "src": "60104:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60104:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4368, + "name": "updatedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "60146:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60104:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e742063616e6e6f742065786365656420697473206461696c79207370656e64206c696d69742e", + "id": 4370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60167:53:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", + "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" + }, + "value": "Error: Account cannot exceed its daily spend limit." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", + "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" + } + ], + "id": 4363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "60089:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60089:132:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4372, + "nodeType": "ExpressionStatement", + "src": "60089:132:8" + }, + { + "assignments": [ + 4374 + ], + "declarations": [ + { + "constant": false, + "id": 4374, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "60291:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4373, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "60291:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4386, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", + "id": 4378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60331:25:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + "value": "account.spending.amount" + }, + { + "argumentTypes": null, + "id": 4379, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60358:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4381, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "60392:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4382, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60398:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4380, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4274, + "src": "60367:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60367:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4376, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "60314:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "60314:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60314:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4375, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "60304:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60304:104:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "60291:117:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4391, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4374, + "src": "60443:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4392, + "name": "updatedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "60447:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4388, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4336, + "src": "60422:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4389, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "60422:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "60422:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60422:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60469:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "60414:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60414:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4396, + "nodeType": "ExpressionStatement", + "src": "60414:162:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4397, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60590:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4344, + "id": 4398, + "nodeType": "Return", + "src": "60583:11:8" + } + ] + }, + "documentation": "@notice Set the account spending amount for the daily period\n@dev | Each account has it's own daily spending limit\n@dev | This transaction will throw if the new spending amount is greater than the limit\n@dev | This method is called in the `transfer()` and `transferFrom()` methods\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param amount Set the amount spent for the daily period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4400, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4341, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4336, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59631:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4335, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "59631:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4338, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59650:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4337, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "59650:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4340, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59667:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4339, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "59667:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59630:49:8" + }, + "payable": false, + "returnParameters": { + "id": 4344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4343, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "59698:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4342, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "59698:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59697:14:8" + }, + "scope": 4622, + "src": "59597:1002:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4456, + "nodeType": "Block", + "src": "61159:398:8", + "statements": [ + { + "assignments": [ + 4410 + ], + "declarations": [ + { + "constant": false, + "id": 4410, + "name": "begDate", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61165:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4409, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "61165:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4415, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4412, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4402, + "src": "61205:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4413, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4404, + "src": "61211:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4411, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4274, + "src": "61180:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61180:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "61165:54:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4416, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4410, + "src": "61229:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 4417, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "61239:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61229:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4454, + "nodeType": "Block", + "src": "61276:277:8", + "statements": [ + { + "assignments": [ + 4423 + ], + "declarations": [ + { + "constant": false, + "id": 4423, + "name": "duration", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61284:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4422, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "61284:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4425, + "initialValue": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 4424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61300:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "nodeType": "VariableDeclarationStatement", + "src": "61284:21:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4428, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4402, + "src": "61381:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4429, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4404, + "src": "61387:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4445, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4423, + "src": "61454:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 4441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61446:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4438, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4423, + "src": "61432:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4434, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4410, + "src": "61418:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4432, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "61410:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "61410:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61410:16:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4436, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61409:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "61409:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61409:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "61409:36:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61409:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4443, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61408:41:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "61408:45:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61408:55:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4430, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4410, + "src": "61396:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "61396:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61396:68:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4427, + "name": "setAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4248, + "src": "61356:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 4448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61356:109:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61475:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4426, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "61339:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61339:187:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4451, + "nodeType": "ExpressionStatement", + "src": "61339:187:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61542:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4408, + "id": 4453, + "nodeType": "Return", + "src": "61535:11:8" + } + ] + }, + "id": 4455, + "nodeType": "IfStatement", + "src": "61225:328:8", + "trueBody": { + "id": 4421, + "nodeType": "Block", + "src": "61244:26:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61259:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4408, + "id": 4420, + "nodeType": "Return", + "src": "61252:11:8" + } + ] + } + } + ] + }, + "documentation": "@notice Low-level API to ensure the account spending period is always current\n@dev | This method is internally called by `setAccountSpendingAmount()` to ensure\nspending period is always the most current daily period.\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4457, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updateAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4402, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61091:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4401, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "61091:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4404, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61110:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "61110:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61090:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4407, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "61145:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4406, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "61145:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61144:14:8" + }, + "scope": 4622, + "src": "61054:503:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4486, + "nodeType": "Block", + "src": "62021:165:8", + "statements": [ + { + "assignments": [ + 4467 + ], + "declarations": [ + { + "constant": false, + "id": 4467, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4487, + "src": "62027:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4466, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "62027:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4479, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", + "id": 4471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "62067:25:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + "value": "account.spending.amount" + }, + { + "argumentTypes": null, + "id": 4472, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4461, + "src": "62094:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4474, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4459, + "src": "62128:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4475, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4461, + "src": "62134:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4473, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4274, + "src": "62103:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62103:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4469, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "62050:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "62050:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62050:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4468, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "62040:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62040:104:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62027:117:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4483, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4467, + "src": "62178:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4480, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4459, + "src": "62157:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4481, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "62157:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "62157:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62157:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4465, + "id": 4485, + "nodeType": "Return", + "src": "62150:31:8" + } + ] + }, + "documentation": "@notice Return the amount spent during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount spent by the account during the current period\"}", + "id": 4487, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4462, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4459, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4487, + "src": "61949:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4458, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "61949:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4461, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4487, + "src": "61968:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "61968:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61948:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4464, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4487, + "src": "62008:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4463, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "62008:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62007:13:8" + }, + "scope": 4622, + "src": "61915:271:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4507, + "nodeType": "Block", + "src": "62669:101:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4502, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4489, + "src": "62750:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4503, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4491, + "src": "62756:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4501, + "name": "getAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4487, + "src": "62725:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62725:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4497, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4489, + "src": "62706:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4498, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4491, + "src": "62712:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4496, + "name": "getAccountSpendingLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4334, + "src": "62682:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62682:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "62682:42:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62682:83:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4495, + "id": 4506, + "nodeType": "Return", + "src": "62675:90:8" + } + ] + }, + "documentation": "@notice Return the amount remaining during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}", + "id": 4508, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingRemaining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4492, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4489, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4508, + "src": "62589:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4488, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "62589:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4491, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4508, + "src": "62608:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4490, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "62608:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62588:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4495, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4494, + "name": "remainingLimit", + "nodeType": "VariableDeclaration", + "scope": 4508, + "src": "62648:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4493, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "62648:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62647:21:8" + }, + "scope": 4622, + "src": "62552:218:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4541, + "nodeType": "Block", + "src": "63363:207:8", + "statements": [ + { + "assignments": [ + 4520 + ], + "declarations": [ + { + "constant": false, + "id": 4520, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63369:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4519, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "63369:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4528, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66782e7573642e72617465", + "id": 4524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63409:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + "value": "fx.usd.rate" + }, + { + "argumentTypes": null, + "id": 4525, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4512, + "src": "63424:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4522, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "63392:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "63392:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63392:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4521, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "63382:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63382:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63369:65:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4533, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4520, + "src": "63476:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4534, + "name": "bpsRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4514, + "src": "63480:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4530, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4510, + "src": "63455:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4531, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "63455:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4986, + "src": "63455:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63455:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63496:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4529, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "63440:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63440:107:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4538, + "nodeType": "ExpressionStatement", + "src": "63440:107:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63561:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4518, + "id": 4540, + "nodeType": "Return", + "src": "63554:11:8" + } + ] + }, + "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 4542, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFxUSDBPSRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4510, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63281:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4509, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "63281:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4512, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63300:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4511, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "63300:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4514, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63317:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4513, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "63317:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63280:50:8" + }, + "payable": false, + "returnParameters": { + "id": 4518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4517, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "63349:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4516, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "63349:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63348:14:8" + }, + "scope": 4622, + "src": "63256:314:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4567, + "nodeType": "Block", + "src": "63976:113:8", + "statements": [ + { + "assignments": [ + 4552 + ], + "declarations": [ + { + "constant": false, + "id": 4552, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4568, + "src": "63982:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4551, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "63982:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4560, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66782e7573642e72617465", + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64022:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + "value": "fx.usd.rate" + }, + { + "argumentTypes": null, + "id": 4557, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4546, + "src": "64037:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4554, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "64005:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "64005:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64005:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4553, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "63995:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63995:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63982:65:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4564, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4552, + "src": "64081:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4561, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4544, + "src": "64060:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4562, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "64060:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5192, + "src": "64060:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64060:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4550, + "id": 4566, + "nodeType": "Return", + "src": "64053:31:8" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount in basis points\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", + "id": 4568, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDBPSRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4544, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4568, + "src": "63903:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4543, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "63903:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4546, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4568, + "src": "63922:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4545, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "63922:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63902:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4549, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 4568, + "src": "63962:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4548, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "63962:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63961:14:8" + }, + "scope": 4622, + "src": "63878:211:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4620, + "nodeType": "Block", + "src": "64558:330:8", + "statements": [ + { + "assignments": [ + 4580 + ], + "declarations": [ + { + "constant": false, + "id": 4580, + "name": "usdDecimals", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64564:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4579, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64564:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4585, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4582, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4570, + "src": "64600:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "hexValue": "55534478", + "id": 4583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64606:6:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", + "typeString": "literal_string \"USDx\"" + }, + "value": "USDx" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", + "typeString": "literal_string \"USDx\"" + } + ], + "id": 4581, + "name": "getTokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2512, + "src": "64583:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64583:30:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64564:49:8" + }, + { + "assignments": [ + 4587 + ], + "declarations": [ + { + "constant": false, + "id": 4587, + "name": "fxDecimals", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64619:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4586, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64619:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4592, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4589, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4570, + "src": "64654:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4590, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4572, + "src": "64660:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4588, + "name": "getTokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2512, + "src": "64637:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64637:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64619:50:8" + }, + { + "assignments": [ + 4594 + ], + "declarations": [ + { + "constant": false, + "id": 4594, + "name": "usdAmount", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64743:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4593, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64743:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4617, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64846:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 4614, + "name": "fxDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4587, + "src": "64850:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64846:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64824:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 4608, + "name": "usdDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4580, + "src": "64828:11:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64824:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 4603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64812:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4598, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4570, + "src": "64791:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4599, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4572, + "src": "64797:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4597, + "name": "getFxUSDBPSRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4568, + "src": "64775:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64775:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4595, + "name": "fxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4574, + "src": "64762:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "64762:12:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64762:45:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "64762:49:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64762:56:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4605, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64761:58:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "64761:62:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64761:79:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4611, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64760:81:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "64760:85:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64760:101:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64743:118:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 4618, + "name": "usdAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4594, + "src": "64874:9:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4578, + "id": 4619, + "nodeType": "Return", + "src": "64867:16:8" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"amount\" : \"Returns the foreign currency amount in USD\"}", + "id": 4621, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4570, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64471:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4569, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "64471:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4572, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64490:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4571, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "64490:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4574, + "name": "fxAmount", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64507:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4573, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64507:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64470:51:8" + }, + "payable": false, + "returnParameters": { + "id": 4578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4577, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4621, + "src": "64545:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4576, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64545:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64544:13:8" + }, + "scope": 4622, + "src": "64447:441:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 4623, + "src": "900:63992:8" + } + ], + "src": "0:64893:8" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0xcccfe9e6d1baceef27b419620792dbf77ccb8ab7", + "transactionHash": "0x60ded27a41d0d3109119edefdfb66820903c19ceb56d46590a201a7c2f1646dd" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.654Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIOMerchant.json b/deployed/mainnet/TokenIOMerchant.json new file mode 100644 index 0000000..87b8f88 --- /dev/null +++ b/deployed/mainnet/TokenIOMerchant.json @@ -0,0 +1,7198 @@ +{ + "contractName": "TokenIOMerchant", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "feeContract", + "type": "address" + } + ], + "name": "setParams", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getFeeParams", + "outputs": [ + { + "name": "bps", + "type": "uint256" + }, + { + "name": "min", + "type": "uint256" + }, + { + "name": "max", + "type": "uint256" + }, + { + "name": "flat", + "type": "uint256" + }, + { + "name": "feeMsg", + "type": "bytes" + }, + { + "name": "feeAccount", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateFees", + "outputs": [ + { + "name": "fees", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "merchant", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "merchantPaysFees", + "type": "bool" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "pay", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051602080612e2b833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a039094169390931783558154169091179055612db590819061007690396000f3006080604052600436106100745763ffffffff60e060020a6000350416634bbc142c81146100795780634e49acac146100ae57806352238fdd146100cf578063666a3427146100f9578063666e1b391461011a5780636db31c251461013b578063be6fc181146101ef578063f2fde38b146102b1575b600080fd5b34801561008557600080fd5b5061009a600160a060020a03600435166102d2565b604080519115158252519081900360200190f35b3480156100ba57600080fd5b5061009a600160a060020a036004351661038e565b3480156100db57600080fd5b506100e76004356104b4565b60408051918252519081900360200190f35b34801561010557600080fd5b5061009a600160a060020a03600435166104df565b34801561012657600080fd5b5061009a600160a060020a0360043516610598565b34801561014757600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261009a94369492936024939284019190819084018382808284375050604080516020601f60608a01358b0180359182018390048302840183018552818452989b600160a060020a038b35169b838c01359b9586013515159a9199509750608090940195509193509182019181908401838280828437509497506105ad9650505050505050565b3480156101fb57600080fd5b50610204610855565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b83811015610271578181015183820152602001610259565b50505050905090810190601f16801561029e5780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3480156102bd57600080fd5b5061009a600160a060020a036004351661092b565b3360009081526020819052604081205460ff16151561033d576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff1615156103f9576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b61040a60018363ffffffff610a6516565b15156104ac576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a20556e61626c6520746f207365742066656520636f6e7472616360448201527f742e20456e7375726520636f6e747261637420697320616c6c6f77656420627960648201527f2073746f7261676520636f6e74726163742e0000000000000000000000000000608482015290519081900360a40190fd5b506001919050565b60006104d96104ca60013063ffffffff610c6816565b6001908463ffffffff610de316565b92915050565b3360009081526020819052604081205460ff16151561054a576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60008060006105bb866104b4565b91506105e2336105d360018b8a63ffffffff6112d416565b6001919063ffffffff61136c16565b151561065e576040805160e560020a62461bcd02815260206004820152602d60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073706560448201527f6e64696e6720616d6f756e742e00000000000000000000000000000000000000606482015290519081900360840190fd5b610673600189338a8a8963ffffffff6116b016565b15156106ef576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e7400000000000000000000000000000000000000000000606482015290519081900360840190fd5b61070060013063ffffffff610c6816565b905084156107b3576107328888838561072060018363ffffffff611e3416565b6001949392919063ffffffff6116b016565b15156107ae576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b610847565b6107cb8833838561072060018363ffffffff611e3416565b1515610847576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b506001979650505050505050565b600080808060608161087f61087160013063ffffffff610c6816565b60019063ffffffff611fe716565b6108a161089360013063ffffffff610c6816565b60019063ffffffff61213a16565b6108c36108b560013063ffffffff610c6816565b60019063ffffffff6121cb16565b6108e56108d760013063ffffffff610c6816565b60019063ffffffff61225c16565b6109076108f960013063ffffffff610c6816565b60019063ffffffff611e3416565b61091860013063ffffffff610c6816565b949b939a50919850965094509092509050565b3360009081526020819052604081205460ff161515610996576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a03821615156109f6576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b604080517f6665652e6163636f756e74000000000000000000000000000000000000000000602080830191909152606060020a3002602b8301528251601f818403018152603f909201928390528151600093849392909182918401908083835b60208310610ae45780518252601f199092019160209182019101610ac5565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b158015610b7a57600080fd5b505af1158015610b8e573d6000803e3d6000fd5b505050506040513d6020811015610ba457600080fd5b50511515610c5c576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b600191505b5092915050565b60008060008360405160200180807f6665652e6163636f756e74000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310610cfc5780518252601f199092019160209182019101610cdd565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015610d8957600080fd5b505af1158015610d9d573d6000803e3d6000fd5b505050506040513d6020811015610db357600080fd5b50519050600160a060020a0381161515610dd757610dd0856122ed565b9250610ddb565b8092505b505092915050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b60208310610e7e5780518252601f199092019160209182019101610e5f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015610edf57600080fd5b505af1158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b60208310610f9f5780518252601f199092019160209182019101610f80565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561100057600080fd5b505af1158015611014573d6000803e3d6000fd5b505050506040513d602081101561102a57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106110c05780518252601f1990920191602091820191016110a1565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561112157600080fd5b505af1158015611135573d6000803e3d6000fd5b505050506040513d602081101561114b57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106111e15780518252601f1990920191602091820191016111c2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561124257600080fd5b505af1158015611256573d6000803e3d6000fd5b505050506040513d602081101561126c57600080fd5b505191506112a28261129661271061128a8b8863ffffffff61241f16565b9063ffffffff6124c516565b9063ffffffff6124dc16565b9050848111156112b4578495506112c8565b838110156112c4578395506112c8565b8095505b50505050509392505050565b600080600080611319876040805190810160405280600481526020017f555344780000000000000000000000000000000000000000000000000000000081525061255f565b9250611325878761255f565b915061136182600a0a61128a85600a0a61135561271061128a6113488e8e61261f565b8c9063ffffffff61241f16565b9063ffffffff61241f16565b979650505050505050565b600080600061137b868661267c565b15156113f7576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b61140584611296888861275f565b9150816114128787612801565b101561148e576040805160e560020a62461bcd02815260206004820152603360248201527f4572726f723a204163636f756e742063616e6e6f74206578636565642069747360448201527f206461696c79207370656e64206c696d69742e00000000000000000000000000606482015290519081900360840190fd5b846114998787612892565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061152e5780518252601f19909201916020918201910161150f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018a90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b1580156115c257600080fd5b505af11580156115d6573d6000803e3d6000fd5b505050506040513d60208110156115ec57600080fd5b505115156116a4576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b50600195945050505050565b60008080600160a060020a038616151561173a576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876117458a89612923565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061179f5780518252601f199092019160209182019101611780565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106118215780518252601f199092019160209182019101611802565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902091508761185b8a88612923565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106118b55780518252601f199092019160209182019101611896565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106119375780518252601f199092019160209182019101611918565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018a90529451909750600160a060020a03909416955063e2a4853a94508793611a0893508b92879263bd02d0f5926024808401938290030181600087803b1580156119d057600080fd5b505af11580156119e4573d6000803e3d6000fd5b505050506040513d60208110156119fa57600080fd5b50519063ffffffff612a9116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015611a5057600080fd5b505af1158015611a64573d6000803e3d6000fd5b505050506040513d6020811015611a7a57600080fd5b50511515611b32576040805160e560020a62461bcd0281526020600482015260696024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8854604080517fbd02d0f5000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163e2a4853a918491611bdf918a91869163bd02d0f59160248083019260209291908290030181600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050506040513d6020811015611bd157600080fd5b50519063ffffffff6124dc16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015611c2757600080fd5b505af1158015611c3b573d6000803e3d6000fd5b505050506040513d6020811015611c5157600080fd5b50511515611d09576040805160e560020a62461bcd0281526020600482015260696024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b83811015611d88578181015183820152602001611d70565b50505050905090810190601f168015611db55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611de8578181015183820152602001611dd0565b50505050905090810190601f168015611e155780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ec75780518252601f199092019160209182019101611ea8565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f9457600080fd5b810190808051640100000000811115611fac57600080fd5b82016020810184811115611fbf57600080fd5b8151640100000000811182820187101715611fd957600080fd5b509098975050505050505050565b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106120795780518252601f19909201916020918201910161205a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561210657600080fd5b505af115801561211a573d6000803e3d6000fd5b505050506040513d602081101561213057600080fd5b5051949350505050565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b6020831061235f5780518252601f199092019160209182019101612340565b51815160209384036101000a60001901801990921691161790526040805192909401829003822089547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b1580156123ec57600080fd5b505af1158015612400573d6000803e3d6000fd5b505050506040513d602081101561241657600080fd5b50519392505050565b6000808315156124325760009150610c61565b5082820282848281151561244257fe5b04146124be576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b60008082848115156124d357fe5b04949350505050565b6000828201838110156124be576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e0182805190602001908083835b602083106125bd5780518252601f19909201916020918201910161259e565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b018280519060200190808383602083106125bd5780518252601f19909201916020918201910161259e565b600080600061268b8585612892565b91504282111561269e5760019250610ddb565b50620151806126da85856126d56126c88561135560016112968361128a428d63ffffffff612a9116565b869063ffffffff6124dc16565b612b16565b1515612756576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b60019250610ddb565b6000808261276d8585612892565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a02815260140182815260200192505050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106129b75780518252601f199092019160209182019101612998565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015612a4457600080fd5b505af1158015612a58573d6000803e3d6000fd5b505050506040513d6020811015612a6e57600080fd5b50519050600160a060020a03811615612a8957809250610ddb565b839250610ddb565b600082821115612b10576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310612ba85780518252601f199092019160209182019101612b89565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612c3c57600080fd5b505af1158015612c50573d6000803e3d6000fd5b505050506040513d6020811015612c6657600080fd5b50511515612d1e576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742073746f726167652076616c4572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a723058206d1f59bafb99fbae076da55eed0519583ed796a326864a3d34935ee156e570e60029", + "deployedBytecode": "0x6080604052600436106100745763ffffffff60e060020a6000350416634bbc142c81146100795780634e49acac146100ae57806352238fdd146100cf578063666a3427146100f9578063666e1b391461011a5780636db31c251461013b578063be6fc181146101ef578063f2fde38b146102b1575b600080fd5b34801561008557600080fd5b5061009a600160a060020a03600435166102d2565b604080519115158252519081900360200190f35b3480156100ba57600080fd5b5061009a600160a060020a036004351661038e565b3480156100db57600080fd5b506100e76004356104b4565b60408051918252519081900360200190f35b34801561010557600080fd5b5061009a600160a060020a03600435166104df565b34801561012657600080fd5b5061009a600160a060020a0360043516610598565b34801561014757600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261009a94369492936024939284019190819084018382808284375050604080516020601f60608a01358b0180359182018390048302840183018552818452989b600160a060020a038b35169b838c01359b9586013515159a9199509750608090940195509193509182019181908401838280828437509497506105ad9650505050505050565b3480156101fb57600080fd5b50610204610855565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b83811015610271578181015183820152602001610259565b50505050905090810190601f16801561029e5780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3480156102bd57600080fd5b5061009a600160a060020a036004351661092b565b3360009081526020819052604081205460ff16151561033d576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff1615156103f9576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b61040a60018363ffffffff610a6516565b15156104ac576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a20556e61626c6520746f207365742066656520636f6e7472616360448201527f742e20456e7375726520636f6e747261637420697320616c6c6f77656420627960648201527f2073746f7261676520636f6e74726163742e0000000000000000000000000000608482015290519081900360a40190fd5b506001919050565b60006104d96104ca60013063ffffffff610c6816565b6001908463ffffffff610de316565b92915050565b3360009081526020819052604081205460ff16151561054a576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60008060006105bb866104b4565b91506105e2336105d360018b8a63ffffffff6112d416565b6001919063ffffffff61136c16565b151561065e576040805160e560020a62461bcd02815260206004820152602d60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073706560448201527f6e64696e6720616d6f756e742e00000000000000000000000000000000000000606482015290519081900360840190fd5b610673600189338a8a8963ffffffff6116b016565b15156106ef576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e7400000000000000000000000000000000000000000000606482015290519081900360840190fd5b61070060013063ffffffff610c6816565b905084156107b3576107328888838561072060018363ffffffff611e3416565b6001949392919063ffffffff6116b016565b15156107ae576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b610847565b6107cb8833838561072060018363ffffffff611e3416565b1515610847576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b506001979650505050505050565b600080808060608161087f61087160013063ffffffff610c6816565b60019063ffffffff611fe716565b6108a161089360013063ffffffff610c6816565b60019063ffffffff61213a16565b6108c36108b560013063ffffffff610c6816565b60019063ffffffff6121cb16565b6108e56108d760013063ffffffff610c6816565b60019063ffffffff61225c16565b6109076108f960013063ffffffff610c6816565b60019063ffffffff611e3416565b61091860013063ffffffff610c6816565b949b939a50919850965094509092509050565b3360009081526020819052604081205460ff161515610996576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a03821615156109f6576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b604080517f6665652e6163636f756e74000000000000000000000000000000000000000000602080830191909152606060020a3002602b8301528251601f818403018152603f909201928390528151600093849392909182918401908083835b60208310610ae45780518252601f199092019160209182019101610ac5565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b158015610b7a57600080fd5b505af1158015610b8e573d6000803e3d6000fd5b505050506040513d6020811015610ba457600080fd5b50511515610c5c576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b600191505b5092915050565b60008060008360405160200180807f6665652e6163636f756e74000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310610cfc5780518252601f199092019160209182019101610cdd565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015610d8957600080fd5b505af1158015610d9d573d6000803e3d6000fd5b505050506040513d6020811015610db357600080fd5b50519050600160a060020a0381161515610dd757610dd0856122ed565b9250610ddb565b8092505b505092915050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b60208310610e7e5780518252601f199092019160209182019101610e5f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015610edf57600080fd5b505af1158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b60208310610f9f5780518252601f199092019160209182019101610f80565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561100057600080fd5b505af1158015611014573d6000803e3d6000fd5b505050506040513d602081101561102a57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106110c05780518252601f1990920191602091820191016110a1565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561112157600080fd5b505af1158015611135573d6000803e3d6000fd5b505050506040513d602081101561114b57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106111e15780518252601f1990920191602091820191016111c2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561124257600080fd5b505af1158015611256573d6000803e3d6000fd5b505050506040513d602081101561126c57600080fd5b505191506112a28261129661271061128a8b8863ffffffff61241f16565b9063ffffffff6124c516565b9063ffffffff6124dc16565b9050848111156112b4578495506112c8565b838110156112c4578395506112c8565b8095505b50505050509392505050565b600080600080611319876040805190810160405280600481526020017f555344780000000000000000000000000000000000000000000000000000000081525061255f565b9250611325878761255f565b915061136182600a0a61128a85600a0a61135561271061128a6113488e8e61261f565b8c9063ffffffff61241f16565b9063ffffffff61241f16565b979650505050505050565b600080600061137b868661267c565b15156113f7576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b61140584611296888861275f565b9150816114128787612801565b101561148e576040805160e560020a62461bcd02815260206004820152603360248201527f4572726f723a204163636f756e742063616e6e6f74206578636565642069747360448201527f206461696c79207370656e64206c696d69742e00000000000000000000000000606482015290519081900360840190fd5b846114998787612892565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061152e5780518252601f19909201916020918201910161150f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018a90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b1580156115c257600080fd5b505af11580156115d6573d6000803e3d6000fd5b505050506040513d60208110156115ec57600080fd5b505115156116a4576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b50600195945050505050565b60008080600160a060020a038616151561173a576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876117458a89612923565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061179f5780518252601f199092019160209182019101611780565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106118215780518252601f199092019160209182019101611802565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902091508761185b8a88612923565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106118b55780518252601f199092019160209182019101611896565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106119375780518252601f199092019160209182019101611918565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018a90529451909750600160a060020a03909416955063e2a4853a94508793611a0893508b92879263bd02d0f5926024808401938290030181600087803b1580156119d057600080fd5b505af11580156119e4573d6000803e3d6000fd5b505050506040513d60208110156119fa57600080fd5b50519063ffffffff612a9116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015611a5057600080fd5b505af1158015611a64573d6000803e3d6000fd5b505050506040513d6020811015611a7a57600080fd5b50511515611b32576040805160e560020a62461bcd0281526020600482015260696024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8854604080517fbd02d0f5000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163e2a4853a918491611bdf918a91869163bd02d0f59160248083019260209291908290030181600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050506040513d6020811015611bd157600080fd5b50519063ffffffff6124dc16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015611c2757600080fd5b505af1158015611c3b573d6000803e3d6000fd5b505050506040513d6020811015611c5157600080fd5b50511515611d09576040805160e560020a62461bcd0281526020600482015260696024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b83811015611d88578181015183820152602001611d70565b50505050905090810190601f168015611db55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611de8578181015183820152602001611dd0565b50505050905090810190601f168015611e155780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ec75780518252601f199092019160209182019101611ea8565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f9457600080fd5b810190808051640100000000811115611fac57600080fd5b82016020810184811115611fbf57600080fd5b8151640100000000811182820187101715611fd957600080fd5b509098975050505050505050565b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106120795780518252601f19909201916020918201910161205a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561210657600080fd5b505af115801561211a573d6000803e3d6000fd5b505050506040513d602081101561213057600080fd5b5051949350505050565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b6020831061235f5780518252601f199092019160209182019101612340565b51815160209384036101000a60001901801990921691161790526040805192909401829003822089547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b1580156123ec57600080fd5b505af1158015612400573d6000803e3d6000fd5b505050506040513d602081101561241657600080fd5b50519392505050565b6000808315156124325760009150610c61565b5082820282848281151561244257fe5b04146124be576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b60008082848115156124d357fe5b04949350505050565b6000828201838110156124be576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e0182805190602001908083835b602083106125bd5780518252601f19909201916020918201910161259e565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b018280519060200190808383602083106125bd5780518252601f19909201916020918201910161259e565b600080600061268b8585612892565b91504282111561269e5760019250610ddb565b50620151806126da85856126d56126c88561135560016112968361128a428d63ffffffff612a9116565b869063ffffffff6124dc16565b612b16565b1515612756576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b60019250610ddb565b6000808261276d8585612892565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a02815260140182815260200192505050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106129b75780518252601f199092019160209182019101612998565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015612a4457600080fd5b505af1158015612a58573d6000803e3d6000fd5b505050506040513d6020811015612a6e57600080fd5b50519050600160a060020a03811615612a8957809250610ddb565b839250610ddb565b600082821115612b10576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310612ba85780518252601f199092019160209182019101612b89565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612c3c57600080fd5b505af1158015612c50573d6000803e3d6000fd5b505050506040513d6020811015612c6657600080fd5b50511515612d1e576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742073746f726167652076616c4572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a723058206d1f59bafb99fbae076da55eed0519583ed796a326864a3d34935ee156e570e60029", + "sourceMap": "879:4088:9:-;;;1220:515;8:9:-1;5:2;;;30:1;27;20:12;5:2;1220:515:9;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1220:515:9;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1598:46:9;;-1:-1:-1;;;;;;1598:46:9;-1:-1:-1;;;;;1598:46:9;;;;;;;;;1704:24;;;;;;;;879:4088;;;;;;;;", + "deployedSourceMap": "879:4088:9:-;;;;;;;;;-1:-1:-1;;;879:4088:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;;;;;;;;;;;;;;;;;;;1942:260:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1942:260:9;-1:-1:-1;;;;;1942:260:9;;;;;3182:150;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3182:150:9;;;;;;;;;;;;;;;;;;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;3866:1098:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3866:1098:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3866:1098:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3866:1098:9;;;;;;;;;;;;;;;;;;-1:-1:-1;3866:1098:9;-1:-1:-1;3866:1098:9;;;;;-1:-1:-1;3866:1098:9;;-1:-1:-1;3866:1098:9;;;;;;;;;;;;;;-1:-1:-1;3866:1098:9;;-1:-1:-1;3866:1098:9;;-1:-1:-1;;;;;;;3866:1098:9;2467:484;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2467:484:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2467:484:9;-1:-1:-1;;;;;2467:484:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2467:484:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2127:185;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;1942:260:9:-;1261:10:1;2020:12:9;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;2050:31:9;:3;2069:11;2050:31;:18;:31;:::i;:::-;2042:134;;;;;;;-1:-1:-1;;;;;2042:134:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2191:4:9;1942:260;;;:::o;3182:150::-;3239:9;3265:60;3283:33;:3;3310:4;3283:33;:18;:33;:::i;:::-;3265:3;;3318:6;3265:60;:17;:60;:::i;:::-;3258:67;3182:150;-1:-1:-1;;3182:150:9:o;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;3866:1098:9:-;3978:12;4000:9;4391:19;4012:21;4026:6;4012:13;:21::i;:::-;4000:33;-1:-1:-1;4112:78:9;4141:10;4153:36;:3;4172:8;4182:6;4153:36;:18;:36;:::i;:::-;4112:3;;:78;;:28;:78;:::i;:::-;4104:144;;;;;;;-1:-1:-1;;;;;4104:144:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4264:63;:3;4282:8;4292:10;4304:8;4314:6;4322:4;4264:63;:17;:63;:::i;:::-;4256:126;;;;;;;-1:-1:-1;;;;;4256:126:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4413:33;:3;4440:4;4413:33;:18;:33;:::i;:::-;4391:55;;4554:16;4550:388;;;4590:84;4608:8;4618;4628:11;4641:4;4647:26;:3;4628:11;4647:26;:13;:26;:::i;:::-;4590:3;;:84;;;;;:17;:84;:::i;:::-;4582:154;;;;;;;-1:-1:-1;;;;;4582:154:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4550:388;;;4770:86;4788:8;4798:10;4810:11;4823:4;4829:26;:3;4810:11;4829:26;:13;:26;:::i;4770:86::-;4762:156;;;;;;;-1:-1:-1;;;;;4762:156:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4953:4:9;;3866:1098;-1:-1:-1;;;;;;;3866:1098:9:o;2467:484::-;2512:8;;;;2553:12;2512:8;2612:48;2626:33;:3;2653:4;2626:33;:18;:33;:::i;:::-;2612:3;;:48;:13;:48;:::i;:::-;2670;2684:33;:3;2711:4;2684:33;:18;:33;:::i;:::-;2670:3;;:48;:13;:48;:::i;:::-;2728;2742:33;:3;2769:4;2742:33;:18;:33;:::i;:::-;2728:3;;:48;:13;:48;:::i;:::-;2786:49;2801:33;:3;2828:4;2801:33;:18;:33;:::i;:::-;2786:3;;:49;:14;:49;:::i;:::-;2845:48;2859:33;:3;2886:4;2859:33;:18;:33;:::i;:::-;2845:3;;:48;:13;:48;:::i;:::-;2903:33;:3;2930:4;2903:33;:18;:33;:::i;:::-;2595:349;;;;-1:-1:-1;2595:349:9;;-1:-1:-1;2595:349:9;-1:-1:-1;2595:349:9;-1:-1:-1;2595:349:9;;-1:-1:-1;2467:484:9;-1:-1:-1;2467:484:9:o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;11027:375:8:-;11152:46;;;;;;;;;;;;-1:-1:-1;;;11192:4:8;11152:46;;;;;;;22:32:-1;26:21;;;22:32;6:49;;11152:46:8;;;;;;;;11142:57;;11109:12;;;;11152:46;;;;;11142:57;;;;11152:46;11142:57;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;11142:57:8;;;;;;;;;;;;11220:12;;:40;;;;;;;;;-1:-1:-1;;;;;11220:40:8;;;;;;;;;11142:57;;-1:-1:-1;11220:12:8;;;;;-1:-1:-1;11220:23:8;;-1:-1:-1;11220:40:8;;;;;263:2:-1;;-1:-1;11220:40:8;;;;;;;-1:-1:-1;11220:12:8;:40;;;5:2:-1;;;;30:1;27;20:12;5:2;11220:40:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11220:40:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11220:40:8;11205:175;;;;;;;-1:-1:-1;;;;;11205:175:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11205:175:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11393:4;11386:11;;11027:375;;;;;;:::o;26726:364::-;26817:19;26844:10;26923:18;26899:15;26867:48;;;;;;;;;;;;;-1:-1:-1;;;;;26867:48:8;-1:-1:-1;;;;;26867:48:8;-1:-1:-1;;;26867:48:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;26867:48:8;;;26857:59;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26857:59:8;;;;;;;;;;;;26944:12;;:27;;;;;;;;;;;26857:59;;-1:-1:-1;;;;;;26944:12:8;;;;-1:-1:-1;26944:23:8;;-1:-1:-1;26944:27:8;;;;;263:2:-1;;-1:-1;26944:27:8;;;;;;;-1:-1:-1;26944:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;26944:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26944:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26944:27:8;;-1:-1:-1;;;;;;26981:17:8;;;26977:109;;;27015:26;27036:4;27015:20;:26::i;:::-;27008:33;;;;26977:109;27069:10;27062:17;;26977:109;26726:364;;;;;;:::o;31068:722::-;31213:12;;31244:44;;;;;;;;;;;;-1:-1:-1;;;;;31244:44:8;;;-1:-1:-1;;;31244:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31244:44:8;;;;;;;;31234:55;;-1:-1:-1;;;;;;;;;;;;31213:12:8;;;:20;;31244:44;;;31234:55;;;;;31244:44;31234:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31234:55:8;;;;;;;;;;;;31213:77;;;-1:-1:-1;;;31213:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31213:77:8;;;;;;;-1:-1:-1;31213:77:8;-1:-1:-1;31213:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31213:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31213:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31213:77:8;31310:12;;31341:44;;;;31213:77;31341:44;;;;;;;-1:-1:-1;;;;;31341:44:8;;;-1:-1:-1;;;31341:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31341:44:8;;;;;;;;31331:55;;31213:77;;-1:-1:-1;31310:12:8;;;;:20;;31341:44;;;;;31331:55;;;;;31341:44;31331:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31331:55:8;;;;;;;;;;;;31310:77;;;-1:-1:-1;;;31310:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31310:77:8;;;;;;;-1:-1:-1;31310:77:8;-1:-1:-1;31310:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31310:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31310:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31310:77:8;31407:12;;31438:44;;;;31310:77;31438:44;;;;;;;-1:-1:-1;;;;;31438:44:8;;;-1:-1:-1;;;31438:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31438:44:8;;;;;;;;31428:55;;31310:77;;-1:-1:-1;31407:12:8;;;;:20;;31438:44;;;;;31428:55;;;;;31438:44;31428:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31428:55:8;;;;;;;;;;;;31407:77;;;-1:-1:-1;;;31407:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31407:77:8;;;;;;;-1:-1:-1;31407:77:8;-1:-1:-1;31407:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31407:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31407:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31407:77:8;31505:12;;31536:45;;;;31407:77;31536:45;;;;;;;-1:-1:-1;;;;;31536:45:8;;;-1:-1:-1;;;31536:45:8;;;;;;;26:21:-1;;;22:32;;6:49;;31536:45:8;;;;;;;;31526:56;;31407:77;;-1:-1:-1;31505:12:8;;;;:20;;31536:45;;;;;31526:56;;;;;31536:45;31526:56;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31526:56:8;;;;;;;;;;;;31505:78;;;-1:-1:-1;;;31505:78:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31505:78:8;;;;;;;-1:-1:-1;31505:78:8;-1:-1:-1;31505:78:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31505:78:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31505:78:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31505:78:8;;-1:-1:-1;31601:46:8;31505:78;31602:31;31627:5;31603:18;:6;31614;31603:18;:10;:18;:::i;:::-;31602:24;:31;:24;:31;:::i;:::-;31601:37;:46;:37;:46;:::i;:::-;31589:58;;31665:6;31658:4;:13;31654:132;;;31688:6;31681:13;;;;31654:132;31718:6;31711:4;:13;31707:79;;;31741:6;31734:13;;;;31707:79;31775:4;31768:11;;31707:79;31068:722;;;;;;;;;;:::o;64447:441::-;64545:11;64564:16;64619:15;64743:14;64583:30;64600:4;64583:30;;;;;;;;;;;;;;;;;;:16;:30::i;:::-;64564:49;;64637:32;64654:4;64660:8;64637:16;:32::i;:::-;64619:50;;64760:101;64850:10;64846:2;:14;64761:79;64828:11;64824:2;:15;64762:56;64812:5;64762:45;64775:31;64791:4;64797:8;64775:15;:31::i;:::-;64762:8;;:45;:12;:45;:::i;:56::-;64761:62;:79;:62;:79;:::i;64760:101::-;64743:118;64447:441;-1:-1:-1;;;;;;;64447:441:8:o;59597:1002::-;59698:12;59926:18;60291:10;59818:42;59846:4;59852:7;59818:27;:42::i;:::-;59810:109;;;;;;;-1:-1:-1;;;;;59810:109:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59947:51;59991:6;59947:39;59972:4;59978:7;59947:24;:39::i;:51::-;59926:72;;60146:13;60104:38;60128:4;60134:7;60104:23;:38::i;:::-;:55;;60089:132;;;;;-1:-1:-1;;;;;60089:132:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60358:7;60367:39;60392:4;60398:7;60367:24;:39::i;:::-;60314:93;;;;;;;;;;;;;-1:-1:-1;;;;;60314:93:8;-1:-1:-1;;;;;60314:93:8;-1:-1:-1;;;60314:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;60314:93:8;;;60304:104;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;60304:104:8;;;;;;;;;;;;60422:12;;:39;;;;;;;;;;;;;;;;;60304:104;;-1:-1:-1;;;;;;60422:12:8;;;;-1:-1:-1;60422:20:8;;-1:-1:-1;60422:39:8;;;;;263:2:-1;;-1:-1;60422:39:8;;;;;;;-1:-1:-1;60422:12:8;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;60422:39:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;60422:39:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;60422:39:8;60414:162;;;;;;;-1:-1:-1;;;;;60414:162:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;60414:162:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;60590:4:8;;59597:1002;-1:-1:-1;;;;;59597:1002:8:o;38209:943::-;38337:12;;;-1:-1:-1;;;;;38372:18:8;;;;38357:86;;;;;-1:-1:-1;;;;;38357:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38509:8;38519:31;38539:4;38545;38519:19;:31::i;:::-;38475:76;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38475:76:8;;;;;;;-1:-1:-1;;;;;38475:76:8;-1:-1:-1;;;;;38475:76:8;-1:-1:-1;;;38475:76:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38475:76:8;;;38465:87;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38465:87:8;;;;;;;;;;;;;;;;38450:102;;38617:8;38627:29;38647:4;38653:2;38627:19;:29::i;:::-;38583:74;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38583:74:8;;;;;;;-1:-1:-1;;;;;38583:74:8;-1:-1:-1;;;;;38583:74:8;-1:-1:-1;;;38583:74:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38583:74:8;;;38573:85;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;38573:85:8;;;;;;;;;;;;38680:12;;38707:26;;;;;;;;;;;38573:85;;-1:-1:-1;;;;;;38680:12:8;;;;-1:-1:-1;38680:20:8;;-1:-1:-1;38707:26:8;;:38;;-1:-1:-1;38738:6:8;;38680:12;;38707:20;;:26;;;;;;;;;;-1:-1:-1;38680:12:8;38707:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38707:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38707:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38707:26:8;;:38;:30;:38;:::i;:::-;38680:66;;;;;-1:-1:-1;;;38680:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38680:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38680:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38680:66:8;38665:202;;;;;;;-1:-1:-1;;;;;38665:202:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;38665:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38888:12;;38915:26;;;;;;;;;;;;;;-1:-1:-1;;;;;38888:12:8;;;;:20;;38909:4;;38915:38;;38946:6;;38888:12;;38915:20;;:26;;;;;;;;;;;;;;38888:12;;38915:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38915:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38915:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38915:26:8;;:38;:30;:38;:::i;:::-;38888:66;;;;;-1:-1:-1;;;38888:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38888:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38888:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38888:66:8;38873:202;;;;;;;-1:-1:-1;;;;;38873:202:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;38873:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39112:2;-1:-1:-1;;;;;39087:42:8;39106:4;-1:-1:-1;;;;;39087:42:8;;39096:8;39116:6;39124:4;39087:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39087:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39087:42:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39087:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39143:4:8;;38209:943;-1:-1:-1;;;;;;;;38209:943:8:o;24582:217::-;24668:12;24688:10;24739:15;24711:44;;;;;;;;;;;;;-1:-1:-1;;;;;24711:44:8;-1:-1:-1;;;;;24711:44:8;-1:-1:-1;;;24711:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24711:44:8;;;24701:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;24701:55:8;;;;;;;;;;;;24769:12;;:25;;;;;;;;;;;24701:55;;-1:-1:-1;;;;;;24769:12:8;;;;-1:-1:-1;24769:21:8;;-1:-1:-1;24769:25:8;;;;;-1:-1:-1;;;24769:25:8;;;;;;-1:-1:-1;24769:12:8;:25;;;5:2:-1;;;;30:1;27;20:12;5:2;24769:25:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;24769:25:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;24769:25:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;24769:25:8;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;-1:-1;24769:25:8;;24582:217;-1:-1:-1;;;;;;;;24582:217:8:o;22196:215::-;22282:11;22301:10;22352:15;22324:44;;;;;;;;;;;;;-1:-1:-1;;;;;22324:44:8;-1:-1:-1;;;;;22324:44:8;-1:-1:-1;;;22324:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22324:44:8;;;22314:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;22314:55:8;;;;;;;;;;;;22382:12;;:24;;;;;;;;;;;22314:55;;-1:-1:-1;;;;;;22382:12:8;;;;-1:-1:-1;22382:20:8;;-1:-1:-1;22382:24:8;;;;;263:2:-1;;-1:-1;22382:24:8;;;;;;;-1:-1:-1;22382:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;22382:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;22382:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22382:24:8;;22196:215;-1:-1:-1;;;;22196:215:8:o;22791:::-;22877:11;22896:10;22947:15;22919:44;;;;;;;;;;;;;-1:-1:-1;;;;;22919:44:8;-1:-1:-1;;;;;22919:44:8;-1:-1:-1;;;22919:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22919:44:8;;;22909:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23386:215:8;23472:11;23491:10;23542:15;23514:44;;;;;;;;;;;;;-1:-1:-1;;;;;23514:44:8;-1:-1:-1;;;;;23514:44:8;-1:-1:-1;;;23514:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;23514:44:8;;;23504:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23976:218:8;24063:12;24083:10;24135:15;24106:45;;;;;;;;;;;;;-1:-1:-1;;;;;24106:45:8;-1:-1:-1;;;;;24106:45:8;-1:-1:-1;;;24106:45:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24106:45:8;;;24096:56;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;25926:213:8;25998:25;26031:10;26054:39;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;26054:39:8;;;26044:50;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26044:50:8;;;;;;;;;;;;26107:12;;:27;;;;;;;;;;;26044:50;;-1:-1:-1;;;;;;26107:12:8;;;;-1:-1:-1;26107:23:8;;-1:-1:-1;26107:27:8;;;;;263:2:-1;;-1:-1;26107:27:8;;;;;;;-1:-1:-1;26107:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;26107:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26107:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26107:27:8;;25926:213;-1:-1:-1;;;25926:213:8:o;301:224:2:-;359:14;;385:6;;381:35;;;408:1;401:8;;;;381:35;-1:-1:-1;433:5:2;;;437:1;433;:5;452;;;;;;;;:10;444:62;;;;;-1:-1:-1;;;;;444:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;519:1;301:224;-1:-1:-1;;;301:224:2:o;697:284::-;755:14;857:9;873:1;869;:5;;;;;;;;;697:284;-1:-1:-1;;;;697:284:2:o;1540:174::-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21585:221:8;21670:18;21696:10;21754:8;21719:44;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;21719:44:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;21719:44:8;;;21709:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;63878:211:8;63962:12;63982:10;64037:8;64005:41;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;61054:503:8;61145:12;61165;61284:13;61180:39;61205:4;61211:7;61180:24;:39::i;:::-;61165:54;;61239:3;61229:7;:13;61225:328;;;61259:4;61252:11;;;;61225:328;-1:-1:-1;61300:5:8;61356:109;61381:4;61387:7;61396:68;61408:55;61300:5;61409:39;61446:1;61409:32;61300:5;61410:16;:3;61418:7;61410:16;:7;:16;:::i;61408:55::-;61396:7;;:68;:11;:68;:::i;:::-;61356:24;:109::i;:::-;61339:187;;;;;;;-1:-1:-1;;;;;61339:187:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61542:4;61535:11;;;;61915:271;62008:11;62027:10;62094:7;62103:39;62128:4;62134:7;62103:24;:39::i;:::-;62050:93;;;;;;;;;;;;;-1:-1:-1;;;;;62050:93:8;-1:-1:-1;;;;;62050:93:8;-1:-1:-1;;;62050:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;62050:93:8;;;62040:104;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;58785:227:8;58877:10;58895;58961:7;58918:51;;;;;;;;;;;;;-1:-1:-1;;;;;58918:51:8;-1:-1:-1;;;;;58918:51:8;-1:-1:-1;;;58918:51:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;58918:51:8;;;58908:62;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;57486:228:8;57579:11;57598:10;57663:7;57621:50;;;;;;;;;;;;;-1:-1:-1;;;;;57621:50:8;-1:-1:-1;;;;;57621:50:8;-1:-1:-1;;;57621:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;57621:50:8;;;57611:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;16402:357:8;16490:25;16523:10;16596:23;16581:7;16546:43;;;;;;;;;;;;;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;;;16546:43:8;-1:-1:-1;;;16546:43:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16546:43:8;;;16536:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16536:54:8;;;;;;;;;;;;16622:12;;:27;;;;;;;;;;;16536:54;;-1:-1:-1;;;;;;16622:12:8;;;;-1:-1:-1;16622:23:8;;-1:-1:-1;16622:27:8;;;;;263:2:-1;;-1:-1;16622:27:8;;;;;;;-1:-1:-1;16622:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16622:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16622:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16622:27:8;;-1:-1:-1;;;;;;16659:22:8;;;16655:100;;16698:15;16691:22;;;;16655:100;16741:7;16734:14;;;;1143:234:2;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;56628:379:8:-;56729:12;56749:10;56814:7;56772:50;;;;;;;;;;;;;-1:-1:-1;;;;;56772:50:8;-1:-1:-1;;;;;56772:50:8;-1:-1:-1;;;56772:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;56772:50:8;;;56762:61;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;56762:61:8;;;;;;;;;;;;56837:12;;:32;;;;;;;;;;;;;;;;;56762:61;;-1:-1:-1;;;;;;56837:12:8;;;;-1:-1:-1;56837:20:8;;-1:-1:-1;56837:32:8;;;;;263:2:-1;;-1:-1;56837:32:8;;;;;;;-1:-1:-1;56837:12:8;:32;;;5:2:-1;;;;30:1;27;20:12;5:2;56837:32:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;56837:32:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;56837:32:8;56829:155;;;;;;;-1:-1:-1;;;;;56829:155:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;56829:155:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;56998:4:8;;56628:379;-1:-1:-1;;;;56628:379:8:o", + "source": "pragma solidity 0.4.24;\n\n/*\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n\n/**\n@title TokenIOMerchant - Merchant Interface Smart Contract for Token, Inc.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n*/\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\ncontract TokenIOMerchant is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n * @notice Constructor method for Merchant contract\n * @param _storageContract Ethereum Address of TokenIOStorage contract\n */\n constructor(address _storageContract) public {\n /*\n * @notice Set the storage contract for the interface\n * @dev This contract will be unable to use the storage constract until\n * @dev contract address is authorized with the storage contract\n * @dev Once authorized, you can setRegisteredFirm and setRegisteredAuthority\n */\n lib.Storage = TokenIOStorage(_storageContract);\n\n /// @dev set owner to contract initiator\n owner[msg.sender] = true;\n }\n\n /**\n @notice Sets Merchant globals and fee paramters\n @param feeContract Address of fee contract\n @return { \"success\" : \"Returns true if successfully called from another contract\"}\n */\n function setParams(\n address feeContract\n ) onlyOwner public returns (bool success) {\n require(lib.setFeeContract(feeContract),\n \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\");\n return true;\n }\n\n /**\n * @notice Gets fee parameters\n * @return {\n \"bps\":\"Fee amount as a mesuare of basis points\",\n \"min\":\"Minimum fee amount\",\n \"max\":\"Maximum fee amount\",\n \"flat\":\"Flat fee amount\",\n \"contract\":\"Address of fee contract\"\n }\n */\n function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) {\n return (\n lib.getFeeBPS(lib.getFeeContract(address(this))),\n lib.getFeeMin(lib.getFeeContract(address(this))),\n lib.getFeeMax(lib.getFeeContract(address(this))),\n lib.getFeeFlat(lib.getFeeContract(address(this))),\n lib.getFeeMsg(lib.getFeeContract(address(this))),\n lib.getFeeContract(address(this))\n );\n }\n\n /**\n * @notice Calculates fee of a given transfer amount\n * @param amount Amount to calculcate fee value\n * @return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}\n */\n function calculateFees(uint amount) public view returns (uint fees) {\n return lib.calculateFees(lib.getFeeContract(address(this)), amount);\n }\n\n /**\n * @notice Pay method for merchant interface\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param merchant Ethereum address of merchant\n * @param amount Amount of currency to send to merchant\n * @param merchantPaysFees Provide option for merchant to pay the transaction fees\n * @param data Optional data to be included when paying the merchant (e.g. item receipt)\n * @return { \"success\" : \"Returns true if successfully called from another contract\"}\n */\n function pay(string currency, address merchant, uint amount, bool merchantPaysFees, bytes data) public returns (bool success) {\n uint fees = calculateFees(amount);\n /// @dev note the spending amount limit is gross of fees\n require(lib.setAccountSpendingAmount(msg.sender, lib.getFxUSDAmount(currency, amount)),\n \"Error: Unable to set account spending amount.\");\n require(lib.forceTransfer(currency, msg.sender, merchant, amount, data),\n \"Error: Unable to transfer funds to account\");\n\n address feeContract = lib.getFeeContract(address(this));\n /// @dev If merchantPaysFees == true, the merchant will pay the fees to the fee contract;\n if (merchantPaysFees) {\n require(lib.forceTransfer(currency, merchant, feeContract, fees, lib.getFeeMsg(feeContract)),\n \"Error: Unable to transfer fees to fee contract.\");\n\n } else {\n require(lib.forceTransfer(currency, msg.sender, feeContract, fees, lib.getFeeMsg(feeContract)),\n \"Error: Unable to transfer fees to fee contract.\");\n \n }\n\n return true;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOMerchant.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOMerchant.sol", + "exportedSymbols": { + "TokenIOMerchant": [ + 4859 + ] + }, + "id": 4860, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4624, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:9" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4625, + "nodeType": "ImportDirective", + "scope": 4860, + "sourceUnit": 185, + "src": "796:23:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 4626, + "nodeType": "ImportDirective", + "scope": 4860, + "sourceUnit": 5242, + "src": "820:30:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 4627, + "nodeType": "ImportDirective", + "scope": 4860, + "sourceUnit": 4623, + "src": "851:26:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4628, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "907:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4629, + "nodeType": "InheritanceSpecifier", + "src": "907:7:9" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4859, + "linearizedBaseContracts": [ + 4859, + 184 + ], + "name": "TokenIOMerchant", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4632, + "libraryName": { + "contractScope": null, + "id": 4630, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1011:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1005:37:9", + "typeName": { + "contractScope": null, + "id": 4631, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1026:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 4634, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 4859, + "src": "1047:19:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4633, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1047:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4654, + "nodeType": "Block", + "src": "1265:470:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4639, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "1598:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1598:11:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4643, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4636, + "src": "1627:16:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4642, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1612:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 4644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1612:32:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1598:46:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4646, + "nodeType": "ExpressionStatement", + "src": "1598:46:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4647, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1704:5:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4650, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4648, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1710:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1710:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1704:17:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1724:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1704:24:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4653, + "nodeType": "ExpressionStatement", + "src": "1704:24:9" + } + ] + }, + "documentation": "@notice Constructor method for Merchant contract\n@param _storageContract Ethereum Address of TokenIOStorage contract", + "id": 4655, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4636, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 4655, + "src": "1232:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4635, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1232:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1231:26:9" + }, + "payable": false, + "returnParameters": { + "id": 4638, + "nodeType": "ParameterList", + "parameters": [], + "src": "1265:0:9" + }, + "scope": 4859, + "src": "1220:515:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4674, + "nodeType": "Block", + "src": "2034:168:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4667, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "2069:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4665, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2050:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4666, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2102, + "src": "2050:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 4668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2050:31:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742e20456e7375726520636f6e747261637420697320616c6c6f7765642062792073746f7261676520636f6e74726163742e", + "id": 4669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:84:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e05a6836836cb77baea52eb421ebbf742058dce5c126f5d3343064b07960fe4", + "typeString": "literal_string \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\"" + }, + "value": "Error: Unable to set fee contract. Ensure contract is allowed by storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e05a6836836cb77baea52eb421ebbf742058dce5c126f5d3343064b07960fe4", + "typeString": "literal_string \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\"" + } + ], + "id": 4664, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2042:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2042:134:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4671, + "nodeType": "ExpressionStatement", + "src": "2042:134:9" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2191:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4663, + "id": 4673, + "nodeType": "Return", + "src": "2184:11:9" + } + ] + }, + "documentation": "@notice Sets Merchant globals and fee paramters\n@param feeContract Address of fee contract\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4675, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4660, + "modifierName": { + "argumentTypes": null, + "id": 4659, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1994:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1994:9:9" + } + ], + "name": "setParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4658, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4657, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 4675, + "src": "1968:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4656, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1968:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1960:33:9" + }, + "payable": false, + "returnParameters": { + "id": 4663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4662, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4675, + "src": "2020:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4661, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2020:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2019:14:9" + }, + "scope": 4859, + "src": "1942:260:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4743, + "nodeType": "Block", + "src": "2587:364:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4695, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2653:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2645:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2645:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4692, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2626:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2626:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2626:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4690, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2612:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4691, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2538, + "src": "2612:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2612:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2711:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2703:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2703:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4701, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2684:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4702, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2684:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2684:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4699, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2670:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4700, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2564, + "src": "2670:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2670:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4713, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2769:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4712, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2761:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2761:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4710, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2742:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4711, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2742:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2742:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4708, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2728:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4709, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "2728:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2728:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4722, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2828:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2820:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2820:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4719, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2801:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4720, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2801:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2801:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4717, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2786:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2616, + "src": "2786:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2786:49:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4731, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2886:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2878:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2878:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4728, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2859:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4729, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2859:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2859:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4726, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2845:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4727, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "2845:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2845:48:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4738, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2930:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2922:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4735, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2903:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2903:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2903:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 4741, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2602:342:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 4689, + "id": 4742, + "nodeType": "Return", + "src": "2595:349:9" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Fee amount as a mesuare of basis points\",\n\"min\":\"Minimum fee amount\",\n\"max\":\"Maximum fee amount\",\n\"flat\":\"Flat fee amount\",\n\"contract\":\"Address of fee contract\"\n}", + "id": 4744, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4676, + "nodeType": "ParameterList", + "parameters": [], + "src": "2488:2:9" + }, + "payable": false, + "returnParameters": { + "id": 4689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4678, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2512:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4677, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2512:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4680, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2522:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4679, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2522:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4682, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2532:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4681, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2532:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4684, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2542:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4683, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2542:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4686, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2553:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4685, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2553:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4688, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2567:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4687, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2567:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2511:75:9" + }, + "scope": 4859, + "src": "2467:484:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4762, + "nodeType": "Block", + "src": "3250:82:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4756, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "3310:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4755, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3302:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3302:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4753, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "3283:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4754, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "3283:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3283:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4759, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4746, + "src": "3318:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4751, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "3265:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 3004, + "src": "3265:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3265:60:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4750, + "id": 4761, + "nodeType": "Return", + "src": "3258:67:9" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount Amount to calculcate fee value\n@return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}", + "id": 4763, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4747, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4746, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4763, + "src": "3205:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4745, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3205:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3204:13:9" + }, + "payable": false, + "returnParameters": { + "id": 4750, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4749, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 4763, + "src": "3239:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4748, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3239:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3238:11:9" + }, + "scope": 4859, + "src": "3182:150:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4857, + "nodeType": "Block", + "src": "3992:972:9", + "statements": [ + { + "assignments": [ + 4779 + ], + "declarations": [ + { + "constant": false, + "id": 4779, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "4000:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4778, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4000:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4783, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4781, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4769, + "src": "4026:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4780, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "4012:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 4782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4012:21:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4000:33:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4787, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "4141:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4141:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4791, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "4172:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4792, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4769, + "src": "4182:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4789, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4153:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFxUSDAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4621, + "src": "4153:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:36:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4785, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4112:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4400, + "src": "4112:28:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 4794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4112:78:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", + "id": 4795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4200:47:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + }, + "value": "Error: Unable to set account spending amount." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + } + ], + "id": 4784, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4104:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4104:144:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4797, + "nodeType": "ExpressionStatement", + "src": "4104:144:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4801, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "4282:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4802, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "4292:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4292:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4804, + "name": "merchant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "4304:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4805, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4769, + "src": "4314:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4806, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4773, + "src": "4322:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4799, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4264:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4800, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3351, + "src": "4264:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4264:63:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e74", + "id": 4808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4337:44:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bbf466ef45b7ce75995210021820dc27f441a75c62bed33c09723390eec8e030", + "typeString": "literal_string \"Error: Unable to transfer funds to account\"" + }, + "value": "Error: Unable to transfer funds to account" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bbf466ef45b7ce75995210021820dc27f441a75c62bed33c09723390eec8e030", + "typeString": "literal_string \"Error: Unable to transfer funds to account\"" + } + ], + "id": 4798, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4256:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4256:126:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4810, + "nodeType": "ExpressionStatement", + "src": "4256:126:9" + }, + { + "assignments": [ + 4812 + ], + "declarations": [ + { + "constant": false, + "id": 4812, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "4391:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4811, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4391:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4819, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4816, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "4440:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4432:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4432:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4813, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4413:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "4413:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4413:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4391:55:9" + }, + { + "condition": { + "argumentTypes": null, + "id": 4820, + "name": "merchantPaysFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4771, + "src": "4554:16:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4853, + "nodeType": "Block", + "src": "4752:186:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4840, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "4788:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4841, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "4798:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4798:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4843, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "4810:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4844, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4779, + "src": "4823:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4847, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "4843:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4845, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4829:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4846, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "4829:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4829:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4838, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4770:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4839, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3351, + "src": "4770:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4770:86:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 4850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4868:49:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 4837, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4762:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4762:156:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4852, + "nodeType": "ExpressionStatement", + "src": "4762:156:9" + } + ] + }, + "id": 4854, + "nodeType": "IfStatement", + "src": "4550:388:9", + "trueBody": { + "id": 4836, + "nodeType": "Block", + "src": "4572:174:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4824, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "4608:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4825, + "name": "merchant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "4618:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4826, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "4628:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4827, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4779, + "src": "4641:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4830, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "4661:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4828, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4647:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4829, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "4647:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4647:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4822, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4590:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4823, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3351, + "src": "4590:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4590:84:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 4833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4686:49:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 4821, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4582:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4582:154:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4835, + "nodeType": "ExpressionStatement", + "src": "4582:154:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4953:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4777, + "id": 4856, + "nodeType": "Return", + "src": "4946:11:9" + } + ] + }, + "documentation": "@notice Pay method for merchant interface\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param merchant Ethereum address of merchant\n@param amount Amount of currency to send to merchant\n@param merchantPaysFees Provide option for merchant to pay the transaction fees\n@param data Optional data to be included when paying the merchant (e.g. item receipt)\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4858, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "pay", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4774, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4765, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3879:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4764, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3879:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4767, + "name": "merchant", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3896:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4766, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3896:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4769, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3914:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4768, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3914:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4771, + "name": "merchantPaysFees", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3927:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4770, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3927:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4773, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3950:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4772, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3950:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3878:83:9" + }, + "payable": false, + "returnParameters": { + "id": 4777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4776, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3978:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4775, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3978:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3977:14:9" + }, + "scope": 4859, + "src": "3866:1098:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 4860, + "src": "879:4088:9" + } + ], + "src": "0:4968:9" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOMerchant.sol", + "exportedSymbols": { + "TokenIOMerchant": [ + 4859 + ] + }, + "id": 4860, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4624, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:9" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4625, + "nodeType": "ImportDirective", + "scope": 4860, + "sourceUnit": 185, + "src": "796:23:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 4626, + "nodeType": "ImportDirective", + "scope": 4860, + "sourceUnit": 5242, + "src": "820:30:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 4627, + "nodeType": "ImportDirective", + "scope": 4860, + "sourceUnit": 4623, + "src": "851:26:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4628, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "907:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4629, + "nodeType": "InheritanceSpecifier", + "src": "907:7:9" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4859, + "linearizedBaseContracts": [ + 4859, + 184 + ], + "name": "TokenIOMerchant", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4632, + "libraryName": { + "contractScope": null, + "id": 4630, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1011:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1005:37:9", + "typeName": { + "contractScope": null, + "id": 4631, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1026:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 4634, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 4859, + "src": "1047:19:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4633, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1047:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4654, + "nodeType": "Block", + "src": "1265:470:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4639, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "1598:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1598:11:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4643, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4636, + "src": "1627:16:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4642, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1612:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 4644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1612:32:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1598:46:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4646, + "nodeType": "ExpressionStatement", + "src": "1598:46:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4647, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1704:5:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4650, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4648, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1710:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1710:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1704:17:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1724:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1704:24:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4653, + "nodeType": "ExpressionStatement", + "src": "1704:24:9" + } + ] + }, + "documentation": "@notice Constructor method for Merchant contract\n@param _storageContract Ethereum Address of TokenIOStorage contract", + "id": 4655, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4636, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 4655, + "src": "1232:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4635, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1232:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1231:26:9" + }, + "payable": false, + "returnParameters": { + "id": 4638, + "nodeType": "ParameterList", + "parameters": [], + "src": "1265:0:9" + }, + "scope": 4859, + "src": "1220:515:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4674, + "nodeType": "Block", + "src": "2034:168:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4667, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "2069:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4665, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2050:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4666, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2102, + "src": "2050:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 4668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2050:31:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742e20456e7375726520636f6e747261637420697320616c6c6f7765642062792073746f7261676520636f6e74726163742e", + "id": 4669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:84:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e05a6836836cb77baea52eb421ebbf742058dce5c126f5d3343064b07960fe4", + "typeString": "literal_string \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\"" + }, + "value": "Error: Unable to set fee contract. Ensure contract is allowed by storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e05a6836836cb77baea52eb421ebbf742058dce5c126f5d3343064b07960fe4", + "typeString": "literal_string \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\"" + } + ], + "id": 4664, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "2042:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2042:134:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4671, + "nodeType": "ExpressionStatement", + "src": "2042:134:9" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2191:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4663, + "id": 4673, + "nodeType": "Return", + "src": "2184:11:9" + } + ] + }, + "documentation": "@notice Sets Merchant globals and fee paramters\n@param feeContract Address of fee contract\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4675, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4660, + "modifierName": { + "argumentTypes": null, + "id": 4659, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1994:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1994:9:9" + } + ], + "name": "setParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4658, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4657, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 4675, + "src": "1968:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4656, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1968:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1960:33:9" + }, + "payable": false, + "returnParameters": { + "id": 4663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4662, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4675, + "src": "2020:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4661, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2020:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2019:14:9" + }, + "scope": 4859, + "src": "1942:260:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4743, + "nodeType": "Block", + "src": "2587:364:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4695, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2653:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2645:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2645:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4692, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2626:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2626:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2626:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4690, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2612:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4691, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2538, + "src": "2612:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2612:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2711:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2703:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2703:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4701, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2684:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4702, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2684:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2684:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4699, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2670:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4700, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2564, + "src": "2670:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2670:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4713, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2769:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4712, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2761:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2761:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4710, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2742:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4711, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2742:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2742:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4708, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2728:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4709, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "2728:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2728:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4722, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2828:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2820:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2820:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4719, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2801:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4720, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2801:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2801:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4717, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2786:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2616, + "src": "2786:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2786:49:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4731, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2886:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2878:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2878:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4728, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2859:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4729, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2859:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2859:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4726, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2845:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4727, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "2845:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2845:48:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4738, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "2930:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2922:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4735, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "2903:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "2903:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2903:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 4741, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2602:342:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 4689, + "id": 4742, + "nodeType": "Return", + "src": "2595:349:9" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Fee amount as a mesuare of basis points\",\n\"min\":\"Minimum fee amount\",\n\"max\":\"Maximum fee amount\",\n\"flat\":\"Flat fee amount\",\n\"contract\":\"Address of fee contract\"\n}", + "id": 4744, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4676, + "nodeType": "ParameterList", + "parameters": [], + "src": "2488:2:9" + }, + "payable": false, + "returnParameters": { + "id": 4689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4678, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2512:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4677, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2512:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4680, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2522:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4679, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2522:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4682, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2532:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4681, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2532:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4684, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2542:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4683, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2542:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4686, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2553:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4685, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2553:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4688, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 4744, + "src": "2567:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4687, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2567:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2511:75:9" + }, + "scope": 4859, + "src": "2467:484:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4762, + "nodeType": "Block", + "src": "3250:82:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4756, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "3310:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4755, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3302:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3302:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4753, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "3283:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4754, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "3283:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3283:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4759, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4746, + "src": "3318:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4751, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "3265:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 3004, + "src": "3265:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3265:60:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4750, + "id": 4761, + "nodeType": "Return", + "src": "3258:67:9" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount Amount to calculcate fee value\n@return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}", + "id": 4763, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4747, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4746, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4763, + "src": "3205:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4745, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3205:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3204:13:9" + }, + "payable": false, + "returnParameters": { + "id": 4750, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4749, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 4763, + "src": "3239:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4748, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3239:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3238:11:9" + }, + "scope": 4859, + "src": "3182:150:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4857, + "nodeType": "Block", + "src": "3992:972:9", + "statements": [ + { + "assignments": [ + 4779 + ], + "declarations": [ + { + "constant": false, + "id": 4779, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "4000:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4778, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4000:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4783, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4781, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4769, + "src": "4026:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4780, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "4012:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 4782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4012:21:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4000:33:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4787, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "4141:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4141:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4791, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "4172:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4792, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4769, + "src": "4182:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4789, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4153:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFxUSDAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4621, + "src": "4153:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:36:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4785, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4112:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4400, + "src": "4112:28:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 4794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4112:78:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", + "id": 4795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4200:47:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + }, + "value": "Error: Unable to set account spending amount." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + } + ], + "id": 4784, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4104:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4104:144:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4797, + "nodeType": "ExpressionStatement", + "src": "4104:144:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4801, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "4282:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4802, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "4292:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4292:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4804, + "name": "merchant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "4304:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4805, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4769, + "src": "4314:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4806, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4773, + "src": "4322:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4799, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4264:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4800, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3351, + "src": "4264:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4264:63:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e74", + "id": 4808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4337:44:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bbf466ef45b7ce75995210021820dc27f441a75c62bed33c09723390eec8e030", + "typeString": "literal_string \"Error: Unable to transfer funds to account\"" + }, + "value": "Error: Unable to transfer funds to account" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bbf466ef45b7ce75995210021820dc27f441a75c62bed33c09723390eec8e030", + "typeString": "literal_string \"Error: Unable to transfer funds to account\"" + } + ], + "id": 4798, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4256:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4256:126:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4810, + "nodeType": "ExpressionStatement", + "src": "4256:126:9" + }, + { + "assignments": [ + 4812 + ], + "declarations": [ + { + "constant": false, + "id": 4812, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "4391:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4811, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4391:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4819, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4816, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "4440:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4859", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4432:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4432:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4813, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4413:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2736, + "src": "4413:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4413:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4391:55:9" + }, + { + "condition": { + "argumentTypes": null, + "id": 4820, + "name": "merchantPaysFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4771, + "src": "4554:16:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4853, + "nodeType": "Block", + "src": "4752:186:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4840, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "4788:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4841, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "4798:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4798:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4843, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "4810:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4844, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4779, + "src": "4823:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4847, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "4843:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4845, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4829:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4846, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "4829:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4829:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4838, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4770:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4839, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3351, + "src": "4770:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4770:86:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 4850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4868:49:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 4837, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4762:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4762:156:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4852, + "nodeType": "ExpressionStatement", + "src": "4762:156:9" + } + ] + }, + "id": 4854, + "nodeType": "IfStatement", + "src": "4550:388:9", + "trueBody": { + "id": 4836, + "nodeType": "Block", + "src": "4572:174:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4824, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "4608:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4825, + "name": "merchant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "4618:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4826, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "4628:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4827, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4779, + "src": "4641:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4830, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "4661:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4828, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4647:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4829, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2642, + "src": "4647:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4647:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4822, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4634, + "src": "4590:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4823, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3351, + "src": "4590:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4590:84:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 4833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4686:49:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 4821, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5259, + 5260 + ], + "referencedDeclaration": 5260, + "src": "4582:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4582:154:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4835, + "nodeType": "ExpressionStatement", + "src": "4582:154:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4953:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4777, + "id": 4856, + "nodeType": "Return", + "src": "4946:11:9" + } + ] + }, + "documentation": "@notice Pay method for merchant interface\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param merchant Ethereum address of merchant\n@param amount Amount of currency to send to merchant\n@param merchantPaysFees Provide option for merchant to pay the transaction fees\n@param data Optional data to be included when paying the merchant (e.g. item receipt)\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4858, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "pay", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4774, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4765, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3879:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4764, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3879:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4767, + "name": "merchant", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3896:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4766, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3896:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4769, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3914:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4768, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3914:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4771, + "name": "merchantPaysFees", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3927:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4770, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3927:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4773, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3950:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4772, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3950:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3878:83:9" + }, + "payable": false, + "returnParameters": { + "id": 4777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4776, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "3978:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4775, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3978:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3977:14:9" + }, + "scope": 4859, + "src": "3866:1098:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 4860, + "src": "879:4088:9" + } + ], + "src": "0:4968:9" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x07fec31eec2885569f7a42cf116377fc27801941", + "transactionHash": "0xd4a780d61a0dd88d0523d204314d50fc4b301df062ec042a59cfcb71550d4a41" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.614Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIONameSpace.json b/deployed/mainnet/TokenIONameSpace.json new file mode 100644 index 0000000..7c714a8 --- /dev/null +++ b/deployed/mainnet/TokenIONameSpace.json @@ -0,0 +1,1297 @@ +{ + "contractName": "TokenIONameSpace", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + } + ], + "name": "getTokenNameSpace", + "outputs": [ + { + "name": "contractAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506040516020806106eb833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a03909416939093178355815416909117905561067590819061007690396000f30060806040526004361061006c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663394387b181146100715780634bbc142c146100e6578063666a34271461011b578063666e1b391461013c578063f2fde38b1461015d575b600080fd5b34801561007d57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100ca94369492936024939284019190819084018382808284375094975061017e9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b3480156100f257600080fd5b50610107600160a060020a0360043516610197565b604080519115158252519081900360200190f35b34801561012757600080fd5b50610107600160a060020a0360043516610277565b34801561014857600080fd5b50610107600160a060020a0360043516610354565b34801561016957600080fd5b50610107600160a060020a0360043516610369565b600061019160018363ffffffff6104c716565b92915050565b3360009081526020819052604081205460ff161515610226576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610306576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff1615156103f8576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515610458576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b6000808260405160200180807f746f6b656e2e6e616d6573706163650000000000000000000000000000000000815250600f0182805190602001908083835b602083106105255780518252601f199092019160209182019101610506565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106105885780518252601f199092019160209182019101610569565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d602081101561063f57600080fd5b50519493505050505600a165627a7a72305820caf5416bf0198d0d856fd3926172e4df1b076ab6fd48a064563f8b56b31177a00029", + "deployedBytecode": "0x60806040526004361061006c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663394387b181146100715780634bbc142c146100e6578063666a34271461011b578063666e1b391461013c578063f2fde38b1461015d575b600080fd5b34801561007d57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100ca94369492936024939284019190819084018382808284375094975061017e9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b3480156100f257600080fd5b50610107600160a060020a0360043516610197565b604080519115158252519081900360200190f35b34801561012757600080fd5b50610107600160a060020a0360043516610277565b34801561014857600080fd5b50610107600160a060020a0360043516610354565b34801561016957600080fd5b50610107600160a060020a0360043516610369565b600061019160018363ffffffff6104c716565b92915050565b3360009081526020819052604081205460ff161515610226576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610306576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff1615156103f8576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515610458576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b6000808260405160200180807f746f6b656e2e6e616d6573706163650000000000000000000000000000000000815250600f0182805190602001908083835b602083106105255780518252601f199092019160209182019101610506565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106105885780518252601f199092019160209182019101610569565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d602081101561063f57600080fd5b50519493505050505600a165627a7a72305820caf5416bf0198d0d856fd3926172e4df1b076ab6fd48a064563f8b56b31177a00029", + "sourceMap": "1076:1347:10:-;;;1414:474;8:9:-1;5:2;;;30:1;27;20:12;5:2;1414:474:10;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1414:474:10;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1758:46:10;;-1:-1:-1;;;;;;1758:46:10;-1:-1:-1;;;;;1758:46:10;;;;;;;;;1858:24;;;;;;;;1076:1347;;;;;;;;", + "deployedSourceMap": "1076:1347:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2275:145;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2275:145:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2275:145:10;;-1:-1:-1;2275:145:10;;-1:-1:-1;;;;;;;2275:145:10;;;;;-1:-1:-1;;;;;2275:145:10;;;;;;;;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;;;;;;;;;;;;;;;;;;;2571:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;1589:291;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2275:145:10;2340:23;2382:31;:3;2404:8;2382:31;:21;:31;:::i;:::-;2375:38;2275:145;-1:-1:-1;;2275:145:10:o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;2571:188::-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;1589:291::-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;18424:231:8:-;18510:23;18541:10;18600:8;18564:45;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;18564:45:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;18564:45:8;;;18554:56;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;18554:56:8;;;;;;;;;;;;18623:12;;:27;;;;;;;;;;;18554:56;;-1:-1:-1;;;;;;18623:12:8;;;;-1:-1:-1;18623:23:8;;-1:-1:-1;18623:27:8;;;;;263:2:-1;;-1:-1;18623:27:8;;;;;;;-1:-1:-1;18623:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;18623:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;18623:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;18623:27:8;;18424:231;-1:-1:-1;;;;18424:231:8:o", + "source": "pragma solidity 0.4.24;\n\n\n/**\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n@title Token Name Space Interface for Token, Inc. Smart Money System\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n\n*/\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\ncontract TokenIONameSpace is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n \t* @notice Constructor method for TokenIONameSpace contract\n \t* @param _storageContract address of TokenIOStorage contract\n \t*/\n \tconstructor(address _storageContract) public {\n \t\t\t/// @dev Set the storage contract for the interface\n \t\t\t/// @dev NOTE: This contract will be unable to use the storage constract until\n \t\t\t/// @dev contract address is authorized with the storage contract\n \t\t\t/// @dev Once authorized, Use the `setParams` method to set storage values\n \t\t\tlib.Storage = TokenIOStorage(_storageContract);\n\n \t\t\t/// @dev set owner to contract initiator\n \t\t\towner[msg.sender] = true;\n \t}\n\n /**\n * @notice Returns the address of the contract associated with the currency symbol\n * @notice This method may be deprecated or refactored to allow for multiple interfaces\n * @param currency string Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"contractAddress\": \"Returns the token contract address associated with the currency\"}\n */\n function getTokenNameSpace(string currency) public view returns (address contractAddress) {\n return lib.getTokenNameSpace(currency);\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIONameSpace.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIONameSpace.sol", + "exportedSymbols": { + "TokenIONameSpace": [ + 4906 + ] + }, + "id": 4907, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4861, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:10" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4862, + "nodeType": "ImportDirective", + "scope": 4907, + "sourceUnit": 185, + "src": "993:23:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 4863, + "nodeType": "ImportDirective", + "scope": 4907, + "sourceUnit": 5242, + "src": "1017:30:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 4864, + "nodeType": "ImportDirective", + "scope": 4907, + "sourceUnit": 4623, + "src": "1048:26:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4865, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1105:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4866, + "nodeType": "InheritanceSpecifier", + "src": "1105:7:10" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4906, + "linearizedBaseContracts": [ + 4906, + 184 + ], + "name": "TokenIONameSpace", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4869, + "libraryName": { + "contractScope": null, + "id": 4867, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1209:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1203:37:10", + "typeName": { + "contractScope": null, + "id": 4868, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1224:15:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 4871, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 4906, + "src": "1245:19:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4870, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1245:15:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4891, + "nodeType": "Block", + "src": "1459:429:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4876, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4871, + "src": "1758:3:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1758:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4880, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4873, + "src": "1787:16:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4879, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1772:14:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 4881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1772:32:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1758:46:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4883, + "nodeType": "ExpressionStatement", + "src": "1758:46:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 4889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4884, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1858:5:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4887, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4885, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1864:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1864:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1858:17:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1878:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1858:24:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4890, + "nodeType": "ExpressionStatement", + "src": "1858:24:10" + } + ] + }, + "documentation": "@notice Constructor method for TokenIONameSpace contract\n@param _storageContract address of TokenIOStorage contract", + "id": 4892, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4873, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 4892, + "src": "1426:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1426:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1425:26:10" + }, + "payable": false, + "returnParameters": { + "id": 4875, + "nodeType": "ParameterList", + "parameters": [], + "src": "1459:0:10" + }, + "scope": 4906, + "src": "1414:474:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4904, + "nodeType": "Block", + "src": "2365:55:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4901, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4894, + "src": "2404:8:10", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4899, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4871, + "src": "2382:3:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4900, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenNameSpace", + "nodeType": "MemberAccess", + "referencedDeclaration": 2382, + "src": "2382:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (address)" + } + }, + "id": 4902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2382:31:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4898, + "id": 4903, + "nodeType": "Return", + "src": "2375:38:10" + } + ] + }, + "documentation": "@notice Returns the address of the contract associated with the currency symbol\n@notice This method may be deprecated or refactored to allow for multiple interfaces\n@param currency string Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"contractAddress\": \"Returns the token contract address associated with the currency\"}", + "id": 4905, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4894, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4905, + "src": "2302:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4893, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2302:6:10", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2301:17:10" + }, + "payable": false, + "returnParameters": { + "id": 4898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4897, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4905, + "src": "2340:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2340:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2339:25:10" + }, + "scope": 4906, + "src": "2275:145:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 4907, + "src": "1076:1347:10" + } + ], + "src": "0:2424:10" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIONameSpace.sol", + "exportedSymbols": { + "TokenIONameSpace": [ + 4906 + ] + }, + "id": 4907, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4861, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:10" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4862, + "nodeType": "ImportDirective", + "scope": 4907, + "sourceUnit": 185, + "src": "993:23:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 4863, + "nodeType": "ImportDirective", + "scope": 4907, + "sourceUnit": 5242, + "src": "1017:30:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 4864, + "nodeType": "ImportDirective", + "scope": 4907, + "sourceUnit": 4623, + "src": "1048:26:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4865, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1105:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4866, + "nodeType": "InheritanceSpecifier", + "src": "1105:7:10" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4906, + "linearizedBaseContracts": [ + 4906, + 184 + ], + "name": "TokenIONameSpace", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4869, + "libraryName": { + "contractScope": null, + "id": 4867, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4622, + "src": "1209:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4622", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1203:37:10", + "typeName": { + "contractScope": null, + "id": 4868, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1224:15:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 4871, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 4906, + "src": "1245:19:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4870, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1646, + "src": "1245:15:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4891, + "nodeType": "Block", + "src": "1459:429:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4876, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4871, + "src": "1758:3:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1758:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4880, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4873, + "src": "1787:16:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4879, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5241, + "src": "1772:14:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5241_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 4881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1772:32:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1758:46:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5241", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4883, + "nodeType": "ExpressionStatement", + "src": "1758:46:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 4889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4884, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1858:5:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4887, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4885, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "1864:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1864:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1858:17:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1878:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1858:24:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4890, + "nodeType": "ExpressionStatement", + "src": "1858:24:10" + } + ] + }, + "documentation": "@notice Constructor method for TokenIONameSpace contract\n@param _storageContract address of TokenIOStorage contract", + "id": 4892, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4873, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 4892, + "src": "1426:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1426:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1425:26:10" + }, + "payable": false, + "returnParameters": { + "id": 4875, + "nodeType": "ParameterList", + "parameters": [], + "src": "1459:0:10" + }, + "scope": 4906, + "src": "1414:474:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4904, + "nodeType": "Block", + "src": "2365:55:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4901, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4894, + "src": "2404:8:10", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4899, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4871, + "src": "2382:3:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1646_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4900, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenNameSpace", + "nodeType": "MemberAccess", + "referencedDeclaration": 2382, + "src": "2382:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_address_$bound_to$_t_struct$_Data_$1646_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (address)" + } + }, + "id": 4902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2382:31:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4898, + "id": 4903, + "nodeType": "Return", + "src": "2375:38:10" + } + ] + }, + "documentation": "@notice Returns the address of the contract associated with the currency symbol\n@notice This method may be deprecated or refactored to allow for multiple interfaces\n@param currency string Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"contractAddress\": \"Returns the token contract address associated with the currency\"}", + "id": 4905, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4894, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4905, + "src": "2302:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4893, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2302:6:10", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2301:17:10" + }, + "payable": false, + "returnParameters": { + "id": 4898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4897, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4905, + "src": "2340:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2340:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2339:25:10" + }, + "scope": 4906, + "src": "2275:145:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 4907, + "src": "1076:1347:10" + } + ], + "src": "0:2424:10" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:14:09.180Z" +} \ No newline at end of file diff --git a/deployed/mainnet/TokenIOStorage.json b/deployed/mainnet/TokenIOStorage.json new file mode 100644 index 0000000..8701020 --- /dev/null +++ b/deployed/mainnet/TokenIOStorage.json @@ -0,0 +1,8232 @@ +{ + "contractName": "TokenIOStorage", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "address" + } + ], + "name": "setAddress", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "setUint", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "string" + } + ], + "name": "setString", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "bytes" + } + ], + "name": "setBytes", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "bool" + } + ], + "name": "setBool", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "int256" + } + ], + "name": "setInt", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteAddress", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteUint", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteString", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteBytes", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteBool", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteInt", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getAddress", + "outputs": [ + { + "name": "_value", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getUint", + "outputs": [ + { + "name": "_value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getString", + "outputs": [ + { + "name": "_value", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getBytes", + "outputs": [ + { + "name": "_value", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getBool", + "outputs": [ + { + "name": "_value", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getInt", + "outputs": [ + { + "name": "_value", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50336000908152602081905260409020805460ff1990811660019081179091161790556110b2806100426000396000f3006080604052600436106101275763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630e14a376811461012c57806321f8a721146101585780632c62ff2d1461018c5780632e28d084146101a45780633e49bed0146102025780634bbc142c1461021d578063616b59f61461023e578063666a342714610256578063666e1b39146102775780636e899550146102985780637ae1cfca146102f65780638c1600951461030e578063986e791a14610326578063abfdcced146103b3578063bd02d0f5146103d0578063c031a180146103fa578063ca446dd914610412578063dc97d96214610436578063e2a4853a1461044e578063e2b202bf14610469578063f2fde38b14610481578063f6bb3cc4146104a2575b600080fd5b34801561013857600080fd5b506101446004356104ba565b604080519115158252519081900360200190f35b34801561016457600080fd5b50610170600435610554565b60408051600160a060020a039092168252519081900360200190f35b34801561019857600080fd5b5061014460043561056f565b3480156101b057600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101449583359536956044949193909101919081908401838280828437509497506105f69650505050505050565b34801561020e57600080fd5b5061014460043560243561068a565b34801561022957600080fd5b50610144600160a060020a036004351661070b565b34801561024a57600080fd5b506101446004356107c7565b34801561026257600080fd5b50610144600160a060020a0360043516610851565b34801561028357600080fd5b50610144600160a060020a036004351661090a565b3480156102a457600080fd5b5060408051602060046024803582810135601f810185900485028601850190965285855261014495833595369560449491939091019190819084018382808284375094975061091f9650505050505050565b34801561030257600080fd5b506101446004356109a9565b34801561031a57600080fd5b506101446004356109be565b34801561033257600080fd5b5061033e600435610a3e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610378578181015183820152602001610360565b50505050905090810190601f1680156103a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103bf57600080fd5b506101446004356024351515610add565b3480156103dc57600080fd5b506103e8600435610b6c565b60408051918252519081900360200190f35b34801561040657600080fd5b5061033e600435610b7e565b34801561041e57600080fd5b50610144600435600160a060020a0360243516610be8565b34801561044257600080fd5b506103e8600435610c92565b34801561045a57600080fd5b50610144600435602435610ca4565b34801561047557600080fd5b50610144600435610d25565b34801561048d57600080fd5b50610144600160a060020a0360043516610da8565b3480156104ae57600080fd5b50610144600435610ee2565b3360009081526020819052604081205460ff161515610525576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b506000908152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19169055600190565b600090815260036020526040902054600160a060020a031690565b3360009081526020819052604081205460ff1615156105da576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b506000908152600560205260409020805460ff19169055600190565b3360009081526020819052604081205460ff161515610661576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b6000838152600460209081526040909120835161068092850190610f64565b5060019392505050565b3360009081526020819052604081205460ff1615156106f5576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060009182526006602052604090912055600190565b3360009081526020819052604081205460ff161515610776576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610832576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600082815260046020526040812061084991610fe2565b506001919050565b3360009081526020819052604081205460ff1615156108bc576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff16151561098a576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b6000838152600260209081526040909120835161068092850190610f64565b60009081526005602052604090205460ff1690565b3360009081526020819052604081205460ff161515610a29576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600090815260066020526040812055600190565b600081815260026020818152604092839020805484516000196001831615610100020190911693909304601f81018390048302840183019094528383526060939091830182828015610ad15780601f10610aa657610100808354040283529160200191610ad1565b820191906000526020600020905b815481529060010190602001808311610ab457829003601f168201915b50505050509050919050565b3360009081526020819052604081205460ff161515610b48576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600091825260056020526040909120805460ff1916911515919091179055600190565b60009081526001602052604090205490565b60008181526004602090815260409182902080548351601f6002610100600185161502600019019093169290920491820184900484028101840190945280845260609392830182828015610ad15780601f10610aa657610100808354040283529160200191610ad1565b3360009081526020819052604081205460ff161515610c53576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060008281526003602052604090208054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116179055600192915050565b60009081526006602052604090205490565b3360009081526020819052604081205460ff161515610d0f576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060009182526001602081905260409092205590565b3360009081526020819052604081205460ff161515610d90576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600090815260016020819052604082209190915590565b3360009081526020819052604081205460ff161515610e13576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a0382161515610e73576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b3360009081526020819052604081205460ff161515610f4d576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600082815260026020526040812061084991610fe2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610fa557805160ff1916838001178555610fd2565b82800160010185558215610fd2579182015b82811115610fd2578251825591602001919060010190610fb7565b50610fde929150611029565b5090565b50805460018160011615610100020316600290046000825580601f106110085750611026565b601f0160209004906000526020600020908101906110269190611029565b50565b61104391905b80821115610fde576000815560010161102f565b90560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820056cfbd62230040e00d890ea4ea35df860cfed498efc9f987cffb80ffc91f0c50029", + "deployedBytecode": "0x6080604052600436106101275763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630e14a376811461012c57806321f8a721146101585780632c62ff2d1461018c5780632e28d084146101a45780633e49bed0146102025780634bbc142c1461021d578063616b59f61461023e578063666a342714610256578063666e1b39146102775780636e899550146102985780637ae1cfca146102f65780638c1600951461030e578063986e791a14610326578063abfdcced146103b3578063bd02d0f5146103d0578063c031a180146103fa578063ca446dd914610412578063dc97d96214610436578063e2a4853a1461044e578063e2b202bf14610469578063f2fde38b14610481578063f6bb3cc4146104a2575b600080fd5b34801561013857600080fd5b506101446004356104ba565b604080519115158252519081900360200190f35b34801561016457600080fd5b50610170600435610554565b60408051600160a060020a039092168252519081900360200190f35b34801561019857600080fd5b5061014460043561056f565b3480156101b057600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101449583359536956044949193909101919081908401838280828437509497506105f69650505050505050565b34801561020e57600080fd5b5061014460043560243561068a565b34801561022957600080fd5b50610144600160a060020a036004351661070b565b34801561024a57600080fd5b506101446004356107c7565b34801561026257600080fd5b50610144600160a060020a0360043516610851565b34801561028357600080fd5b50610144600160a060020a036004351661090a565b3480156102a457600080fd5b5060408051602060046024803582810135601f810185900485028601850190965285855261014495833595369560449491939091019190819084018382808284375094975061091f9650505050505050565b34801561030257600080fd5b506101446004356109a9565b34801561031a57600080fd5b506101446004356109be565b34801561033257600080fd5b5061033e600435610a3e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610378578181015183820152602001610360565b50505050905090810190601f1680156103a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103bf57600080fd5b506101446004356024351515610add565b3480156103dc57600080fd5b506103e8600435610b6c565b60408051918252519081900360200190f35b34801561040657600080fd5b5061033e600435610b7e565b34801561041e57600080fd5b50610144600435600160a060020a0360243516610be8565b34801561044257600080fd5b506103e8600435610c92565b34801561045a57600080fd5b50610144600435602435610ca4565b34801561047557600080fd5b50610144600435610d25565b34801561048d57600080fd5b50610144600160a060020a0360043516610da8565b3480156104ae57600080fd5b50610144600435610ee2565b3360009081526020819052604081205460ff161515610525576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b506000908152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19169055600190565b600090815260036020526040902054600160a060020a031690565b3360009081526020819052604081205460ff1615156105da576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b506000908152600560205260409020805460ff19169055600190565b3360009081526020819052604081205460ff161515610661576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b6000838152600460209081526040909120835161068092850190610f64565b5060019392505050565b3360009081526020819052604081205460ff1615156106f5576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060009182526006602052604090912055600190565b3360009081526020819052604081205460ff161515610776576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610832576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600082815260046020526040812061084991610fe2565b506001919050565b3360009081526020819052604081205460ff1615156108bc576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff16151561098a576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b6000838152600260209081526040909120835161068092850190610f64565b60009081526005602052604090205460ff1690565b3360009081526020819052604081205460ff161515610a29576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600090815260066020526040812055600190565b600081815260026020818152604092839020805484516000196001831615610100020190911693909304601f81018390048302840183019094528383526060939091830182828015610ad15780601f10610aa657610100808354040283529160200191610ad1565b820191906000526020600020905b815481529060010190602001808311610ab457829003601f168201915b50505050509050919050565b3360009081526020819052604081205460ff161515610b48576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600091825260056020526040909120805460ff1916911515919091179055600190565b60009081526001602052604090205490565b60008181526004602090815260409182902080548351601f6002610100600185161502600019019093169290920491820184900484028101840190945280845260609392830182828015610ad15780601f10610aa657610100808354040283529160200191610ad1565b3360009081526020819052604081205460ff161515610c53576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060008281526003602052604090208054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116179055600192915050565b60009081526006602052604090205490565b3360009081526020819052604081205460ff161515610d0f576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060009182526001602081905260409092205590565b3360009081526020819052604081205460ff161515610d90576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600090815260016020819052604082209190915590565b3360009081526020819052604081205460ff161515610e13576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a0382161515610e73576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b3360009081526020819052604081205460ff161515610f4d576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600082815260026020526040812061084991610fe2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610fa557805160ff1916838001178555610fd2565b82800160010185558215610fd2579182015b82811115610fd2578251825591602001919060010190610fb7565b50610fde929150611029565b5090565b50805460018160011615610100020316600290046000825580601f106110085750611026565b601f0160209004906000526020600020908101906110269190611029565b50565b61104391905b80821115610fde576000815560010161102f565b90560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820056cfbd62230040e00d890ea4ea35df860cfed498efc9f987cffb80ffc91f0c50029", + "sourceMap": "1972:8029:11:-;;;2669:207;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1117:10:1;1111:5;:17;;;;;;;;;;:24;;-1:-1:-1;;1111:24:1;;;1131:4;1111:24;;;2845::11;;;;;;1972:8029;;;;;;", + "deployedSourceMap": "1972:8029:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5901:142;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5901:142:11;;;;;;;;;;;;;;;;;;;;;;;8203:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8203:115:11;;;;;;;;;-1:-1:-1;;;;;8203:115:11;;;;;;;;;;;;;;7428:136;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7428:136:11;;;;;4517:151;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4517:151:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4517:151:11;;-1:-1:-1;4517:151:11;;-1:-1:-1;;;;;;;4517:151:11;5384:145;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5384:145:11;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;7048:138:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7048:138:11;;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;4076:154:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4076:154:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4076:154:11;;-1:-1:-1;4076:154:11;;-1:-1:-1;;;;;;;4076:154:11;9563:106;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9563:106:11;;;;;7805:134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7805:134:11;;;;;8884:112;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8884:112:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;8884:112:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4953:148;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4953:148:11;;;;;;;;;8546:106;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8546:106:11;;;;;;;;;;;;;;;;;;;;;9226:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9226:109:11;;;;;3197:157;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3197:157:11;;;-1:-1:-1;;;;;3197:157:11;;;;;9895:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9895:103:11;;;;;3639:148;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3639:148:11;;;;;;;6285:136;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6285:136:11;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;6665:140:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6665:140:11;;;;;5901:142;1261:10:1;5964:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;5995:20:11;;;;:14;:20;;;;;5988:27;;-1:-1:-1;;5988:27:11;;;-1:-1:-1;;5901:142:11:o;8203:115::-;8258:14;8291:20;;;:14;:20;;;;;;-1:-1:-1;;;;;8291:20:11;;8203:115::o;7428:136::-;1261:10:1;7488:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;7519:17:11;;;;:11;:17;;;;;7512:24;;-1:-1:-1;;7512:24:11;;;-1:-1:-1;;7428:136:11:o;4517:151::-;1261:10:1;4589:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;4613:18:11;;;;:12;:18;;;;;;;;:27;;;;;;;;:::i;:::-;-1:-1:-1;4657:4:11;;4517:151;-1:-1:-1;;;4517:151:11:o;5384:145::-;1261:10:1;5452:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;5476:16:11;;;;:10;:16;;;;;;:25;5518:4;;5384:145::o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;7048:138:11:-;1261:10:1;7109:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;7140:18:11;;;;:12;:18;;;;;7133:25;;;:::i;:::-;-1:-1:-1;7175:4:11;7048:138;;;:::o;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;4076:154:11:-;1261:10:1;4150:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;4174:19:11;;;;:13;:19;;;;;;;;:28;;;;;;;;:::i;9563:106::-;9615:11;9645:17;;;:11;:17;;;;;;;;;9563:106::o;7805:134::-;1261:10:1;7864:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;7895:16:11;;;;:10;:16;;;;;7888:23;7928:4;;7805:134::o;8884:112::-;8970:19;;;;:13;:19;;;;;;;;;8963:26;;;;-1:-1:-1;;8963:26:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8938:13;;8970:19;;8963:26;;8970:19;8963:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8884:112;;;:::o;4953:148::-;1261:10:1;5023:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;5047:17:11;;;;:11;:17;;;;;;:26;;-1:-1:-1;;5047:26:11;;;;;;;;;;-1:-1:-1;;4953:148:11:o;8546:106::-;8598:11;8628:17;;;:11;:17;;;;;;;8546:106::o;9226:109::-;9310:18;;;;:12;:18;;;;;;;;;9303:25;;;;;;;;;;;;-1:-1:-1;;9303:25:11;;;;;;;;;;;;;;;;;;;;;;;;;;9279:12;;9303:25;;;9310:18;9303:25;;;;;;;;;;;;;;;;;;;;;;;;3197:157;1261:10:1;3273:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;3297:20:11;;;;:14;:20;;;;;:29;;-1:-1:-1;;;;;3297:29:11;;-1:-1:-1;;3297:29:11;;;;;;;3197:157;;;;:::o;9895:103::-;9946:10;9975:16;;;:10;:16;;;;;;;9895:103::o;3639:148::-;1261:10:1;3709:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;3733:17:11;;;;:11;:17;;;;;;;;:26;:11;3639:148::o;6285:136::-;1261:10:1;6345:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;6376:17:11;;;;:11;:17;;;;;;;6369:24;;;;6376:11;6285:136::o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;6665:140:11:-;1261:10:1;6727:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;6758:19:11;;;;:13;:19;;;;;6751:26;;;:::i;1972:8029::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1972:8029:11;;;-1:-1:-1;1972:8029:11;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\n\n/**\n\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title TokenIOStorage - Serves as derived contract for TokenIO contract and\nis used to upgrade interfaces in the event of deprecating the main contract.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Storage contract\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n\n@notice NOTE: This contract is based on the RocketPool Storage Contract,\nfound here: https://github.com/rocket-pool/rocketpool/blob/master/contracts/RocketStorage.sol\nAnd this medium article: https://medium.com/rocket-pool/upgradable-solidity-contract-design-54789205276d\n\nChanges:\n - setting primitive mapping view to internal;\n - setting method views to public;\n\n @dev NOTE: When deprecating the main TokenIO contract, the upgraded contract\n must take ownership of the TokenIO contract, it will require using the public methods\n to update changes to the underlying data. The updated contract must use a\n standard call to original TokenIO contract such that the request is made from\n the upgraded contract and not the transaction origin (tx.origin) of the signing\n account.\n\n\n @dev NOTE: The reasoning for using the storage contract is to abstract the interface\n from the data of the contract on chain, limiting the need to migrate data to\n new contracts.\n\n*/\ncontract TokenIOStorage is Ownable {\n\n\n /// @dev mapping for Primitive Data Types;\n\t\t/// @notice primitive data mappings have `internal` view;\n\t\t/// @dev only the derived contract can use the internal methods;\n\t\t/// @dev key == `keccak256(param1, param2...)`\n\t\t/// @dev Nested mapping can be achieved using multiple params in keccak256 hash;\n mapping(bytes32 => uint256) internal uIntStorage;\n mapping(bytes32 => string) internal stringStorage;\n mapping(bytes32 => address) internal addressStorage;\n mapping(bytes32 => bytes) internal bytesStorage;\n mapping(bytes32 => bool) internal boolStorage;\n mapping(bytes32 => int256) internal intStorage;\n\n constructor() public {\n\t\t\t\t/// @notice owner is set to msg.sender by default\n\t\t\t\t/// @dev consider removing in favor of setting ownership in inherited\n\t\t\t\t/// contract\n owner[msg.sender] = true;\n }\n\n /// @dev Set Key Methods\n\n /**\n * @notice Set value for Address associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Address value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setAddress(bytes32 _key, address _value) public onlyOwner returns (bool success) {\n addressStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for Uint associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Uint value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setUint(bytes32 _key, uint _value) public onlyOwner returns (bool success) {\n uIntStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for String associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The String value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setString(bytes32 _key, string _value) public onlyOwner returns (bool success) {\n stringStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for Bytes associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Bytes value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setBytes(bytes32 _key, bytes _value) public onlyOwner returns (bool success) {\n bytesStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for Bool associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Bool value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setBool(bytes32 _key, bool _value) public onlyOwner returns (bool success) {\n boolStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for Int associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Int value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setInt(bytes32 _key, int _value) public onlyOwner returns (bool success) {\n intStorage[_key] = _value;\n return true;\n }\n\n /// @dev Delete Key Methods\n\t\t/// @dev delete methods may be unnecessary; Use set methods to set values\n\t\t/// to default?\n\n /**\n * @notice Delete value for Address associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteAddress(bytes32 _key) public onlyOwner returns (bool success) {\n delete addressStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for Uint associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteUint(bytes32 _key) public onlyOwner returns (bool success) {\n delete uIntStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for String associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteString(bytes32 _key) public onlyOwner returns (bool success) {\n delete stringStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for Bytes associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteBytes(bytes32 _key) public onlyOwner returns (bool success) {\n delete bytesStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for Bool associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteBool(bytes32 _key) public onlyOwner returns (bool success) {\n delete boolStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for Int associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteInt(bytes32 _key) public onlyOwner returns (bool success) {\n delete intStorage[_key];\n return true;\n }\n\n /// @dev Get Key Methods\n\n /**\n * @notice Get value for Address associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Address value associated with the id key\" }\n */\n function getAddress(bytes32 _key) public view returns (address _value) {\n return addressStorage[_key];\n }\n\n /**\n * @notice Get value for Uint associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Uint value associated with the id key\" }\n */\n function getUint(bytes32 _key) public view returns (uint _value) {\n return uIntStorage[_key];\n }\n\n /**\n * @notice Get value for String associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the String value associated with the id key\" }\n */\n function getString(bytes32 _key) public view returns (string _value) {\n return stringStorage[_key];\n }\n\n /**\n * @notice Get value for Bytes associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Bytes value associated with the id key\" }\n */\n function getBytes(bytes32 _key) public view returns (bytes _value) {\n return bytesStorage[_key];\n }\n\n /**\n * @notice Get value for Bool associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Bool value associated with the id key\" }\n */\n function getBool(bytes32 _key) public view returns (bool _value) {\n return boolStorage[_key];\n }\n\n /**\n * @notice Get value for Int associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Int value associated with the id key\" }\n */\n function getInt(bytes32 _key) public view returns (int _value) {\n return intStorage[_key];\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "exportedSymbols": { + "TokenIOStorage": [ + 5241 + ] + }, + "id": 5242, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4908, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:11" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4909, + "nodeType": "ImportDirective", + "scope": 5242, + "sourceUnit": 185, + "src": "25:23:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4910, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1999:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4911, + "nodeType": "InheritanceSpecifier", + "src": "1999:7:11" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title TokenIOStorage - Serves as derived contract for TokenIO contract and\nis used to upgrade interfaces in the event of deprecating the main contract.\n@author Ryan Tate , Sean Pollock \n@notice Storage contract\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n@notice NOTE: This contract is based on the RocketPool Storage Contract,\nfound here: https://github.com/rocket-pool/rocketpool/blob/master/contracts/RocketStorage.sol\nAnd this medium article: https://medium.com/rocket-pool/upgradable-solidity-contract-design-54789205276d\nChanges:\n- setting primitive mapping view to internal;\n- setting method views to public;\n@dev NOTE: When deprecating the main TokenIO contract, the upgraded contract\nmust take ownership of the TokenIO contract, it will require using the public methods\nto update changes to the underlying data. The updated contract must use a\nstandard call to original TokenIO contract such that the request is made from\nthe upgraded contract and not the transaction origin (tx.origin) of the signing\naccount.\n@dev NOTE: The reasoning for using the storage contract is to abstract the interface\nfrom the data of the contract on chain, limiting the need to migrate data to\nnew contracts.", + "fullyImplemented": true, + "id": 5241, + "linearizedBaseContracts": [ + 5241, + 184 + ], + "name": "TokenIOStorage", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4915, + "name": "uIntStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2321:51:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 4914, + "keyType": { + "id": 4912, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2329:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2321:27:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 4913, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2340:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4919, + "name": "stringStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2378:53:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string)" + }, + "typeName": { + "id": 4918, + "keyType": { + "id": 4916, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2386:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2378:26:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string)" + }, + "valueType": { + "id": 4917, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2397:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4923, + "name": "addressStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2437:54:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "typeName": { + "id": 4922, + "keyType": { + "id": 4920, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2445:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2437:27:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "valueType": { + "id": 4921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2456:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4927, + "name": "bytesStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2497:52:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes)" + }, + "typeName": { + "id": 4926, + "keyType": { + "id": 4924, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2505:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2497:25:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes)" + }, + "valueType": { + "id": 4925, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2516:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4931, + "name": "boolStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2555:51:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 4930, + "keyType": { + "id": 4928, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2563:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2555:24:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 4929, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2574:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4935, + "name": "intStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2612:50:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + }, + "typeName": { + "id": 4934, + "keyType": { + "id": 4932, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2620:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2612:26:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + }, + "valueType": { + "id": 4933, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "2631:6:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4945, + "nodeType": "Block", + "src": "2690:186:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4938, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2845:5:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4941, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4939, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "2851:3:11", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2851:10:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2845:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2865:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2845:24:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4944, + "nodeType": "ExpressionStatement", + "src": "2845:24:11" + } + ] + }, + "documentation": null, + "id": 4946, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4936, + "nodeType": "ParameterList", + "parameters": [], + "src": "2680:2:11" + }, + "payable": false, + "returnParameters": { + "id": 4937, + "nodeType": "ParameterList", + "parameters": [], + "src": "2690:0:11" + }, + "scope": 5241, + "src": "2669:207:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4965, + "nodeType": "Block", + "src": "3287:67:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4957, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4923, + "src": "3297:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 4959, + "indexExpression": { + "argumentTypes": null, + "id": 4958, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4948, + "src": "3312:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3297:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4960, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4950, + "src": "3320:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3297:29:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4962, + "nodeType": "ExpressionStatement", + "src": "3297:29:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3343:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4956, + "id": 4964, + "nodeType": "Return", + "src": "3336:11:11" + } + ] + }, + "documentation": "@notice Set value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Address value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4966, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4953, + "modifierName": { + "argumentTypes": null, + "id": 4952, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "3254:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3254:9:11" + } + ], + "name": "setAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4951, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4948, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4966, + "src": "3217:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4947, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3217:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4950, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4966, + "src": "3231:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4949, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3231:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3216:30:11" + }, + "payable": false, + "returnParameters": { + "id": 4956, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4955, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4966, + "src": "3273:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4954, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3273:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3272:14:11" + }, + "scope": 5241, + "src": "3197:157:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4985, + "nodeType": "Block", + "src": "3723:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4977, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "3733:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 4979, + "indexExpression": { + "argumentTypes": null, + "id": 4978, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4968, + "src": "3745:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3733:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4980, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4970, + "src": "3753:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3733:26:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4982, + "nodeType": "ExpressionStatement", + "src": "3733:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3776:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4976, + "id": 4984, + "nodeType": "Return", + "src": "3769:11:11" + } + ] + }, + "documentation": "@notice Set value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Uint value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4986, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4973, + "modifierName": { + "argumentTypes": null, + "id": 4972, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "3690:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3690:9:11" + } + ], + "name": "setUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4968, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4986, + "src": "3656:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4967, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3656:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4970, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4986, + "src": "3670:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4969, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3670:4:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3655:27:11" + }, + "payable": false, + "returnParameters": { + "id": 4976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4975, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4986, + "src": "3709:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4974, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3709:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3708:14:11" + }, + "scope": 5241, + "src": "3639:148:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5005, + "nodeType": "Block", + "src": "4164:66:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4997, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "4174:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 4999, + "indexExpression": { + "argumentTypes": null, + "id": 4998, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4988, + "src": "4188:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4174:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5000, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4990, + "src": "4196:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4174:28:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5002, + "nodeType": "ExpressionStatement", + "src": "4174:28:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4219:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4996, + "id": 5004, + "nodeType": "Return", + "src": "4212:11:11" + } + ] + }, + "documentation": "@notice Set value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The String value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5006, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4993, + "modifierName": { + "argumentTypes": null, + "id": 4992, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4131:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4131:9:11" + } + ], + "name": "setString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4988, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5006, + "src": "4095:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4987, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4095:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4990, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5006, + "src": "4109:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4989, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4109:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4094:29:11" + }, + "payable": false, + "returnParameters": { + "id": 4996, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4995, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5006, + "src": "4150:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4994, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4150:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4149:14:11" + }, + "scope": 5241, + "src": "4076:154:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5025, + "nodeType": "Block", + "src": "4603:65:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5017, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4927, + "src": "4613:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5019, + "indexExpression": { + "argumentTypes": null, + "id": 5018, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5008, + "src": "4626:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4613:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5020, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5010, + "src": "4634:6:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "src": "4613:27:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "id": 5022, + "nodeType": "ExpressionStatement", + "src": "4613:27:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4657:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5016, + "id": 5024, + "nodeType": "Return", + "src": "4650:11:11" + } + ] + }, + "documentation": "@notice Set value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Bytes value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5026, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5013, + "modifierName": { + "argumentTypes": null, + "id": 5012, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4570:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4570:9:11" + } + ], + "name": "setBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5008, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "4535:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5007, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4535:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5010, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "4549:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5009, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4549:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4534:28:11" + }, + "payable": false, + "returnParameters": { + "id": 5016, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5015, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "4589:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5014, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4589:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:14:11" + }, + "scope": 5241, + "src": "4517:151:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5045, + "nodeType": "Block", + "src": "5037:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5037, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4931, + "src": "5047:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5039, + "indexExpression": { + "argumentTypes": null, + "id": 5038, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5028, + "src": "5059:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5047:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5040, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5030, + "src": "5067:6:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5047:26:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5042, + "nodeType": "ExpressionStatement", + "src": "5047:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5043, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5090:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5036, + "id": 5044, + "nodeType": "Return", + "src": "5083:11:11" + } + ] + }, + "documentation": "@notice Set value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Bool value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5046, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5033, + "modifierName": { + "argumentTypes": null, + "id": 5032, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5004:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5004:9:11" + } + ], + "name": "setBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5028, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5046, + "src": "4970:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5027, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4970:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5030, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5046, + "src": "4984:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5029, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4984:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4969:27:11" + }, + "payable": false, + "returnParameters": { + "id": 5036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5035, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5046, + "src": "5023:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5034, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5023:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5022:14:11" + }, + "scope": 5241, + "src": "4953:148:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5065, + "nodeType": "Block", + "src": "5466:63:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5057, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "5476:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5059, + "indexExpression": { + "argumentTypes": null, + "id": 5058, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5048, + "src": "5487:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5476:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5060, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5050, + "src": "5495:6:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5476:25:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 5062, + "nodeType": "ExpressionStatement", + "src": "5476:25:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5518:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5056, + "id": 5064, + "nodeType": "Return", + "src": "5511:11:11" + } + ] + }, + "documentation": "@notice Set value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Int value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5066, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5053, + "modifierName": { + "argumentTypes": null, + "id": 5052, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5433:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5433:9:11" + } + ], + "name": "setInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5048, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5066, + "src": "5400:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5400:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5050, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5066, + "src": "5414:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5049, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5414:3:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5399:26:11" + }, + "payable": false, + "returnParameters": { + "id": 5056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5055, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5066, + "src": "5452:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5452:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5451:14:11" + }, + "scope": 5241, + "src": "5384:145:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5082, + "nodeType": "Block", + "src": "5978:65:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "5988:27:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5075, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4923, + "src": "5995:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 5077, + "indexExpression": { + "argumentTypes": null, + "id": 5076, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5068, + "src": "6010:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5995:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5079, + "nodeType": "ExpressionStatement", + "src": "5988:27:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6032:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5074, + "id": 5081, + "nodeType": "Return", + "src": "6025:11:11" + } + ] + }, + "documentation": "@notice Delete value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5083, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5071, + "modifierName": { + "argumentTypes": null, + "id": 5070, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5945:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5945:9:11" + } + ], + "name": "deleteAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5068, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5083, + "src": "5924:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5067, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5924:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5923:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5074, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5073, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5083, + "src": "5964:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5072, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5964:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5963:14:11" + }, + "scope": 5241, + "src": "5901:142:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5099, + "nodeType": "Block", + "src": "6359:62:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6369:24:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5092, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "6376:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 5094, + "indexExpression": { + "argumentTypes": null, + "id": 5093, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "6388:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6376:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5096, + "nodeType": "ExpressionStatement", + "src": "6369:24:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6410:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5091, + "id": 5098, + "nodeType": "Return", + "src": "6403:11:11" + } + ] + }, + "documentation": "@notice Delete value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5100, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5088, + "modifierName": { + "argumentTypes": null, + "id": 5087, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "6326:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6326:9:11" + } + ], + "name": "deleteUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5086, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5085, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5100, + "src": "6305:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5084, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6305:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6304:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5091, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5090, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5100, + "src": "6345:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5089, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6345:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6344:14:11" + }, + "scope": 5241, + "src": "6285:136:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5116, + "nodeType": "Block", + "src": "6741:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6751:26:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5109, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "6758:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 5111, + "indexExpression": { + "argumentTypes": null, + "id": 5110, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5102, + "src": "6772:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6758:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5113, + "nodeType": "ExpressionStatement", + "src": "6751:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6794:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5108, + "id": 5115, + "nodeType": "Return", + "src": "6787:11:11" + } + ] + }, + "documentation": "@notice Delete value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5117, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5105, + "modifierName": { + "argumentTypes": null, + "id": 5104, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "6708:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6708:9:11" + } + ], + "name": "deleteString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5102, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5117, + "src": "6687:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5101, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6687:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6686:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5108, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5107, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5117, + "src": "6727:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5106, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6727:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6726:14:11" + }, + "scope": 5241, + "src": "6665:140:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5133, + "nodeType": "Block", + "src": "7123:63:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7133:25:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5126, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4927, + "src": "7140:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5128, + "indexExpression": { + "argumentTypes": null, + "id": 5127, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "7153:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7140:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5130, + "nodeType": "ExpressionStatement", + "src": "7133:25:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7175:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5125, + "id": 5132, + "nodeType": "Return", + "src": "7168:11:11" + } + ] + }, + "documentation": "@notice Delete value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5134, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5122, + "modifierName": { + "argumentTypes": null, + "id": 5121, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7090:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7090:9:11" + } + ], + "name": "deleteBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5119, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5134, + "src": "7069:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5118, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7069:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7068:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5125, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5124, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5134, + "src": "7109:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5123, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7109:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7108:14:11" + }, + "scope": 5241, + "src": "7048:138:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5150, + "nodeType": "Block", + "src": "7502:62:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7512:24:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5143, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4931, + "src": "7519:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5145, + "indexExpression": { + "argumentTypes": null, + "id": 5144, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5136, + "src": "7531:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7519:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5147, + "nodeType": "ExpressionStatement", + "src": "7512:24:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7553:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5142, + "id": 5149, + "nodeType": "Return", + "src": "7546:11:11" + } + ] + }, + "documentation": "@notice Delete value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5151, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5139, + "modifierName": { + "argumentTypes": null, + "id": 5138, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7469:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7469:9:11" + } + ], + "name": "deleteBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5136, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5151, + "src": "7448:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5135, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7448:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7447:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5141, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5151, + "src": "7488:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5140, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7488:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7487:14:11" + }, + "scope": 5241, + "src": "7428:136:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5167, + "nodeType": "Block", + "src": "7878:61:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7888:23:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5160, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "7895:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5162, + "indexExpression": { + "argumentTypes": null, + "id": 5161, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5153, + "src": "7906:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7895:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5164, + "nodeType": "ExpressionStatement", + "src": "7888:23:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7928:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5159, + "id": 5166, + "nodeType": "Return", + "src": "7921:11:11" + } + ] + }, + "documentation": "@notice Delete value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5168, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5156, + "modifierName": { + "argumentTypes": null, + "id": 5155, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7845:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7845:9:11" + } + ], + "name": "deleteInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5153, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5168, + "src": "7824:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5152, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7824:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7823:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5159, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5158, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5168, + "src": "7864:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5157, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7864:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7863:14:11" + }, + "scope": 5241, + "src": "7805:134:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5179, + "nodeType": "Block", + "src": "8274:44:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5175, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4923, + "src": "8291:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 5177, + "indexExpression": { + "argumentTypes": null, + "id": 5176, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5170, + "src": "8306:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8291:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5174, + "id": 5178, + "nodeType": "Return", + "src": "8284:27:11" + } + ] + }, + "documentation": "@notice Get value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Address value associated with the id key\" }", + "id": 5180, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5170, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5180, + "src": "8223:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8223:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8222:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5173, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5180, + "src": "8258:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8258:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8257:16:11" + }, + "scope": 5241, + "src": "8203:115:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5191, + "nodeType": "Block", + "src": "8611:41:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5187, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "8628:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 5189, + "indexExpression": { + "argumentTypes": null, + "id": 5188, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5182, + "src": "8640:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8628:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5186, + "id": 5190, + "nodeType": "Return", + "src": "8621:24:11" + } + ] + }, + "documentation": "@notice Get value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Uint value associated with the id key\" }", + "id": 5192, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5182, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5192, + "src": "8563:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5181, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8563:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8562:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5186, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5185, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5192, + "src": "8598:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5184, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8598:4:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8597:13:11" + }, + "scope": 5241, + "src": "8546:106:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5203, + "nodeType": "Block", + "src": "8953:43:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5199, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "8970:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 5201, + "indexExpression": { + "argumentTypes": null, + "id": 5200, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5194, + "src": "8984:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8970:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 5198, + "id": 5202, + "nodeType": "Return", + "src": "8963:26:11" + } + ] + }, + "documentation": "@notice Get value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the String value associated with the id key\" }", + "id": 5204, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5195, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5194, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5204, + "src": "8903:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5193, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8903:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8902:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5198, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5197, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5204, + "src": "8938:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5196, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8938:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8937:15:11" + }, + "scope": 5241, + "src": "8884:112:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5215, + "nodeType": "Block", + "src": "9293:42:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5211, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4927, + "src": "9310:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5213, + "indexExpression": { + "argumentTypes": null, + "id": 5212, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "9323:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9310:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "functionReturnParameters": 5210, + "id": 5214, + "nodeType": "Return", + "src": "9303:25:11" + } + ] + }, + "documentation": "@notice Get value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Bytes value associated with the id key\" }", + "id": 5216, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5206, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5216, + "src": "9244:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5205, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9244:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9243:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5209, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5216, + "src": "9279:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5208, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9279:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9278:14:11" + }, + "scope": 5241, + "src": "9226:109:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5227, + "nodeType": "Block", + "src": "9628:41:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5223, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4931, + "src": "9645:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5225, + "indexExpression": { + "argumentTypes": null, + "id": 5224, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "9657:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9645:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5222, + "id": 5226, + "nodeType": "Return", + "src": "9638:24:11" + } + ] + }, + "documentation": "@notice Get value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Bool value associated with the id key\" }", + "id": 5228, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5218, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5228, + "src": "9580:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9580:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9579:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5222, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5221, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5228, + "src": "9615:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5220, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9615:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9614:13:11" + }, + "scope": 5241, + "src": "9563:106:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5239, + "nodeType": "Block", + "src": "9958:40:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5235, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "9975:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5237, + "indexExpression": { + "argumentTypes": null, + "id": 5236, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5230, + "src": "9986:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9975:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 5234, + "id": 5238, + "nodeType": "Return", + "src": "9968:23:11" + } + ] + }, + "documentation": "@notice Get value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Int value associated with the id key\" }", + "id": 5240, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5230, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5240, + "src": "9911:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5229, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9911:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9910:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5234, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5233, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5240, + "src": "9946:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5232, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9946:3:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9945:12:11" + }, + "scope": 5241, + "src": "9895:103:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 5242, + "src": "1972:8029:11" + } + ], + "src": "0:10002:11" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "exportedSymbols": { + "TokenIOStorage": [ + 5241 + ] + }, + "id": 5242, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4908, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:11" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4909, + "nodeType": "ImportDirective", + "scope": 5242, + "sourceUnit": 185, + "src": "25:23:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4910, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1999:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4911, + "nodeType": "InheritanceSpecifier", + "src": "1999:7:11" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title TokenIOStorage - Serves as derived contract for TokenIO contract and\nis used to upgrade interfaces in the event of deprecating the main contract.\n@author Ryan Tate , Sean Pollock \n@notice Storage contract\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n@notice NOTE: This contract is based on the RocketPool Storage Contract,\nfound here: https://github.com/rocket-pool/rocketpool/blob/master/contracts/RocketStorage.sol\nAnd this medium article: https://medium.com/rocket-pool/upgradable-solidity-contract-design-54789205276d\nChanges:\n- setting primitive mapping view to internal;\n- setting method views to public;\n@dev NOTE: When deprecating the main TokenIO contract, the upgraded contract\nmust take ownership of the TokenIO contract, it will require using the public methods\nto update changes to the underlying data. The updated contract must use a\nstandard call to original TokenIO contract such that the request is made from\nthe upgraded contract and not the transaction origin (tx.origin) of the signing\naccount.\n@dev NOTE: The reasoning for using the storage contract is to abstract the interface\nfrom the data of the contract on chain, limiting the need to migrate data to\nnew contracts.", + "fullyImplemented": true, + "id": 5241, + "linearizedBaseContracts": [ + 5241, + 184 + ], + "name": "TokenIOStorage", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4915, + "name": "uIntStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2321:51:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 4914, + "keyType": { + "id": 4912, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2329:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2321:27:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 4913, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2340:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4919, + "name": "stringStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2378:53:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string)" + }, + "typeName": { + "id": 4918, + "keyType": { + "id": 4916, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2386:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2378:26:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string)" + }, + "valueType": { + "id": 4917, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2397:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4923, + "name": "addressStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2437:54:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "typeName": { + "id": 4922, + "keyType": { + "id": 4920, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2445:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2437:27:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "valueType": { + "id": 4921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2456:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4927, + "name": "bytesStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2497:52:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes)" + }, + "typeName": { + "id": 4926, + "keyType": { + "id": 4924, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2505:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2497:25:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes)" + }, + "valueType": { + "id": 4925, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2516:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4931, + "name": "boolStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2555:51:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 4930, + "keyType": { + "id": 4928, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2563:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2555:24:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 4929, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2574:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4935, + "name": "intStorage", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "2612:50:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + }, + "typeName": { + "id": 4934, + "keyType": { + "id": 4932, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2620:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2612:26:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + }, + "valueType": { + "id": 4933, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "2631:6:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4945, + "nodeType": "Block", + "src": "2690:186:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4938, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2845:5:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4941, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4939, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5256, + "src": "2851:3:11", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2851:10:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2845:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2865:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2845:24:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4944, + "nodeType": "ExpressionStatement", + "src": "2845:24:11" + } + ] + }, + "documentation": null, + "id": 4946, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4936, + "nodeType": "ParameterList", + "parameters": [], + "src": "2680:2:11" + }, + "payable": false, + "returnParameters": { + "id": 4937, + "nodeType": "ParameterList", + "parameters": [], + "src": "2690:0:11" + }, + "scope": 5241, + "src": "2669:207:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4965, + "nodeType": "Block", + "src": "3287:67:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4957, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4923, + "src": "3297:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 4959, + "indexExpression": { + "argumentTypes": null, + "id": 4958, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4948, + "src": "3312:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3297:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4960, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4950, + "src": "3320:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3297:29:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4962, + "nodeType": "ExpressionStatement", + "src": "3297:29:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3343:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4956, + "id": 4964, + "nodeType": "Return", + "src": "3336:11:11" + } + ] + }, + "documentation": "@notice Set value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Address value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4966, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4953, + "modifierName": { + "argumentTypes": null, + "id": 4952, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "3254:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3254:9:11" + } + ], + "name": "setAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4951, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4948, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4966, + "src": "3217:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4947, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3217:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4950, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4966, + "src": "3231:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4949, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3231:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3216:30:11" + }, + "payable": false, + "returnParameters": { + "id": 4956, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4955, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4966, + "src": "3273:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4954, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3273:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3272:14:11" + }, + "scope": 5241, + "src": "3197:157:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4985, + "nodeType": "Block", + "src": "3723:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4977, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "3733:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 4979, + "indexExpression": { + "argumentTypes": null, + "id": 4978, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4968, + "src": "3745:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3733:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4980, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4970, + "src": "3753:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3733:26:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4982, + "nodeType": "ExpressionStatement", + "src": "3733:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3776:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4976, + "id": 4984, + "nodeType": "Return", + "src": "3769:11:11" + } + ] + }, + "documentation": "@notice Set value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Uint value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4986, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4973, + "modifierName": { + "argumentTypes": null, + "id": 4972, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "3690:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3690:9:11" + } + ], + "name": "setUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4968, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4986, + "src": "3656:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4967, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3656:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4970, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4986, + "src": "3670:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4969, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3670:4:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3655:27:11" + }, + "payable": false, + "returnParameters": { + "id": 4976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4975, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4986, + "src": "3709:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4974, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3709:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3708:14:11" + }, + "scope": 5241, + "src": "3639:148:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5005, + "nodeType": "Block", + "src": "4164:66:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4997, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "4174:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 4999, + "indexExpression": { + "argumentTypes": null, + "id": 4998, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4988, + "src": "4188:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4174:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5000, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4990, + "src": "4196:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4174:28:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5002, + "nodeType": "ExpressionStatement", + "src": "4174:28:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4219:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4996, + "id": 5004, + "nodeType": "Return", + "src": "4212:11:11" + } + ] + }, + "documentation": "@notice Set value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The String value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5006, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4993, + "modifierName": { + "argumentTypes": null, + "id": 4992, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4131:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4131:9:11" + } + ], + "name": "setString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4988, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5006, + "src": "4095:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4987, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4095:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4990, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5006, + "src": "4109:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4989, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4109:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4094:29:11" + }, + "payable": false, + "returnParameters": { + "id": 4996, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4995, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5006, + "src": "4150:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4994, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4150:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4149:14:11" + }, + "scope": 5241, + "src": "4076:154:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5025, + "nodeType": "Block", + "src": "4603:65:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5017, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4927, + "src": "4613:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5019, + "indexExpression": { + "argumentTypes": null, + "id": 5018, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5008, + "src": "4626:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4613:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5020, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5010, + "src": "4634:6:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "src": "4613:27:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "id": 5022, + "nodeType": "ExpressionStatement", + "src": "4613:27:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4657:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5016, + "id": 5024, + "nodeType": "Return", + "src": "4650:11:11" + } + ] + }, + "documentation": "@notice Set value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Bytes value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5026, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5013, + "modifierName": { + "argumentTypes": null, + "id": 5012, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4570:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4570:9:11" + } + ], + "name": "setBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5008, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "4535:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5007, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4535:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5010, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "4549:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5009, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4549:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4534:28:11" + }, + "payable": false, + "returnParameters": { + "id": 5016, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5015, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "4589:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5014, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4589:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:14:11" + }, + "scope": 5241, + "src": "4517:151:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5045, + "nodeType": "Block", + "src": "5037:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5037, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4931, + "src": "5047:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5039, + "indexExpression": { + "argumentTypes": null, + "id": 5038, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5028, + "src": "5059:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5047:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5040, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5030, + "src": "5067:6:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5047:26:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5042, + "nodeType": "ExpressionStatement", + "src": "5047:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5043, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5090:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5036, + "id": 5044, + "nodeType": "Return", + "src": "5083:11:11" + } + ] + }, + "documentation": "@notice Set value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Bool value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5046, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5033, + "modifierName": { + "argumentTypes": null, + "id": 5032, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5004:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5004:9:11" + } + ], + "name": "setBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5028, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5046, + "src": "4970:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5027, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4970:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5030, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5046, + "src": "4984:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5029, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4984:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4969:27:11" + }, + "payable": false, + "returnParameters": { + "id": 5036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5035, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5046, + "src": "5023:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5034, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5023:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5022:14:11" + }, + "scope": 5241, + "src": "4953:148:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5065, + "nodeType": "Block", + "src": "5466:63:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5057, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "5476:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5059, + "indexExpression": { + "argumentTypes": null, + "id": 5058, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5048, + "src": "5487:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5476:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5060, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5050, + "src": "5495:6:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5476:25:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 5062, + "nodeType": "ExpressionStatement", + "src": "5476:25:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5518:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5056, + "id": 5064, + "nodeType": "Return", + "src": "5511:11:11" + } + ] + }, + "documentation": "@notice Set value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Int value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5066, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5053, + "modifierName": { + "argumentTypes": null, + "id": 5052, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5433:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5433:9:11" + } + ], + "name": "setInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5048, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5066, + "src": "5400:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5400:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5050, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5066, + "src": "5414:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5049, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5414:3:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5399:26:11" + }, + "payable": false, + "returnParameters": { + "id": 5056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5055, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5066, + "src": "5452:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5452:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5451:14:11" + }, + "scope": 5241, + "src": "5384:145:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5082, + "nodeType": "Block", + "src": "5978:65:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "5988:27:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5075, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4923, + "src": "5995:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 5077, + "indexExpression": { + "argumentTypes": null, + "id": 5076, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5068, + "src": "6010:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5995:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5079, + "nodeType": "ExpressionStatement", + "src": "5988:27:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6032:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5074, + "id": 5081, + "nodeType": "Return", + "src": "6025:11:11" + } + ] + }, + "documentation": "@notice Delete value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5083, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5071, + "modifierName": { + "argumentTypes": null, + "id": 5070, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5945:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5945:9:11" + } + ], + "name": "deleteAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5068, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5083, + "src": "5924:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5067, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5924:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5923:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5074, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5073, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5083, + "src": "5964:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5072, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5964:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5963:14:11" + }, + "scope": 5241, + "src": "5901:142:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5099, + "nodeType": "Block", + "src": "6359:62:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6369:24:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5092, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "6376:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 5094, + "indexExpression": { + "argumentTypes": null, + "id": 5093, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "6388:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6376:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5096, + "nodeType": "ExpressionStatement", + "src": "6369:24:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6410:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5091, + "id": 5098, + "nodeType": "Return", + "src": "6403:11:11" + } + ] + }, + "documentation": "@notice Delete value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5100, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5088, + "modifierName": { + "argumentTypes": null, + "id": 5087, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "6326:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6326:9:11" + } + ], + "name": "deleteUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5086, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5085, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5100, + "src": "6305:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5084, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6305:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6304:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5091, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5090, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5100, + "src": "6345:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5089, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6345:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6344:14:11" + }, + "scope": 5241, + "src": "6285:136:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5116, + "nodeType": "Block", + "src": "6741:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6751:26:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5109, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "6758:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 5111, + "indexExpression": { + "argumentTypes": null, + "id": 5110, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5102, + "src": "6772:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6758:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5113, + "nodeType": "ExpressionStatement", + "src": "6751:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6794:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5108, + "id": 5115, + "nodeType": "Return", + "src": "6787:11:11" + } + ] + }, + "documentation": "@notice Delete value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5117, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5105, + "modifierName": { + "argumentTypes": null, + "id": 5104, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "6708:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6708:9:11" + } + ], + "name": "deleteString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5102, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5117, + "src": "6687:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5101, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6687:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6686:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5108, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5107, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5117, + "src": "6727:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5106, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6727:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6726:14:11" + }, + "scope": 5241, + "src": "6665:140:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5133, + "nodeType": "Block", + "src": "7123:63:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7133:25:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5126, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4927, + "src": "7140:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5128, + "indexExpression": { + "argumentTypes": null, + "id": 5127, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "7153:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7140:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5130, + "nodeType": "ExpressionStatement", + "src": "7133:25:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7175:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5125, + "id": 5132, + "nodeType": "Return", + "src": "7168:11:11" + } + ] + }, + "documentation": "@notice Delete value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5134, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5122, + "modifierName": { + "argumentTypes": null, + "id": 5121, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7090:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7090:9:11" + } + ], + "name": "deleteBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5119, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5134, + "src": "7069:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5118, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7069:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7068:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5125, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5124, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5134, + "src": "7109:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5123, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7109:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7108:14:11" + }, + "scope": 5241, + "src": "7048:138:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5150, + "nodeType": "Block", + "src": "7502:62:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7512:24:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5143, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4931, + "src": "7519:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5145, + "indexExpression": { + "argumentTypes": null, + "id": 5144, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5136, + "src": "7531:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7519:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5147, + "nodeType": "ExpressionStatement", + "src": "7512:24:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7553:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5142, + "id": 5149, + "nodeType": "Return", + "src": "7546:11:11" + } + ] + }, + "documentation": "@notice Delete value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5151, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5139, + "modifierName": { + "argumentTypes": null, + "id": 5138, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7469:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7469:9:11" + } + ], + "name": "deleteBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5136, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5151, + "src": "7448:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5135, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7448:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7447:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5141, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5151, + "src": "7488:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5140, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7488:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7487:14:11" + }, + "scope": 5241, + "src": "7428:136:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5167, + "nodeType": "Block", + "src": "7878:61:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7888:23:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5160, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "7895:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5162, + "indexExpression": { + "argumentTypes": null, + "id": 5161, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5153, + "src": "7906:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7895:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5164, + "nodeType": "ExpressionStatement", + "src": "7888:23:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7928:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5159, + "id": 5166, + "nodeType": "Return", + "src": "7921:11:11" + } + ] + }, + "documentation": "@notice Delete value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5168, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5156, + "modifierName": { + "argumentTypes": null, + "id": 5155, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7845:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7845:9:11" + } + ], + "name": "deleteInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5153, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5168, + "src": "7824:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5152, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7824:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7823:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5159, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5158, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5168, + "src": "7864:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5157, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7864:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7863:14:11" + }, + "scope": 5241, + "src": "7805:134:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5179, + "nodeType": "Block", + "src": "8274:44:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5175, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4923, + "src": "8291:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 5177, + "indexExpression": { + "argumentTypes": null, + "id": 5176, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5170, + "src": "8306:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8291:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5174, + "id": 5178, + "nodeType": "Return", + "src": "8284:27:11" + } + ] + }, + "documentation": "@notice Get value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Address value associated with the id key\" }", + "id": 5180, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5170, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5180, + "src": "8223:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8223:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8222:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5173, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5180, + "src": "8258:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8258:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8257:16:11" + }, + "scope": 5241, + "src": "8203:115:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5191, + "nodeType": "Block", + "src": "8611:41:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5187, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "8628:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 5189, + "indexExpression": { + "argumentTypes": null, + "id": 5188, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5182, + "src": "8640:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8628:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5186, + "id": 5190, + "nodeType": "Return", + "src": "8621:24:11" + } + ] + }, + "documentation": "@notice Get value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Uint value associated with the id key\" }", + "id": 5192, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5182, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5192, + "src": "8563:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5181, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8563:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8562:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5186, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5185, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5192, + "src": "8598:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5184, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8598:4:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8597:13:11" + }, + "scope": 5241, + "src": "8546:106:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5203, + "nodeType": "Block", + "src": "8953:43:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5199, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "8970:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 5201, + "indexExpression": { + "argumentTypes": null, + "id": 5200, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5194, + "src": "8984:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8970:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 5198, + "id": 5202, + "nodeType": "Return", + "src": "8963:26:11" + } + ] + }, + "documentation": "@notice Get value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the String value associated with the id key\" }", + "id": 5204, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5195, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5194, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5204, + "src": "8903:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5193, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8903:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8902:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5198, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5197, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5204, + "src": "8938:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5196, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8938:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8937:15:11" + }, + "scope": 5241, + "src": "8884:112:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5215, + "nodeType": "Block", + "src": "9293:42:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5211, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4927, + "src": "9310:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5213, + "indexExpression": { + "argumentTypes": null, + "id": 5212, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "9323:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9310:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "functionReturnParameters": 5210, + "id": 5214, + "nodeType": "Return", + "src": "9303:25:11" + } + ] + }, + "documentation": "@notice Get value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Bytes value associated with the id key\" }", + "id": 5216, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5206, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5216, + "src": "9244:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5205, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9244:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9243:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5209, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5216, + "src": "9279:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5208, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9279:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9278:14:11" + }, + "scope": 5241, + "src": "9226:109:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5227, + "nodeType": "Block", + "src": "9628:41:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5223, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4931, + "src": "9645:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5225, + "indexExpression": { + "argumentTypes": null, + "id": 5224, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "9657:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9645:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5222, + "id": 5226, + "nodeType": "Return", + "src": "9638:24:11" + } + ] + }, + "documentation": "@notice Get value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Bool value associated with the id key\" }", + "id": 5228, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5218, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5228, + "src": "9580:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9580:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9579:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5222, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5221, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5228, + "src": "9615:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5220, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9615:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9614:13:11" + }, + "scope": 5241, + "src": "9563:106:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5239, + "nodeType": "Block", + "src": "9958:40:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5235, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "9975:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5237, + "indexExpression": { + "argumentTypes": null, + "id": 5236, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5230, + "src": "9986:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9975:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 5234, + "id": 5238, + "nodeType": "Return", + "src": "9968:23:11" + } + ] + }, + "documentation": "@notice Get value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Int value associated with the id key\" }", + "id": 5240, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5230, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5240, + "src": "9911:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5229, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9911:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9910:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5234, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5233, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5240, + "src": "9946:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5232, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9946:3:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9945:12:11" + }, + "scope": 5241, + "src": "9895:103:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 5242, + "src": "1972:8029:11" + } + ], + "src": "0:10002:11" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + "0x2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad98": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + } + }, + "links": {}, + "address": "0xe8f0b03249a078cbb1cc5b58addb6c289952a036", + "transactionHash": "0x707a50aa241ab7a9355e1a9a30ecb8f8d762228ff6f4a9862e3aa0f52fe25fba" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-09-18T18:57:45.570Z" +} \ No newline at end of file From 6ee38f82571ce3371506c13af91872b248bb01e1 Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Mon, 22 Oct 2018 11:55:05 -0700 Subject: [PATCH 02/40] Update migrations scripts to separate files Now able to run `truffle migrate --reset -f ` NOTE: This will run the subsequent migrations files after the number. --- migrations/2_deploy_contracts.js | 75 ------------------- migrations/2_deploy_libraries.js | 44 +++++++++++ migrations/3_deploy_TokenIOStorage.js | 23 ++++++ .../4_deploy_TokenIOMasterFeeContract.js | 35 +++++++++ migrations/5_deploy_TokenIOAuthority.js | 38 ++++++++++ .../6_deploy_TokenIOCurrencyAuthority.js | 29 +++++++ migrations/7_deploy_TokenIOMerchant.js | 33 ++++++++ migrations/8_deploy_TokenIOERC20.js | 35 +++++++++ migrations/9_deploy_TokenIOFX.js | 28 +++++++ 9 files changed, 265 insertions(+), 75 deletions(-) delete mode 100644 migrations/2_deploy_contracts.js create mode 100644 migrations/2_deploy_libraries.js create mode 100644 migrations/3_deploy_TokenIOStorage.js create mode 100644 migrations/4_deploy_TokenIOMasterFeeContract.js create mode 100644 migrations/5_deploy_TokenIOAuthority.js create mode 100644 migrations/6_deploy_TokenIOCurrencyAuthority.js create mode 100644 migrations/7_deploy_TokenIOMerchant.js create mode 100644 migrations/8_deploy_TokenIOERC20.js create mode 100644 migrations/9_deploy_TokenIOFX.js diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js deleted file mode 100644 index dee189a..0000000 --- a/migrations/2_deploy_contracts.js +++ /dev/null @@ -1,75 +0,0 @@ -const { delay } = require('bluebird') - -const SafeMath = artifacts.require("./SafeMath.sol") -const TokenIOLib = artifacts.require("./TokenIOLib.sol") -const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") -const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") -const TokenIOAuthority = artifacts.require("./TokenIOAuthority.sol") -const TokenIOFX = artifacts.require("./TokenIOFX.sol") -const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol") -const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") -const TokenIOMerchant = artifacts.require("./TokenIOMerchant.sol") - -const { mode, development, production } = require('../token.config.js'); -const { - AUTHORITY_DETAILS: { firmName, authorityAddress }, - TOKEN_DETAILS, - FEE_PARAMS -} = mode == 'production' ? production : development; - -const deployContracts = async (deployer, accounts) => { - try { - /* library */ - // const safeMath = await deployer.deploy(SafeMath) - // await deployer.link(SafeMath, [TokenIOLib]) - // const tokenIOLib = await deployer.deploy(TokenIOLib) - await deployer.link(TokenIOLib, - [TokenIOStorage, TokenIOERC20, TokenIOAuthority, TokenIOCurrencyAuthority, TokenIOFX, TokenIOFeeContract]) - - /* storage */ - const storage = await TokenIOStorage.deployed() // await deployer.deploy(TokenIOStorage) - - /* master fee contract */ - // const masterFeeContract = await deployer.deploy(TokenIOFeeContract, storage.address) - // await storage.allowOwnership(masterFeeContract.address) - // await masterFeeContract.setFeeParams(...Object.keys(FEE_PARAMS).map((p) => { return FEE_PARAMS[p] })) - - /* authority contracts */ - // const authority = await deployer.deploy(TokenIOAuthority, storage.address) - // await storage.allowOwnership(authority.address) - // const currencyAuthority = await deployer.deploy(TokenIOCurrencyAuthority, storage.address) - // await storage.allowOwnership(currencyAuthority.address) - - /* merchant contract */ - // const merchant = await deployer.deploy(TokenIOMerchant, storage.address) - // await storage.allowOwnership(merchant.address) - // await merchant.setParams(masterFeeContract.address) - - /* fx */ - // const fx = await deployer.deploy(TokenIOFX, storage.address) - // await storage.allowOwnership(fx.address) - - /* registration */ - // await authority.setRegisteredFirm(firmName, true) - // await authority.setRegisteredAuthority(firmName, accounts[0], true) - // await authority.setMasterFeeContract(masterFeeContract.address) - - /* token */ - const token = await deployer.deploy(TokenIOERC20, storage.address) - await storage.allowOwnership(token.address) - await token.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - - return true - } catch (err) { - console.log('### error deploying contracts', err) - } -} - - -module.exports = (deployer, network, accounts) => { - deployer.then(async () => { - await deployContracts(deployer, accounts) - console.log('### finished deploying contracts') - }) - .catch(err => console.log('### error deploying contracts', err)) -} diff --git a/migrations/2_deploy_libraries.js b/migrations/2_deploy_libraries.js new file mode 100644 index 0000000..5e7d232 --- /dev/null +++ b/migrations/2_deploy_libraries.js @@ -0,0 +1,44 @@ +const { delay } = require('bluebird') + +const SafeMath = artifacts.require("./SafeMath.sol") +const TokenIOLib = artifacts.require("./TokenIOLib.sol") +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") +const TokenIOAuthority = artifacts.require("./TokenIOAuthority.sol") +const TokenIOFX = artifacts.require("./TokenIOFX.sol") +const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol") +const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") +const TokenIOMerchant = artifacts.require("./TokenIOMerchant.sol") + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS, + FEE_PARAMS +} = mode == 'production' ? production : development; + +const deployContracts = async (deployer, accounts) => { + try { + /* library */ + const safeMath = await deployer.deploy(SafeMath) + + await deployer.link(SafeMath, [TokenIOLib]) + const tokenIOLib = await deployer.deploy(TokenIOLib) + + await deployer.link(TokenIOLib, + [TokenIOStorage, TokenIOERC20, TokenIOAuthority, TokenIOCurrencyAuthority, TokenIOFX, TokenIOFeeContract]) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/migrations/3_deploy_TokenIOStorage.js b/migrations/3_deploy_TokenIOStorage.js new file mode 100644 index 0000000..a6941ed --- /dev/null +++ b/migrations/3_deploy_TokenIOStorage.js @@ -0,0 +1,23 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + await deployer.deploy(TokenIOStorage) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/migrations/4_deploy_TokenIOMasterFeeContract.js b/migrations/4_deploy_TokenIOMasterFeeContract.js new file mode 100644 index 0000000..0635bd8 --- /dev/null +++ b/migrations/4_deploy_TokenIOMasterFeeContract.js @@ -0,0 +1,35 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + FEE_PARAMS +} = mode == 'production' ? production : development; + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* master fee contract */ + const masterFeeContract = await deployer.deploy(TokenIOFeeContract, storage.address) + await storage.allowOwnership(masterFeeContract.address) + await masterFeeContract.setFeeParams(...Object.keys(FEE_PARAMS).map((p) => { return FEE_PARAMS[p] })) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/migrations/5_deploy_TokenIOAuthority.js b/migrations/5_deploy_TokenIOAuthority.js new file mode 100644 index 0000000..28cdb12 --- /dev/null +++ b/migrations/5_deploy_TokenIOAuthority.js @@ -0,0 +1,38 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOAuthority = artifacts.require("./TokenIOAuthority.sol") + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, +} = mode == 'production' ? production : development; + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* authority contracts */ + const authority = await deployer.deploy(TokenIOAuthority, storage.address) + await storage.allowOwnership(authority.address) + + /* registration */ + await authority.setRegisteredFirm(firmName, true) + await authority.setRegisteredAuthority(firmName, accounts[0], true) + await authority.setMasterFeeContract(masterFeeContract.address) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/migrations/6_deploy_TokenIOCurrencyAuthority.js b/migrations/6_deploy_TokenIOCurrencyAuthority.js new file mode 100644 index 0000000..4a85766 --- /dev/null +++ b/migrations/6_deploy_TokenIOCurrencyAuthority.js @@ -0,0 +1,29 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol") + +const deployContracts = async (deployer, accounts) => { + try { + + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* authority contracts */ + const currencyAuthority = await deployer.deploy(TokenIOCurrencyAuthority, storage.address) + await storage.allowOwnership(currencyAuthority.address) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/migrations/7_deploy_TokenIOMerchant.js b/migrations/7_deploy_TokenIOMerchant.js new file mode 100644 index 0000000..ca5abcd --- /dev/null +++ b/migrations/7_deploy_TokenIOMerchant.js @@ -0,0 +1,33 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") +const TokenIOMerchant = artifacts.require("./TokenIOMerchant.sol") + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* master fee contract */ + const masterFeeContract = await deployer.deployed(TokenIOFeeContract) + + /* merchant contract */ + const merchant = await deployer.deploy(TokenIOMerchant, storage.address) + await storage.allowOwnership(merchant.address) + await merchant.setParams(masterFeeContract.address) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/migrations/8_deploy_TokenIOERC20.js b/migrations/8_deploy_TokenIOERC20.js new file mode 100644 index 0000000..1752854 --- /dev/null +++ b/migrations/8_deploy_TokenIOERC20.js @@ -0,0 +1,35 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS +} = mode == 'production' ? production : development; + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* token */ + const token = await deployer.deploy(TokenIOERC20, storage.address) + await storage.allowOwnership(token.address) + await token.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/migrations/9_deploy_TokenIOFX.js b/migrations/9_deploy_TokenIOFX.js new file mode 100644 index 0000000..c684556 --- /dev/null +++ b/migrations/9_deploy_TokenIOFX.js @@ -0,0 +1,28 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOFX = artifacts.require("./TokenIOFX.sol") + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* fx */ + const fx = await deployer.deploy(TokenIOFX, storage.address) + await storage.allowOwnership(fx.address) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} From 284dbb1645d55ce67896fb663dc02f3af5dc9b33 Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Mon, 22 Oct 2018 12:44:34 -0700 Subject: [PATCH 03/40] Reverted back to 0.4.24; Able to deploy and run successful unit tests for contracts --- migrations/5_deploy_TokenIOAuthority.js | 3 +++ migrations/7_deploy_TokenIOMerchant.js | 2 +- package-lock.json | 19 ++++++++++--------- truffle.js | 3 ++- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/migrations/5_deploy_TokenIOAuthority.js b/migrations/5_deploy_TokenIOAuthority.js index 28cdb12..ee090b8 100644 --- a/migrations/5_deploy_TokenIOAuthority.js +++ b/migrations/5_deploy_TokenIOAuthority.js @@ -2,6 +2,7 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOAuthority = artifacts.require("./TokenIOAuthority.sol") +const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") const { mode, development, production } = require('../token.config.js'); const { @@ -17,6 +18,8 @@ const deployContracts = async (deployer, accounts) => { const authority = await deployer.deploy(TokenIOAuthority, storage.address) await storage.allowOwnership(authority.address) + const masterFeeContract = await TokenIOFeeContract.deployed() + /* registration */ await authority.setRegisteredFirm(firmName, true) await authority.setRegisteredAuthority(firmName, accounts[0], true) diff --git a/migrations/7_deploy_TokenIOMerchant.js b/migrations/7_deploy_TokenIOMerchant.js index ca5abcd..f5a37f8 100644 --- a/migrations/7_deploy_TokenIOMerchant.js +++ b/migrations/7_deploy_TokenIOMerchant.js @@ -10,7 +10,7 @@ const deployContracts = async (deployer, accounts) => { const storage = await TokenIOStorage.deployed() /* master fee contract */ - const masterFeeContract = await deployer.deployed(TokenIOFeeContract) + const masterFeeContract = await TokenIOFeeContract.deployed() /* merchant contract */ const merchant = await deployer.deploy(TokenIOMerchant, storage.address) diff --git a/package-lock.json b/package-lock.json index 1e9a3c6..02ecdf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1266,8 +1266,17 @@ "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", "ethereumjs-util": "^5.1.1" + }, + "dependencies": { + "ethereumjs-abi": { + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", + "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", + "requires": { + "bn.js": "^4.10.0", + "ethereumjs-util": "^5.0.0" + } + } } }, "eth-tx-summary": { @@ -1370,14 +1379,6 @@ "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" }, - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", - "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^5.0.0" - } - }, "ethereumjs-account": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", diff --git a/truffle.js b/truffle.js index 72a319a..52bee9e 100644 --- a/truffle.js +++ b/truffle.js @@ -45,6 +45,7 @@ module.exports = { optimizer: { enabled: true, runs: 200 - } + }, + version: '0.4.24' } }; From 1333896ec84cec1df22749a8150d4609e028bd89 Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Mon, 29 Oct 2018 13:46:15 -0700 Subject: [PATCH 04/40] WIP: Adding a Stable Coin swap contract for converting trusted stable coins to USDx and vice-versa. --- contracts/ERC20Interface.sol | 35 + .../Migrations.json | 0 .../Ownable.json | 0 .../SafeMath.json | 0 .../TokenIOAuthority.json | 0 .../TokenIOCurrencyAuthority.json | 0 .../TokenIOERC20.json | 0 .../TokenIOFX.json | 0 .../TokenIOFeeContract.json | 0 .../TokenIOLib.json | 0 .../TokenIOMerchant.json | 0 .../TokenIONameSpace.json | 0 .../TokenIOStorage.json | 0 deployed/mainnet-v1.0.1/Migrations.json | 1391 + deployed/mainnet-v1.0.1/Ownable.json | 3323 + deployed/mainnet-v1.0.1/SafeMath.json | 2636 + deployed/mainnet-v1.0.1/TokenIOAuthority.json | 5072 + .../TokenIOCurrencyAuthority.json | 12494 +++ deployed/mainnet-v1.0.1/TokenIOERC20.json | 12508 +++ deployed/mainnet-v1.0.1/TokenIOFX.json | 2198 + .../mainnet-v1.0.1/TokenIOFeeContract.json | 6211 ++ deployed/mainnet-v1.0.1/TokenIOLib.json | 87996 ++++++++++++++++ deployed/mainnet-v1.0.1/TokenIOMerchant.json | 7204 ++ deployed/mainnet-v1.0.1/TokenIONameSpace.json | 1297 + deployed/mainnet-v1.0.1/TokenIOStorage.json | 8280 ++ migrations/10_deploy_TokenIOStableSwap.js | 36 + package.json | 4 +- test/TokenIOStableSwap.js | 78 + test/TokenIOStorage.js | 2 +- token.config.js | 32 +- 30 files changed, 150780 insertions(+), 17 deletions(-) create mode 100644 contracts/ERC20Interface.sol rename deployed/{mainnet => mainnet-deprecated}/Migrations.json (100%) rename deployed/{mainnet => mainnet-deprecated}/Ownable.json (100%) rename deployed/{mainnet => mainnet-deprecated}/SafeMath.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIOAuthority.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIOCurrencyAuthority.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIOERC20.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIOFX.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIOFeeContract.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIOLib.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIOMerchant.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIONameSpace.json (100%) rename deployed/{mainnet => mainnet-deprecated}/TokenIOStorage.json (100%) create mode 100644 deployed/mainnet-v1.0.1/Migrations.json create mode 100644 deployed/mainnet-v1.0.1/Ownable.json create mode 100644 deployed/mainnet-v1.0.1/SafeMath.json create mode 100644 deployed/mainnet-v1.0.1/TokenIOAuthority.json create mode 100644 deployed/mainnet-v1.0.1/TokenIOCurrencyAuthority.json create mode 100644 deployed/mainnet-v1.0.1/TokenIOERC20.json create mode 100644 deployed/mainnet-v1.0.1/TokenIOFX.json create mode 100644 deployed/mainnet-v1.0.1/TokenIOFeeContract.json create mode 100644 deployed/mainnet-v1.0.1/TokenIOLib.json create mode 100644 deployed/mainnet-v1.0.1/TokenIOMerchant.json create mode 100644 deployed/mainnet-v1.0.1/TokenIONameSpace.json create mode 100644 deployed/mainnet-v1.0.1/TokenIOStorage.json create mode 100644 migrations/10_deploy_TokenIOStableSwap.js create mode 100644 test/TokenIOStableSwap.js diff --git a/contracts/ERC20Interface.sol b/contracts/ERC20Interface.sol new file mode 100644 index 0000000..aa91250 --- /dev/null +++ b/contracts/ERC20Interface.sol @@ -0,0 +1,35 @@ +pragma solidity ^0.4.24; + +/** + * @title ERC20 interface + * @dev see https://github.com/ethereum/EIPs/issues/20 + * @notice interface contract from Zeppelin token erc20; + */ +interface ERC20Interface { + function totalSupply() external view returns (uint256); + + function balanceOf(address who) external view returns (uint256); + + function allowance(address owner, address spender) + external view returns (uint256); + + function transfer(address to, uint256 value) external returns (bool); + + function approve(address spender, uint256 value) + external returns (bool); + + function transferFrom(address from, address to, uint256 value) + external returns (bool); + + event Transfer( + address indexed from, + address indexed to, + uint256 value + ); + + event Approval( + address indexed owner, + address indexed spender, + uint256 value + ); +} diff --git a/deployed/mainnet/Migrations.json b/deployed/mainnet-deprecated/Migrations.json similarity index 100% rename from deployed/mainnet/Migrations.json rename to deployed/mainnet-deprecated/Migrations.json diff --git a/deployed/mainnet/Ownable.json b/deployed/mainnet-deprecated/Ownable.json similarity index 100% rename from deployed/mainnet/Ownable.json rename to deployed/mainnet-deprecated/Ownable.json diff --git a/deployed/mainnet/SafeMath.json b/deployed/mainnet-deprecated/SafeMath.json similarity index 100% rename from deployed/mainnet/SafeMath.json rename to deployed/mainnet-deprecated/SafeMath.json diff --git a/deployed/mainnet/TokenIOAuthority.json b/deployed/mainnet-deprecated/TokenIOAuthority.json similarity index 100% rename from deployed/mainnet/TokenIOAuthority.json rename to deployed/mainnet-deprecated/TokenIOAuthority.json diff --git a/deployed/mainnet/TokenIOCurrencyAuthority.json b/deployed/mainnet-deprecated/TokenIOCurrencyAuthority.json similarity index 100% rename from deployed/mainnet/TokenIOCurrencyAuthority.json rename to deployed/mainnet-deprecated/TokenIOCurrencyAuthority.json diff --git a/deployed/mainnet/TokenIOERC20.json b/deployed/mainnet-deprecated/TokenIOERC20.json similarity index 100% rename from deployed/mainnet/TokenIOERC20.json rename to deployed/mainnet-deprecated/TokenIOERC20.json diff --git a/deployed/mainnet/TokenIOFX.json b/deployed/mainnet-deprecated/TokenIOFX.json similarity index 100% rename from deployed/mainnet/TokenIOFX.json rename to deployed/mainnet-deprecated/TokenIOFX.json diff --git a/deployed/mainnet/TokenIOFeeContract.json b/deployed/mainnet-deprecated/TokenIOFeeContract.json similarity index 100% rename from deployed/mainnet/TokenIOFeeContract.json rename to deployed/mainnet-deprecated/TokenIOFeeContract.json diff --git a/deployed/mainnet/TokenIOLib.json b/deployed/mainnet-deprecated/TokenIOLib.json similarity index 100% rename from deployed/mainnet/TokenIOLib.json rename to deployed/mainnet-deprecated/TokenIOLib.json diff --git a/deployed/mainnet/TokenIOMerchant.json b/deployed/mainnet-deprecated/TokenIOMerchant.json similarity index 100% rename from deployed/mainnet/TokenIOMerchant.json rename to deployed/mainnet-deprecated/TokenIOMerchant.json diff --git a/deployed/mainnet/TokenIONameSpace.json b/deployed/mainnet-deprecated/TokenIONameSpace.json similarity index 100% rename from deployed/mainnet/TokenIONameSpace.json rename to deployed/mainnet-deprecated/TokenIONameSpace.json diff --git a/deployed/mainnet/TokenIOStorage.json b/deployed/mainnet-deprecated/TokenIOStorage.json similarity index 100% rename from deployed/mainnet/TokenIOStorage.json rename to deployed/mainnet-deprecated/TokenIOStorage.json diff --git a/deployed/mainnet-v1.0.1/Migrations.json b/deployed/mainnet-v1.0.1/Migrations.json new file mode 100644 index 0000000..66cd860 --- /dev/null +++ b/deployed/mainnet-v1.0.1/Migrations.json @@ -0,0 +1,1391 @@ +{ + "contractName": "Migrations", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "last_completed_migration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": false, + "inputs": [ + { + "name": "completed", + "type": "uint256" + } + ], + "name": "setCompleted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "new_address", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058200175751d280e290aa803e109324413a03bf62768201f1dae333300fb6049ffaf0029", + "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058200175751d280e290aa803e109324413a03bf62768201f1dae333300fb6049ffaf0029", + "sourceMap": "25:480:0:-;;;177:50;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;204:5:0;:18;;-1:-1:-1;;;;;;204:18:0;212:10;204:18;;;25:480;;;;;;", + "deployedSourceMap": "25:480:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;338:165;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;338:165:0;;;;;;;;;73:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;73:36:0;;;;;;;;;;;;;;;;;;;;49:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;49:20:0;;;;;;;;;;;;;;;;;;;;;;;231:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;231:103:0;;;;;338:165;400:19;160:5;;;;146:10;:19;142:26;;;433:11;400:45;;451:8;:21;;;473:24;;451:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;451:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;451:47:0;;;;142:26;338:165;;:::o;73:36::-;;;;:::o;49:20::-;;;;;;:::o;231:103::-;160:5;;;;146:10;:19;142:26;;;293:24;:36;;;142:26;231:103;:::o", + "source": "pragma solidity 0.4.24;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Migrations.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 56 + ] + }, + "id": 57, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 56, + "linearizedBaseContracts": [ + 56 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "49:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 5, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "73:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "73:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 13, + "nodeType": "Block", + "src": "136:37:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "146:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "146:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "160:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "146:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12, + "nodeType": "IfStatement", + "src": "142:26:0", + "trueBody": { + "id": 11, + "nodeType": "PlaceholderStatement", + "src": "167:1:0" + } + } + ] + }, + "documentation": null, + "id": 14, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6, + "nodeType": "ParameterList", + "parameters": [], + "src": "133:2:0" + }, + "src": "114:59:0", + "visibility": "internal" + }, + { + "body": { + "id": 22, + "nodeType": "Block", + "src": "198:29:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "204:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "212:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "212:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "204:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21, + "nodeType": "ExpressionStatement", + "src": "204:18:0" + } + ] + }, + "documentation": null, + "id": 23, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 15, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:0" + }, + "payable": false, + "returnParameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [], + "src": "198:0:0" + }, + "scope": 56, + "src": "177:50:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 34, + "nodeType": "Block", + "src": "287:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 32, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 30, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "293:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 31, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "320:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "293:36:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 33, + "nodeType": "ExpressionStatement", + "src": "293:36:0" + } + ] + }, + "documentation": null, + "id": 35, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 28, + "modifierName": { + "argumentTypes": null, + "id": 27, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "276:10:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "276:10:0" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 25, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 35, + "src": "253:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "253:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "252:16:0" + }, + "payable": false, + "returnParameters": { + "id": 29, + "nodeType": "ParameterList", + "parameters": [], + "src": "287:0:0" + }, + "scope": 56, + "src": "231:103:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 54, + "nodeType": "Block", + "src": "394:109:0", + "statements": [ + { + "assignments": [ + 43 + ], + "declarations": [ + { + "constant": false, + "id": 43, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "400:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 42, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 56, + "src": "400:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 47, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "433:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 44, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "422:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$56_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "422:23:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "400:45:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 51, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "473:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 48, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "451:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "451:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:47:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 53, + "nodeType": "ExpressionStatement", + "src": "451:47:0" + } + ] + }, + "documentation": null, + "id": 55, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 40, + "modifierName": { + "argumentTypes": null, + "id": 39, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "383:10:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "383:10:0" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 38, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 37, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "355:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "355:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "354:21:0" + }, + "payable": false, + "returnParameters": { + "id": 41, + "nodeType": "ParameterList", + "parameters": [], + "src": "394:0:0" + }, + "scope": 56, + "src": "338:165:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 57, + "src": "25:480:0" + } + ], + "src": "0:506:0" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 56 + ] + }, + "id": 57, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 56, + "linearizedBaseContracts": [ + 56 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "49:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 5, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "73:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "73:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 13, + "nodeType": "Block", + "src": "136:37:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "146:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "146:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "160:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "146:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12, + "nodeType": "IfStatement", + "src": "142:26:0", + "trueBody": { + "id": 11, + "nodeType": "PlaceholderStatement", + "src": "167:1:0" + } + } + ] + }, + "documentation": null, + "id": 14, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6, + "nodeType": "ParameterList", + "parameters": [], + "src": "133:2:0" + }, + "src": "114:59:0", + "visibility": "internal" + }, + { + "body": { + "id": 22, + "nodeType": "Block", + "src": "198:29:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "204:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "212:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "212:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "204:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21, + "nodeType": "ExpressionStatement", + "src": "204:18:0" + } + ] + }, + "documentation": null, + "id": 23, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 15, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:0" + }, + "payable": false, + "returnParameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [], + "src": "198:0:0" + }, + "scope": 56, + "src": "177:50:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 34, + "nodeType": "Block", + "src": "287:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 32, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 30, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "293:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 31, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "320:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "293:36:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 33, + "nodeType": "ExpressionStatement", + "src": "293:36:0" + } + ] + }, + "documentation": null, + "id": 35, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 28, + "modifierName": { + "argumentTypes": null, + "id": 27, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "276:10:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "276:10:0" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 25, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 35, + "src": "253:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "253:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "252:16:0" + }, + "payable": false, + "returnParameters": { + "id": 29, + "nodeType": "ParameterList", + "parameters": [], + "src": "287:0:0" + }, + "scope": 56, + "src": "231:103:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 54, + "nodeType": "Block", + "src": "394:109:0", + "statements": [ + { + "assignments": [ + 43 + ], + "declarations": [ + { + "constant": false, + "id": 43, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "400:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 42, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 56, + "src": "400:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 47, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "433:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 44, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "422:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$56_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "422:23:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "400:45:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 51, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "473:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 48, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "451:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$56", + "typeString": "contract Migrations" + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "451:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:47:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 53, + "nodeType": "ExpressionStatement", + "src": "451:47:0" + } + ] + }, + "documentation": null, + "id": 55, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 40, + "modifierName": { + "argumentTypes": null, + "id": 39, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "383:10:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "383:10:0" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 38, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 37, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "355:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "355:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "354:21:0" + }, + "payable": false, + "returnParameters": { + "id": 41, + "nodeType": "ParameterList", + "parameters": [], + "src": "394:0:0" + }, + "scope": 56, + "src": "338:165:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 57, + "src": "25:480:0" + } + ], + "src": "0:506:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x2c73bd47580b2a2ba9cfac4fc73fed07764a72f0", + "transactionHash": "0x3d17429f13502b53740e7286b2601a714ec8fb453df24a5b794feb077e617699" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0x8cdaf0cd259887258bc13a92c0a6da92698644c0", + "transactionHash": "0x80dd84284a64bae0c034e86d4a4253eec382f9e557f56d2cc6fe606c8fe346f7" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:41:08.921Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/Ownable.json b/deployed/mainnet-v1.0.1/Ownable.json new file mode 100644 index 0000000..170651b --- /dev/null +++ b/deployed/mainnet-v1.0.1/Ownable.json @@ -0,0 +1,3323 @@ +{ + "contractName": "Ownable", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50336000908152602081905260409020805460ff1916600117905561045a8061003a6000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634bbc142c8114610066578063666a34271461009b578063666e1b39146100bc578063f2fde38b146100dd575b600080fd5b34801561007257600080fd5b50610087600160a060020a03600435166100fe565b604080519115158252519081900360200190f35b3480156100a757600080fd5b50610087600160a060020a03600435166101de565b3480156100c857600080fd5b50610087600160a060020a03600435166102bb565b3480156100e957600080fd5b50610087600160a060020a03600435166102d0565b3360009081526020819052604081205460ff16151561018d576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff16151561026d576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff16151561035f576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a03821615156103bf576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff1991821681179092553384529190922080549091169055905600a165627a7a72305820008982c7122c078b3561e82dc528b2b9c23f88189abb0e2866f411c5d2edc7950029", + "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634bbc142c8114610066578063666a34271461009b578063666e1b39146100bc578063f2fde38b146100dd575b600080fd5b34801561007257600080fd5b50610087600160a060020a03600435166100fe565b604080519115158252519081900360200190f35b3480156100a757600080fd5b50610087600160a060020a03600435166101de565b3480156100c857600080fd5b50610087600160a060020a03600435166102bb565b3480156100e957600080fd5b50610087600160a060020a03600435166102d0565b3360009081526020819052604081205460ff16151561018d576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff16151561026d576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff16151561035f576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a03821615156103bf576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff1991821681179092553384529190922080549091169055905600a165627a7a72305820008982c7122c078b3561e82dc528b2b9c23f88189abb0e2866f411c5d2edc7950029", + "sourceMap": "703:2059:1:-;;;1084:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1117:10:1;1111:5;:17;;;;;;;;;;:24;;-1:-1:-1;;1111:24:1;1131:4;1111:24;;;703:2059;;;;;;", + "deployedSourceMap": "703:2059:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2127:185;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;;;;;;;;;;;;;;;;;;;2571:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;1589:291;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2127:185;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;2571:188::-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;1589:291::-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o", + "source": "pragma solidity 0.4.24;\n\n\n\n\n/**\n\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".\n\n\n */\ncontract Ownable {\n\n mapping(address => bool) public owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n event AllowOwnership(address indexed allowedAddress);\n event RevokeOwnership(address indexed allowedAddress);\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n constructor() public {\n owner[msg.sender] = true;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner[msg.sender], \"Error: Transaction sender is not allowed by the contract.\");\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n * @return {\"success\" : \"Returns true when successfully transferred ownership\"}\n */\n function transferOwnership(address newOwner) public onlyOwner returns (bool success) {\n require(newOwner != address(0), \"Error: newOwner cannot be null!\");\n emit OwnershipTransferred(msg.sender, newOwner);\n owner[newOwner] = true;\n owner[msg.sender] = false;\n return true;\n }\n\n /**\n * @dev Allows interface contracts and accounts to access contract methods (e.g. Storage contract)\n * @param allowedAddress The address of new owner\n * @return {\"success\" : \"Returns true when successfully allowed ownership\"}\n */\n function allowOwnership(address allowedAddress) public onlyOwner returns (bool success) {\n owner[allowedAddress] = true;\n emit AllowOwnership(allowedAddress);\n return true;\n }\n\n /**\n * @dev Disallows interface contracts and accounts to access contract methods (e.g. Storage contract)\n * @param allowedAddress The address to disallow ownership\n * @return {\"success\" : \"Returns true when successfully allowed ownership\"}\n */\n function removeOwnership(address allowedAddress) public onlyOwner returns (bool success) {\n owner[allowedAddress] = false;\n emit RevokeOwnership(allowedAddress);\n return true;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "exportedSymbols": { + "Ownable": [ + 184 + ] + }, + "id": 185, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 58, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".", + "fullyImplemented": true, + "id": 184, + "linearizedBaseContracts": [ + 184 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 62, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 184, + "src": "725:37:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 61, + "keyType": { + "id": 59, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "733:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "725:24:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 60, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "744:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 68, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 67, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "794:29:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 63, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "794:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "825:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "825:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "793:57:1" + }, + "src": "767:84:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 72, + "name": "AllowOwnership", + "nodeType": "EventDefinition", + "parameters": { + "id": 71, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 70, + "indexed": true, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 72, + "src": "875:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 69, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "875:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "874:32:1" + }, + "src": "854:53:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 76, + "name": "RevokeOwnership", + "nodeType": "EventDefinition", + "parameters": { + "id": 75, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 74, + "indexed": true, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "932:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 73, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "932:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "931:32:1" + }, + "src": "910:54:1" + }, + { + "body": { + "id": 86, + "nodeType": "Block", + "src": "1105:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 79, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1111:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 82, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 80, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1117:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 81, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1117:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1111:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1131:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1111:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 85, + "nodeType": "ExpressionStatement", + "src": "1111:24:1" + } + ] + }, + "documentation": "@dev The Ownable constructor sets the original `owner` of the contract to the sender\naccount.", + "id": 87, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "1095:2:1" + }, + "payable": false, + "returnParameters": { + "id": 78, + "nodeType": "ParameterList", + "parameters": [], + "src": "1105:0:1" + }, + "scope": 184, + "src": "1084:56:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 98, + "nodeType": "Block", + "src": "1241:105:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 90, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1255:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 93, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 91, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1261:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1261:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1255:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7420616c6c6f7765642062792074686520636f6e74726163742e", + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1274:59:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8291170cda70aa6a33f032b286d45ac3395ac65762e92264c69af22ca29fa73f", + "typeString": "literal_string \"Error: Transaction sender is not allowed by the contract.\"" + }, + "value": "Error: Transaction sender is not allowed by the contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8291170cda70aa6a33f032b286d45ac3395ac65762e92264c69af22ca29fa73f", + "typeString": "literal_string \"Error: Transaction sender is not allowed by the contract.\"" + } + ], + "id": 89, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "1247:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1247:87:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 96, + "nodeType": "ExpressionStatement", + "src": "1247:87:1" + }, + { + "id": 97, + "nodeType": "PlaceholderStatement", + "src": "1340:1:1" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 99, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 88, + "nodeType": "ParameterList", + "parameters": [], + "src": "1238:2:1" + }, + "src": "1220:126:1", + "visibility": "internal" + }, + { + "body": { + "id": 138, + "nodeType": "Block", + "src": "1674:206:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 109, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1688:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1708:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1700:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1700:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1688:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c21", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1712:33:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0cf773df2ba40d551ba87e95013f067aa808666d9d26ad6f662416df58eb7494", + "typeString": "literal_string \"Error: newOwner cannot be null!\"" + }, + "value": "Error: newOwner cannot be null!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0cf773df2ba40d551ba87e95013f067aa808666d9d26ad6f662416df58eb7494", + "typeString": "literal_string \"Error: newOwner cannot be null!\"" + } + ], + "id": 108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "1680:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1680:66:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "1680:66:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 118, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1778:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1778:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 120, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1790:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 117, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1757:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1757:42:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 122, + "nodeType": "EmitStatement", + "src": "1752:47:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 123, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1805:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 125, + "indexExpression": { + "argumentTypes": null, + "id": 124, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1811:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1805:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1823:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1805:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 128, + "nodeType": "ExpressionStatement", + "src": "1805:22:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 129, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1833:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 132, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 130, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1839:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1839:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1833:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1853:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1833:25:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 135, + "nodeType": "ExpressionStatement", + "src": "1833:25:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1871:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 107, + "id": 137, + "nodeType": "Return", + "src": "1864:11:1" + } + ] + }, + "documentation": "@dev Allows the current owner to transfer control of the contract to a newOwner.\n@param newOwner The address to transfer ownership to.\n@return {\"success\" : \"Returns true when successfully transferred ownership\"}", + "id": 139, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 104, + "modifierName": { + "argumentTypes": null, + "id": 103, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1641:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1641:9:1" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 101, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 139, + "src": "1616:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1616:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1615:18:1" + }, + "payable": false, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 139, + "src": "1660:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 105, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1660:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1659:14:1" + }, + "scope": 184, + "src": "1589:291:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 160, + "nodeType": "Block", + "src": "2215:97:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 148, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2221:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 150, + "indexExpression": { + "argumentTypes": null, + "id": 149, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "2227:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2221:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2245:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2221:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2221:28:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 155, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "2275:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 154, + "name": "AllowOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "2260:14:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2260:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "EmitStatement", + "src": "2255:35:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2303:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 147, + "id": 159, + "nodeType": "Return", + "src": "2296:11:1" + } + ] + }, + "documentation": "@dev Allows interface contracts and accounts to access contract methods (e.g. Storage contract)\n@param allowedAddress The address of new owner\n@return {\"success\" : \"Returns true when successfully allowed ownership\"}", + "id": 161, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 144, + "modifierName": { + "argumentTypes": null, + "id": 143, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2182:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2182:9:1" + } + ], + "name": "allowOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 141, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2151:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 140, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2151:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2150:24:1" + }, + "payable": false, + "returnParameters": { + "id": 147, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 146, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2201:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 145, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2201:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2200:14:1" + }, + "scope": 184, + "src": "2127:185:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 182, + "nodeType": "Block", + "src": "2660:99:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 170, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2666:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 172, + "indexExpression": { + "argumentTypes": null, + "id": 171, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "2672:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2666:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2690:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2666:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2666:29:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 177, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "2722:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 176, + "name": "RevokeOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "2706:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2706:31:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 179, + "nodeType": "EmitStatement", + "src": "2701:36:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2750:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 169, + "id": 181, + "nodeType": "Return", + "src": "2743:11:1" + } + ] + }, + "documentation": "@dev Disallows interface contracts and accounts to access contract methods (e.g. Storage contract)\n@param allowedAddress The address to disallow ownership\n@return {\"success\" : \"Returns true when successfully allowed ownership\"}", + "id": 183, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 166, + "modifierName": { + "argumentTypes": null, + "id": 165, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2627:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2627:9:1" + } + ], + "name": "removeOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 163, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "2596:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 162, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2596:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2595:24:1" + }, + "payable": false, + "returnParameters": { + "id": 169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 168, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "2646:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 167, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2646:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2645:14:1" + }, + "scope": 184, + "src": "2571:188:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 185, + "src": "703:2059:1" + } + ], + "src": "0:2763:1" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "exportedSymbols": { + "Ownable": [ + 184 + ] + }, + "id": 185, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 58, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".", + "fullyImplemented": true, + "id": 184, + "linearizedBaseContracts": [ + 184 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 62, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 184, + "src": "725:37:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 61, + "keyType": { + "id": 59, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "733:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "725:24:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 60, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "744:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 68, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 67, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "794:29:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 63, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "794:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "825:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "825:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "793:57:1" + }, + "src": "767:84:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 72, + "name": "AllowOwnership", + "nodeType": "EventDefinition", + "parameters": { + "id": 71, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 70, + "indexed": true, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 72, + "src": "875:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 69, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "875:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "874:32:1" + }, + "src": "854:53:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 76, + "name": "RevokeOwnership", + "nodeType": "EventDefinition", + "parameters": { + "id": 75, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 74, + "indexed": true, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "932:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 73, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "932:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "931:32:1" + }, + "src": "910:54:1" + }, + { + "body": { + "id": 86, + "nodeType": "Block", + "src": "1105:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 79, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1111:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 82, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 80, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1117:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 81, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1117:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1111:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1131:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1111:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 85, + "nodeType": "ExpressionStatement", + "src": "1111:24:1" + } + ] + }, + "documentation": "@dev The Ownable constructor sets the original `owner` of the contract to the sender\naccount.", + "id": 87, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "1095:2:1" + }, + "payable": false, + "returnParameters": { + "id": 78, + "nodeType": "ParameterList", + "parameters": [], + "src": "1105:0:1" + }, + "scope": 184, + "src": "1084:56:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 98, + "nodeType": "Block", + "src": "1241:105:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 90, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1255:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 93, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 91, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1261:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1261:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1255:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7420616c6c6f7765642062792074686520636f6e74726163742e", + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1274:59:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8291170cda70aa6a33f032b286d45ac3395ac65762e92264c69af22ca29fa73f", + "typeString": "literal_string \"Error: Transaction sender is not allowed by the contract.\"" + }, + "value": "Error: Transaction sender is not allowed by the contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8291170cda70aa6a33f032b286d45ac3395ac65762e92264c69af22ca29fa73f", + "typeString": "literal_string \"Error: Transaction sender is not allowed by the contract.\"" + } + ], + "id": 89, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "1247:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1247:87:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 96, + "nodeType": "ExpressionStatement", + "src": "1247:87:1" + }, + { + "id": 97, + "nodeType": "PlaceholderStatement", + "src": "1340:1:1" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 99, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 88, + "nodeType": "ParameterList", + "parameters": [], + "src": "1238:2:1" + }, + "src": "1220:126:1", + "visibility": "internal" + }, + { + "body": { + "id": 138, + "nodeType": "Block", + "src": "1674:206:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 109, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1688:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1708:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1700:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1700:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1688:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c21", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1712:33:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0cf773df2ba40d551ba87e95013f067aa808666d9d26ad6f662416df58eb7494", + "typeString": "literal_string \"Error: newOwner cannot be null!\"" + }, + "value": "Error: newOwner cannot be null!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0cf773df2ba40d551ba87e95013f067aa808666d9d26ad6f662416df58eb7494", + "typeString": "literal_string \"Error: newOwner cannot be null!\"" + } + ], + "id": 108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "1680:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1680:66:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "1680:66:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 118, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1778:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1778:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 120, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1790:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 117, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1757:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1757:42:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 122, + "nodeType": "EmitStatement", + "src": "1752:47:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 123, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1805:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 125, + "indexExpression": { + "argumentTypes": null, + "id": 124, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "1811:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1805:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1823:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1805:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 128, + "nodeType": "ExpressionStatement", + "src": "1805:22:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 129, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1833:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 132, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 130, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1839:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1839:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1833:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1853:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1833:25:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 135, + "nodeType": "ExpressionStatement", + "src": "1833:25:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1871:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 107, + "id": 137, + "nodeType": "Return", + "src": "1864:11:1" + } + ] + }, + "documentation": "@dev Allows the current owner to transfer control of the contract to a newOwner.\n@param newOwner The address to transfer ownership to.\n@return {\"success\" : \"Returns true when successfully transferred ownership\"}", + "id": 139, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 104, + "modifierName": { + "argumentTypes": null, + "id": 103, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1641:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1641:9:1" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 101, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 139, + "src": "1616:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1616:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1615:18:1" + }, + "payable": false, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 139, + "src": "1660:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 105, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1660:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1659:14:1" + }, + "scope": 184, + "src": "1589:291:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 160, + "nodeType": "Block", + "src": "2215:97:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 148, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2221:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 150, + "indexExpression": { + "argumentTypes": null, + "id": 149, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "2227:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2221:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2245:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2221:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2221:28:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 155, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "2275:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 154, + "name": "AllowOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "2260:14:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2260:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "EmitStatement", + "src": "2255:35:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2303:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 147, + "id": 159, + "nodeType": "Return", + "src": "2296:11:1" + } + ] + }, + "documentation": "@dev Allows interface contracts and accounts to access contract methods (e.g. Storage contract)\n@param allowedAddress The address of new owner\n@return {\"success\" : \"Returns true when successfully allowed ownership\"}", + "id": 161, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 144, + "modifierName": { + "argumentTypes": null, + "id": 143, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2182:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2182:9:1" + } + ], + "name": "allowOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 141, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2151:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 140, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2151:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2150:24:1" + }, + "payable": false, + "returnParameters": { + "id": 147, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 146, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2201:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 145, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2201:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2200:14:1" + }, + "scope": 184, + "src": "2127:185:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 182, + "nodeType": "Block", + "src": "2660:99:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 170, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2666:5:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 172, + "indexExpression": { + "argumentTypes": null, + "id": 171, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "2672:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2666:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2690:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2666:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2666:29:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 177, + "name": "allowedAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "2722:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 176, + "name": "RevokeOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "2706:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2706:31:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 179, + "nodeType": "EmitStatement", + "src": "2701:36:1" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2750:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 169, + "id": 181, + "nodeType": "Return", + "src": "2743:11:1" + } + ] + }, + "documentation": "@dev Disallows interface contracts and accounts to access contract methods (e.g. Storage contract)\n@param allowedAddress The address to disallow ownership\n@return {\"success\" : \"Returns true when successfully allowed ownership\"}", + "id": 183, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 166, + "modifierName": { + "argumentTypes": null, + "id": 165, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2627:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2627:9:1" + } + ], + "name": "removeOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 163, + "name": "allowedAddress", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "2596:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 162, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2596:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2595:24:1" + }, + "payable": false, + "returnParameters": { + "id": 169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 168, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "2646:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 167, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2646:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2645:14:1" + }, + "scope": 184, + "src": "2571:188:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 185, + "src": "703:2059:1" + } + ], + "src": "0:2763:1" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-22T22:56:14.018Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/SafeMath.json b/deployed/mainnet-v1.0.1/SafeMath.json new file mode 100644 index 0000000..469e6b9 --- /dev/null +++ b/deployed/mainnet-v1.0.1/SafeMath.json @@ -0,0 +1,2636 @@ +{ + "contractName": "SafeMath", + "abi": [], + "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582050f4e221bb4114d8270b88c8af6307ea6c60ecc6f0aaf838d598316e5204a3930029", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582050f4e221bb4114d8270b88c8af6307ea6c60ecc6f0aaf838d598316e5204a3930029", + "sourceMap": "119:1597:2:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", + "deployedSourceMap": "119:1597:2:-;;;;;;;;", + "source": "pragma solidity 0.4.24;\n\n\n/**\n * @title SafeMath\n * @notice Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @notice Multiplies two numbers, throws on overflow.\n * @param a Multiplier\n * @param b Multiplicand\n * @return {\"result\" : \"Returns product\"}\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256 result) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n require(c / a == b, \"Error: Unsafe multiplication operation!\");\n return c;\n }\n\n /**\n * @notice Integer division of two numbers, truncating the quotient.\n * @param a Dividend\n * @param b Divisor\n * @return {\"result\" : \"Returns quotient\"}\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256 result) {\n // @dev require(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // @dev require(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @notice Subtracts two numbers, throws on underflow.\n * @param a Subtrahend\n * @param b Minuend\n * @return {\"result\" : \"Returns difference\"}\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256 result) {\n // @dev throws on overflow (i.e. if subtrahend is greater than minuend)\n require(b <= a, \"Error: Unsafe subtraction operation!\");\n return a - b;\n }\n\n /**\n * @notice Adds two numbers, throws on overflow.\n * @param a First addend\n * @param b Second addend\n * @return {\"result\" : \"Returns summation\"}\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256 result) {\n uint256 c = a + b;\n require(c >= a, \"Error: Unsafe addition operation!\");\n return c;\n }\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 285 + ] + }, + "id": 286, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 186, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@notice Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 285, + "linearizedBaseContracts": [ + 285 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 219, + "nodeType": "Block", + "src": "375:150:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 195, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "385:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "390:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "385:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 201, + "nodeType": "IfStatement", + "src": "381:35:2", + "trueBody": { + "id": 200, + "nodeType": "Block", + "src": "393:23:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "408:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 194, + "id": 199, + "nodeType": "Return", + "src": "401:8:2" + } + ] + } + }, + { + "assignments": [ + 203 + ], + "declarations": [ + { + "constant": false, + "id": 203, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "421:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 202, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "421:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 207, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 204, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "433:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 205, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "437:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "433:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "421:17:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 209, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "452:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 210, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "456:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "452:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 212, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "461:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "452:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665206d756c7469706c69636174696f6e206f7065726174696f6e21", + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "464:41:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49c093c4aaac6a69427fb8661ed09ebf27cf7be118643b83a9b37c894f827a15", + "typeString": "literal_string \"Error: Unsafe multiplication operation!\"" + }, + "value": "Error: Unsafe multiplication operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_49c093c4aaac6a69427fb8661ed09ebf27cf7be118643b83a9b37c894f827a15", + "typeString": "literal_string \"Error: Unsafe multiplication operation!\"" + } + ], + "id": 208, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "444:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "444:62:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 216, + "nodeType": "ExpressionStatement", + "src": "444:62:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 217, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "519:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 194, + "id": 218, + "nodeType": "Return", + "src": "512:8:2" + } + ] + }, + "documentation": "@notice Multiplies two numbers, throws on overflow.\n@param a Multiplier\n@param b Multiplicand\n@return {\"result\" : \"Returns product\"}", + "id": 220, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 188, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "314:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "314:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 190, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "325:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "325:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "313:22:2" + }, + "payable": false, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 193, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "359:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 192, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "359:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "358:16:2" + }, + "scope": 285, + "src": "301:224:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 237, + "nodeType": "Block", + "src": "771:210:2", + "statements": [ + { + "assignments": [ + 230 + ], + "declarations": [ + { + "constant": false, + "id": 230, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "857:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "857:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 234, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 231, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "869:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 232, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "873:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "869:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "857:17:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 235, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "975:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 228, + "id": 236, + "nodeType": "Return", + "src": "968:8:2" + } + ] + }, + "documentation": "@notice Integer division of two numbers, truncating the quotient.\n@param a Dividend\n@param b Divisor\n@return {\"result\" : \"Returns quotient\"}", + "id": 238, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 222, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "710:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "710:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 224, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "721:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "721:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "709:22:2" + }, + "payable": false, + "returnParameters": { + "id": 228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 227, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "755:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 226, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "755:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "754:16:2" + }, + "scope": 285, + "src": "697:284:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 258, + "nodeType": "Block", + "src": "1217:160:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 248, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1307:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 249, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1312:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1307:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665207375627472616374696f6e206f7065726174696f6e21", + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1315:38:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f18cbb1620e3a8d0fe2c5bbe86168dc13c8076938e9197b95da6e0f94a6aec73", + "typeString": "literal_string \"Error: Unsafe subtraction operation!\"" + }, + "value": "Error: Unsafe subtraction operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f18cbb1620e3a8d0fe2c5bbe86168dc13c8076938e9197b95da6e0f94a6aec73", + "typeString": "literal_string \"Error: Unsafe subtraction operation!\"" + } + ], + "id": 247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "1299:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1299:55:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 253, + "nodeType": "ExpressionStatement", + "src": "1299:55:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 254, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1367:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 255, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1371:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1367:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 246, + "id": 257, + "nodeType": "Return", + "src": "1360:12:2" + } + ] + }, + "documentation": "@notice Subtracts two numbers, throws on underflow.\n@param a Subtrahend\n@param b Minuend\n@return {\"result\" : \"Returns difference\"}", + "id": 259, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 243, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1156:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1156:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1167:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1167:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1155:22:2" + }, + "payable": false, + "returnParameters": { + "id": 246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 245, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1201:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1201:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1200:16:2" + }, + "scope": 285, + "src": "1143:234:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 283, + "nodeType": "Block", + "src": "1614:100:2", + "statements": [ + { + "assignments": [ + 269 + ], + "declarations": [ + { + "constant": false, + "id": 269, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1620:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1620:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 273, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 270, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 261, + "src": "1632:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 271, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 263, + "src": "1636:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1632:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1620:17:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 275, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1651:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 276, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 261, + "src": "1656:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1651:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e21", + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1659:35:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dac03c1cef2f037b40233270a73516c3c6e3467d614e4cdde1fac39b0472de4a", + "typeString": "literal_string \"Error: Unsafe addition operation!\"" + }, + "value": "Error: Unsafe addition operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dac03c1cef2f037b40233270a73516c3c6e3467d614e4cdde1fac39b0472de4a", + "typeString": "literal_string \"Error: Unsafe addition operation!\"" + } + ], + "id": 274, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "1643:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1643:52:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 280, + "nodeType": "ExpressionStatement", + "src": "1643:52:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 281, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1708:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 267, + "id": 282, + "nodeType": "Return", + "src": "1701:8:2" + } + ] + }, + "documentation": "@notice Adds two numbers, throws on overflow.\n@param a First addend\n@param b Second addend\n@return {\"result\" : \"Returns summation\"}", + "id": 284, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 261, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1553:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1553:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 263, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1564:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1564:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1552:22:2" + }, + "payable": false, + "returnParameters": { + "id": 267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1598:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 265, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1598:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1597:16:2" + }, + "scope": 285, + "src": "1540:174:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 286, + "src": "119:1597:2" + } + ], + "src": "0:1717:2" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 285 + ] + }, + "id": 286, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 186, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@notice Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 285, + "linearizedBaseContracts": [ + 285 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 219, + "nodeType": "Block", + "src": "375:150:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 195, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "385:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "390:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "385:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 201, + "nodeType": "IfStatement", + "src": "381:35:2", + "trueBody": { + "id": 200, + "nodeType": "Block", + "src": "393:23:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "408:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 194, + "id": 199, + "nodeType": "Return", + "src": "401:8:2" + } + ] + } + }, + { + "assignments": [ + 203 + ], + "declarations": [ + { + "constant": false, + "id": 203, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "421:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 202, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "421:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 207, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 204, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "433:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 205, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "437:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "433:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "421:17:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 209, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "452:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 210, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 188, + "src": "456:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "452:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 212, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "461:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "452:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665206d756c7469706c69636174696f6e206f7065726174696f6e21", + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "464:41:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49c093c4aaac6a69427fb8661ed09ebf27cf7be118643b83a9b37c894f827a15", + "typeString": "literal_string \"Error: Unsafe multiplication operation!\"" + }, + "value": "Error: Unsafe multiplication operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_49c093c4aaac6a69427fb8661ed09ebf27cf7be118643b83a9b37c894f827a15", + "typeString": "literal_string \"Error: Unsafe multiplication operation!\"" + } + ], + "id": 208, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "444:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "444:62:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 216, + "nodeType": "ExpressionStatement", + "src": "444:62:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 217, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "519:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 194, + "id": 218, + "nodeType": "Return", + "src": "512:8:2" + } + ] + }, + "documentation": "@notice Multiplies two numbers, throws on overflow.\n@param a Multiplier\n@param b Multiplicand\n@return {\"result\" : \"Returns product\"}", + "id": 220, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 188, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "314:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "314:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 190, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "325:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "325:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "313:22:2" + }, + "payable": false, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 193, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "359:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 192, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "359:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "358:16:2" + }, + "scope": 285, + "src": "301:224:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 237, + "nodeType": "Block", + "src": "771:210:2", + "statements": [ + { + "assignments": [ + 230 + ], + "declarations": [ + { + "constant": false, + "id": 230, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "857:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "857:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 234, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 231, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "869:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 232, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "873:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "869:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "857:17:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 235, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "975:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 228, + "id": 236, + "nodeType": "Return", + "src": "968:8:2" + } + ] + }, + "documentation": "@notice Integer division of two numbers, truncating the quotient.\n@param a Dividend\n@param b Divisor\n@return {\"result\" : \"Returns quotient\"}", + "id": 238, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 222, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "710:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "710:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 224, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "721:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "721:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "709:22:2" + }, + "payable": false, + "returnParameters": { + "id": 228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 227, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "755:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 226, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "755:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "754:16:2" + }, + "scope": 285, + "src": "697:284:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 258, + "nodeType": "Block", + "src": "1217:160:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 248, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1307:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 249, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1312:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1307:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665207375627472616374696f6e206f7065726174696f6e21", + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1315:38:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f18cbb1620e3a8d0fe2c5bbe86168dc13c8076938e9197b95da6e0f94a6aec73", + "typeString": "literal_string \"Error: Unsafe subtraction operation!\"" + }, + "value": "Error: Unsafe subtraction operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f18cbb1620e3a8d0fe2c5bbe86168dc13c8076938e9197b95da6e0f94a6aec73", + "typeString": "literal_string \"Error: Unsafe subtraction operation!\"" + } + ], + "id": 247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "1299:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1299:55:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 253, + "nodeType": "ExpressionStatement", + "src": "1299:55:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 254, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1367:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 255, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1371:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1367:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 246, + "id": 257, + "nodeType": "Return", + "src": "1360:12:2" + } + ] + }, + "documentation": "@notice Subtracts two numbers, throws on underflow.\n@param a Subtrahend\n@param b Minuend\n@return {\"result\" : \"Returns difference\"}", + "id": 259, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 243, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1156:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1156:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1167:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1167:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1155:22:2" + }, + "payable": false, + "returnParameters": { + "id": 246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 245, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 259, + "src": "1201:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1201:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1200:16:2" + }, + "scope": 285, + "src": "1143:234:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 283, + "nodeType": "Block", + "src": "1614:100:2", + "statements": [ + { + "assignments": [ + 269 + ], + "declarations": [ + { + "constant": false, + "id": 269, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1620:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1620:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 273, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 270, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 261, + "src": "1632:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 271, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 263, + "src": "1636:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1632:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1620:17:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 275, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1651:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 276, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 261, + "src": "1656:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1651:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e21", + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1659:35:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dac03c1cef2f037b40233270a73516c3c6e3467d614e4cdde1fac39b0472de4a", + "typeString": "literal_string \"Error: Unsafe addition operation!\"" + }, + "value": "Error: Unsafe addition operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dac03c1cef2f037b40233270a73516c3c6e3467d614e4cdde1fac39b0472de4a", + "typeString": "literal_string \"Error: Unsafe addition operation!\"" + } + ], + "id": 274, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "1643:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1643:52:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 280, + "nodeType": "ExpressionStatement", + "src": "1643:52:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 281, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1708:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 267, + "id": 282, + "nodeType": "Return", + "src": "1701:8:2" + } + ] + }, + "documentation": "@notice Adds two numbers, throws on overflow.\n@param a First addend\n@param b Second addend\n@return {\"result\" : \"Returns summation\"}", + "id": 284, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 261, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1553:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1553:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 263, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1564:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1564:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1552:22:2" + }, + "payable": false, + "returnParameters": { + "id": 267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 284, + "src": "1598:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 265, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1598:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1597:16:2" + }, + "scope": 285, + "src": "1540:174:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 286, + "src": "119:1597:2" + } + ], + "src": "0:1717:2" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0xecedbacdfa1513a2deaa82f96d9fac7fd1ec5675", + "transactionHash": "0x9c73a5b500bbf3eaef8fd16e5cfc2f6ba62346234a503dc85c361db58fb49be5" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0x345ca3e014aaf5dca488057592ee47305d9b3e10", + "transactionHash": "0x319e27f7f8ce73369eabccceacea43b503b39c28e88c3cd960c76579e4f21c3d" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:02:25.488Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOAuthority.json b/deployed/mainnet-v1.0.1/TokenIOAuthority.json new file mode 100644 index 0000000..6135eae --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIOAuthority.json @@ -0,0 +1,5072 @@ +{ + "contractName": "TokenIOAuthority", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "firmName", + "type": "string" + }, + { + "name": "_authorized", + "type": "bool" + } + ], + "name": "setRegisteredFirm", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "firmName", + "type": "string" + }, + { + "name": "authority", + "type": "address" + }, + { + "name": "_authorized", + "type": "bool" + } + ], + "name": "setRegisteredAuthority", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "authority", + "type": "address" + } + ], + "name": "getFirmFromAuthority", + "outputs": [ + { + "name": "firm", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "firmName", + "type": "string" + } + ], + "name": "isRegisteredFirm", + "outputs": [ + { + "name": "status", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "firmName", + "type": "string" + }, + { + "name": "authority", + "type": "address" + } + ], + "name": "isRegisteredToFirm", + "outputs": [ + { + "name": "registered", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "authority", + "type": "address" + } + ], + "name": "isRegisteredAuthority", + "outputs": [ + { + "name": "registered", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "feeContract", + "type": "address" + } + ], + "name": "setMasterFeeContract", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051602080611d64833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a039094169390931783558154169091179055611cee90819061007690396000f3006080604052600436106100ae5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663339282b781146100b3578063339e2c45146100e857806341ade6b71461014c5780634bbc142c146101a9578063666a3427146101ca578063666e1b39146101eb578063acca2c241461020c578063ee5493b6146102a2578063f03529c3146102fb578063f2fde38b1461031c578063f3f969a01461033d575b600080fd5b3480156100bf57600080fd5b506100d4600160a060020a03600435166103a6565b604080519115158252519081900360200190f35b3480156100f457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d494369492936024939284019190819084018382808284375094975050509235600160a060020a031693506103bf92505050565b34801561015857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d49436949293602493928401919081908401838280828437509497505050509135151592506103da915050565b3480156101b557600080fd5b506100d4600160a060020a036004351661056c565b3480156101d657600080fd5b506100d4600160a060020a0360043516610628565b3480156101f757600080fd5b506100d4600160a060020a03600435166106e1565b34801561021857600080fd5b5061022d600160a060020a03600435166106f6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026757818101518382015260200161024f565b50505050905090810190601f1680156102945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ae57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d49436949293602493928401919081908401838280828437509497506107099650505050505050565b34801561030757600080fd5b506100d4600160a060020a036004351661071c565b34801561032857600080fd5b506100d4600160a060020a0360043516610842565b34801561034957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d494369492936024939284019190819084018382808284375094975050600160a060020a0385351695505050505060200135151561097c565b60006103b960018363ffffffff610aac16565b92915050565b60006103d36001848463ffffffff610c7216565b9392505050565b336000818152602081905260408120549091849160ff168061040957506104096001838363ffffffff610c7216565b15156104ab576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e60448201527f6f742068617665207065726d697373696f6e20666f722074686973206f70657260648201527f6174696f6e210000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b6104bd6001868663ffffffff610e2716565b151561055f576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a204661696c656420746f207265676973746572206669726d207760448201527f6974682073746f7261676520636f6e74726163742120506c656173652063686560648201527f636b20796f757220617267756d656e74732e0000000000000000000000000000608482015290519081900360a40190fd5b600192505b505092915050565b3360009081526020819052604081205460ff1615156105d7576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610693576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60606103b960018363ffffffff61106a16565b60006103b960018363ffffffff61122f16565b3360009081526020819052604081205460ff161515610787576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b61079860018363ffffffff6112ef16565b151561083a576040805160e560020a62461bcd02815260206004820152606060248201527f4572726f723a20556e61626c6520746f20736574206d6173746572206665652060448201527f636f6e74726163742e20506c6561736520656e737572652066656520636f6e7460648201527f72616374206861732074686520636f727265637420706172616d65746572732e608482015290519081900360a40190fd5b506001919050565b3360009081526020819052604081205460ff1615156108ad576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216151561090d576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b336000818152602081905260408120549091859160ff16806109ab57506109ab6001838363ffffffff610c7216565b1515610a4d576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e60448201527f6f742068617665207065726d697373696f6e20666f722074686973206f70657260648201527f6174696f6e210000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b610a60600187878763ffffffff6114e316565b1515610aa05760405160e560020a62461bcd0281526004018080602001828103825260b2815260200180611bb160b2913960c00191505060405180910390fd5b50600195945050505050565b600080610ac284610abd8686611a39565b61106a565b610acc8585611a39565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310610b265780518252601f199092019160209182019101610b07565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610bb15780518252601f199092019160209182019101610b92565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015610c3e57600080fd5b505af1158015610c52573d6000803e3d6000fd5b505050506040513d6020811015610c6857600080fd5b5051949350505050565b60008083610c808685611a39565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310610cda5780518252601f199092019160209182019101610cbb565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610d655780518252601f199092019160209182019101610d46565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050506040513d6020811015610e1c57600080fd5b505195945050505050565b6000808360405160200180807f726567697374657265642e6669726d0000000000000000000000000000000000815250600f0182805190602001908083835b60208310610e855780518252601f199092019160209182019101610e66565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310610ee85780518252601f199092019160209182019101610ec9565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528a151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015610f7d57600080fd5b505af1158015610f91573d6000803e3d6000fd5b505050506040513d6020811015610fa757600080fd5b5051151561105f576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b606060006110788484611a39565b60405160200180807f726567697374657265642e617574686f726974792e6669726d0000000000000081525060190182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061110f5780518252601f1990920191602091820191016110f0565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547f986e791a000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063986e791a9350602480820193600093509182900301818387803b15801561119f57600080fd5b505af11580156111b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156111dc57600080fd5b8101908080516401000000008111156111f457600080fd5b8201602081018481111561120757600080fd5b815164010000000081118282018710171561122157600080fd5b509098975050505050505050565b6000808260405160200180807f726567697374657265642e6669726d0000000000000000000000000000000000815250600f0182805190602001908083835b6020831061128d5780518252601f19909201916020918201910161126e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405180828051906020019080838360208310610bb15780518252601f199092019160209182019101610b92565b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b602083106113615780518252601f199092019160209182019101611342565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b1580156113f757600080fd5b505af115801561140b573d6000803e3d6000fd5b505050506040513d602081101561142157600080fd5b505115156114d9576040805160e560020a62461bcd0281526020600482015260686024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019392505050565b60008060006114f2878761122f565b151561156e576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20606973737565724669726d60206d757374206265207265676960448201527f7374657265642e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b858560405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b602083106115ca5780518252601f1990920191602091820191016115ab565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106116555780518252601f199092019160209182019101611636565b51815160209384036101000a6000190180199092169116179052604080519290940182900382207f726567697374657265642e617574686f726974792e6669726d0000000000000083830152600160a060020a038c166c010000000000000000000000000260398401528451808403602d018152604d9093019485905282519098509195509293508392850191508083835b602083106117065780518252601f1990920191602091820191016116e7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208d547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018a90528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b505050506040513d60208110156117c557600080fd5b5051151561187d576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8654604080517f6e8995500000000000000000000000000000000000000000000000000000000081526004810184815260248201928352895160448301528951600160a060020a0390941693636e8995509386938c9392606490910190602085019080838360005b838110156118fd5781810151838201526020016118e5565b50505050905090810190601f16801561192a5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561194a57600080fd5b505af115801561195e573d6000803e3d6000fd5b505050506040513d602081101561197457600080fd5b50511515611a2c576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019695505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ad65780518252601f199092019160209182019101611ab7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015611b6357600080fd5b505af1158015611b77573d6000803e3d6000fd5b505050506040513d6020811015611b8d57600080fd5b50519050600160a060020a03811615611ba857809250610564565b83925061056456004572726f723a204661696c656420746f20726567697374657220617574686f7269747920666f7220697373756572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e747320616e6420656e73757265206669726d4e616d652069732072656769737465726564206265666f726520616c6c6f77696e6720616e20617574686f72697479206f662073616964206669726d20616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742073746f726167652076616c4572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820fa3d401565ba9aee21d4ad2cc160a5a4817ea05319b14711e05302e69d24bf2b0029", + "deployedBytecode": "0x6080604052600436106100ae5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663339282b781146100b3578063339e2c45146100e857806341ade6b71461014c5780634bbc142c146101a9578063666a3427146101ca578063666e1b39146101eb578063acca2c241461020c578063ee5493b6146102a2578063f03529c3146102fb578063f2fde38b1461031c578063f3f969a01461033d575b600080fd5b3480156100bf57600080fd5b506100d4600160a060020a03600435166103a6565b604080519115158252519081900360200190f35b3480156100f457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d494369492936024939284019190819084018382808284375094975050509235600160a060020a031693506103bf92505050565b34801561015857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d49436949293602493928401919081908401838280828437509497505050509135151592506103da915050565b3480156101b557600080fd5b506100d4600160a060020a036004351661056c565b3480156101d657600080fd5b506100d4600160a060020a0360043516610628565b3480156101f757600080fd5b506100d4600160a060020a03600435166106e1565b34801561021857600080fd5b5061022d600160a060020a03600435166106f6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026757818101518382015260200161024f565b50505050905090810190601f1680156102945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ae57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d49436949293602493928401919081908401838280828437509497506107099650505050505050565b34801561030757600080fd5b506100d4600160a060020a036004351661071c565b34801561032857600080fd5b506100d4600160a060020a0360043516610842565b34801561034957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d494369492936024939284019190819084018382808284375094975050600160a060020a0385351695505050505060200135151561097c565b60006103b960018363ffffffff610aac16565b92915050565b60006103d36001848463ffffffff610c7216565b9392505050565b336000818152602081905260408120549091849160ff168061040957506104096001838363ffffffff610c7216565b15156104ab576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e60448201527f6f742068617665207065726d697373696f6e20666f722074686973206f70657260648201527f6174696f6e210000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b6104bd6001868663ffffffff610e2716565b151561055f576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a204661696c656420746f207265676973746572206669726d207760448201527f6974682073746f7261676520636f6e74726163742120506c656173652063686560648201527f636b20796f757220617267756d656e74732e0000000000000000000000000000608482015290519081900360a40190fd5b600192505b505092915050565b3360009081526020819052604081205460ff1615156105d7576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610693576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60606103b960018363ffffffff61106a16565b60006103b960018363ffffffff61122f16565b3360009081526020819052604081205460ff161515610787576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b61079860018363ffffffff6112ef16565b151561083a576040805160e560020a62461bcd02815260206004820152606060248201527f4572726f723a20556e61626c6520746f20736574206d6173746572206665652060448201527f636f6e74726163742e20506c6561736520656e737572652066656520636f6e7460648201527f72616374206861732074686520636f727265637420706172616d65746572732e608482015290519081900360a40190fd5b506001919050565b3360009081526020819052604081205460ff1615156108ad576040805160e560020a62461bcd0281526020600482015260396024820152600080516020611ca38339815191526044820152600080516020611c63833981519152606482015290519081900360840190fd5b600160a060020a038216151561090d576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b336000818152602081905260408120549091859160ff16806109ab57506109ab6001838363ffffffff610c7216565b1515610a4d576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e60448201527f6f742068617665207065726d697373696f6e20666f722074686973206f70657260648201527f6174696f6e210000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b610a60600187878763ffffffff6114e316565b1515610aa05760405160e560020a62461bcd0281526004018080602001828103825260b2815260200180611bb160b2913960c00191505060405180910390fd5b50600195945050505050565b600080610ac284610abd8686611a39565b61106a565b610acc8585611a39565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310610b265780518252601f199092019160209182019101610b07565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610bb15780518252601f199092019160209182019101610b92565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015610c3e57600080fd5b505af1158015610c52573d6000803e3d6000fd5b505050506040513d6020811015610c6857600080fd5b5051949350505050565b60008083610c808685611a39565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b60208310610cda5780518252601f199092019160209182019101610cbb565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610d655780518252601f199092019160209182019101610d46565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050506040513d6020811015610e1c57600080fd5b505195945050505050565b6000808360405160200180807f726567697374657265642e6669726d0000000000000000000000000000000000815250600f0182805190602001908083835b60208310610e855780518252601f199092019160209182019101610e66565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310610ee85780518252601f199092019160209182019101610ec9565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528a151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015610f7d57600080fd5b505af1158015610f91573d6000803e3d6000fd5b505050506040513d6020811015610fa757600080fd5b5051151561105f576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b606060006110788484611a39565b60405160200180807f726567697374657265642e617574686f726974792e6669726d0000000000000081525060190182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061110f5780518252601f1990920191602091820191016110f0565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547f986e791a000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063986e791a9350602480820193600093509182900301818387803b15801561119f57600080fd5b505af11580156111b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156111dc57600080fd5b8101908080516401000000008111156111f457600080fd5b8201602081018481111561120757600080fd5b815164010000000081118282018710171561122157600080fd5b509098975050505050505050565b6000808260405160200180807f726567697374657265642e6669726d0000000000000000000000000000000000815250600f0182805190602001908083835b6020831061128d5780518252601f19909201916020918201910161126e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405180828051906020019080838360208310610bb15780518252601f199092019160209182019101610b92565b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b602083106113615780518252601f199092019160209182019101611342565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b1580156113f757600080fd5b505af115801561140b573d6000803e3d6000fd5b505050506040513d602081101561142157600080fd5b505115156114d9576040805160e560020a62461bcd0281526020600482015260686024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019392505050565b60008060006114f2878761122f565b151561156e576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20606973737565724669726d60206d757374206265207265676960448201527f7374657265642e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b858560405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b602083106115ca5780518252601f1990920191602091820191016115ab565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106116555780518252601f199092019160209182019101611636565b51815160209384036101000a6000190180199092169116179052604080519290940182900382207f726567697374657265642e617574686f726974792e6669726d0000000000000083830152600160a060020a038c166c010000000000000000000000000260398401528451808403602d018152604d9093019485905282519098509195509293508392850191508083835b602083106117065780518252601f1990920191602091820191016116e7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208d547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018a90528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b505050506040513d60208110156117c557600080fd5b5051151561187d576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8654604080517f6e8995500000000000000000000000000000000000000000000000000000000081526004810184815260248201928352895160448301528951600160a060020a0390941693636e8995509386938c9392606490910190602085019080838360005b838110156118fd5781810151838201526020016118e5565b50505050905090810190601f16801561192a5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561194a57600080fd5b505af115801561195e573d6000803e3d6000fd5b505050506040513d602081101561197457600080fd5b50511515611a2c576040805160e560020a62461bcd0281526020600482015260696024820152600080516020611c8383398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019695505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ad65780518252601f199092019160209182019101611ab7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015611b6357600080fd5b505af1158015611b77573d6000803e3d6000fd5b505050506040513d6020811015611b8d57600080fd5b50519050600160a060020a03811615611ba857809250610564565b83925061056456004572726f723a204661696c656420746f20726567697374657220617574686f7269747920666f7220697373756572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e747320616e6420656e73757265206669726d4e616d652069732072656769737465726564206265666f726520616c6c6f77696e6720616e20617574686f72697479206f662073616964206669726d20616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742073746f726167652076616c4572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820fa3d401565ba9aee21d4ad2cc160a5a4817ea05319b14711e05302e69d24bf2b0029", + "sourceMap": "871:4829:3:-;;;1214:515;8:9:-1;5:2;;;30:1;27;20:12;5:2;1214:515:3;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1214:515:3;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1592:46:3;;-1:-1:-1;;;;;;1592:46:3;-1:-1:-1;;;;;1592:46:3;;;;;;;;;1698:24;;;;;;;;871:4829;;;;;;;;", + "deployedSourceMap": "871:4829:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4581:198;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4581:198:3;-1:-1:-1;;;;;4581:198:3;;;;;;;;;;;;;;;;;;;;;;;4150:217;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4150:217:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4150:217:3;;-1:-1:-1;;;4150:217:3;;-1:-1:-1;;;;;4150:217:3;;-1:-1:-1;4150:217:3;;-1:-1:-1;;;4150:217:3;1969:384;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1969:384:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1969:384:3;;-1:-1:-1;;;;1969:384:3;;;;;-1:-1:-1;1969:384:3;;-1:-1:-1;;1969:384:3;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;2571:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;3384:142:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3384:142:3;-1:-1:-1;;;;;3384:142:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3384:142:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3698:184;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3698:184:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3698:184:3;;-1:-1:-1;3698:184:3;;-1:-1:-1;;;;;;;3698:184:3;4998:351;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4998:351:3;-1:-1:-1;;;;;4998:351:3;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2677:529:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2677:529:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2677:529:3;;-1:-1:-1;;;;;;;2677:529:3;;;;-1:-1:-1;;;;;2677:529:3;;;;;;;4581:198;4652:15;4736:36;:3;4762:9;4736:36;:25;:36;:::i;:::-;4729:43;4581:198;-1:-1:-1;;4581:198:3:o;4150:217::-;4235:15;4317:43;:3;4340:8;4350:9;4317:43;:22;:43;:::i;:::-;4310:50;4150:217;-1:-1:-1;;;4150:217:3:o;1969:384::-;2062:10;2083:12;5522:16;;;;;;;;;;;2083:12;;2052:8;;5522:16;;;:63;;-1:-1:-1;5542:43:3;:3;5565:8;5575:9;5542:43;:22;:43;:::i;:::-;5514:165;;;;;;;-1:-1:-1;;;;;5514:165:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2175:44;:3;2197:8;2207:11;2175:44;:21;:44;:::i;:::-;2156:169;;;;;;;-1:-1:-1;;;;;2156:169:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2342:4;2335:11;;5689:1;1969:384;;;;;;:::o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;2571:188::-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;3384:142:3:-;3454:11;3484:35;:3;3509:9;3484:35;:24;:35;:::i;3698:184::-;3762:11;3845:30;:3;3866:8;3845:30;:20;:30;:::i;4998:351::-;1261:10:1;5075:12:3;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;5162:37:3;:3;5187:11;5162:37;:24;:37;:::i;:::-;5143:176;;;;;;;-1:-1:-1;;;;;5143:176:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5336:4:3;4998:351;;;:::o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;2677:529:3:-;2794:10;2815:12;5522:16;;;;;;;;;;;2815:12;;2784:8;;5522:16;;;:63;;-1:-1:-1;5542:43:3;:3;5565:8;5575:9;5542:43;:22;:43;:::i;:::-;5514:165;;;;;;;-1:-1:-1;;;;;5514:165:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2916:60;:3;2943:8;2953:9;2964:11;2916:60;:26;:60;:::i;:::-;2897:281;;;;;;-1:-1:-1;;;;;2897:281:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3195:4:3;;2677:529;-1:-1:-1;;;;;2677:529:3:o;50230:346:8:-;50329:15;50352:10;50416:71;50437:4;50443:43;50463:4;50469:16;50443:19;:43::i;:::-;50416:20;:71::i;:::-;50489:43;50509:4;50515:16;50489:19;:43::i;:::-;50375:158;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;50375:158:8;;;;;;;-1:-1:-1;;;;;50375:158:8;-1:-1:-1;;;;;50375:158:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;50375:158:8;;;50365:169;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;50365:169:8;;;;;;;;;;;;50547:12;;:24;;;;;;;;;;;50365:169;;-1:-1:-1;;;;;;50547:12:8;;;;-1:-1:-1;50547:20:8;;-1:-1:-1;50547:24:8;;;;;263:2:-1;;-1:-1;50547:24:8;;;;;;;-1:-1:-1;50547:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;50547:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;50547:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;50547:24:8;;50230:346;-1:-1:-1;;;;50230:346:8:o;49569:301::-;49684:15;49707:10;49771;49783:43;49803:4;49809:16;49783:19;:43::i;:::-;49730:97;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;49730:97:8;;;;;;;-1:-1:-1;;;;;49730:97:8;-1:-1:-1;;;;;49730:97:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;49730:97:8;;;49720:108;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;49720:108:8;;;;;;;;;;;;49841:12;;:24;;;;;;;;;;;49720:108;;-1:-1:-1;;;;;;49841:12:8;;;;-1:-1:-1;49841:20:8;;-1:-1:-1;49841:24:8;;;;;263:2:-1;;-1:-1;49841:24:8;;;;;;;-1:-1:-1;49841:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;49841:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;49841:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;49841:24:8;;49569:301;-1:-1:-1;;;;;49569:301:8:o;46101:387::-;46199:12;46219:10;46278;46242:47;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;46242:47:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;46242:47:8;;;46232:58;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;46232:58:8;;;;;;;;;;;;46311:12;;:34;;;;;;;;;;;;;;;;;;46232:58;;-1:-1:-1;;;;;;46311:12:8;;;;-1:-1:-1;46311:20:8;;-1:-1:-1;46311:34:8;;;;;263:2:-1;;-1:-1;46311:34:8;;;;;;;-1:-1:-1;46311:12:8;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;46311:34:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;46311:34:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;46311:34:8;46296:170;;;;;;;-1:-1:-1;;;;;46296:170:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;46296:170:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;46479:4:8;;46101:387;-1:-1:-1;;;;46101:387:8:o;48371:281::-;48469:17;48494:10;48563:43;48583:4;48589:16;48563:19;:43::i;:::-;48517:90;;;;;;;;;;;;;-1:-1:-1;;;;;48517:90:8;-1:-1:-1;;;;;48517:90:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;48517:90:8;;;48507:101;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;48507:101:8;;;;;;;;;;;;48621:12;;:26;;;;;;;;;;;48507:101;;-1:-1:-1;;;;;;48621:12:8;;;;-1:-1:-1;48621:22:8;;-1:-1:-1;48621:26:8;;;;;-1:-1:-1;;;48621:26:8;;;;;;-1:-1:-1;48621:12:8;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;48621:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;48621:26:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;48621:26:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;48621:26:8;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;-1:-1;48621:26:8;;48371:281;-1:-1:-1;;;;;;;;48371:281:8:o;48946:223::-;49033:15;49056:10;49115;49079:47;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;49079:47:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;49079:47:8;;;49069:58;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;25248:382:8;25340:12;25360:10;25383:39;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;25383:39:8;;;25373:50;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;25373:50:8;;;;;;;;;;;;25444:12;;:44;;;;;;;;;-1:-1:-1;;;;;25444:44:8;;;;;;;;;25373:50;;-1:-1:-1;25444:12:8;;;;;-1:-1:-1;25444:23:8;;-1:-1:-1;25444:44:8;;;;;263:2:-1;;-1:-1;25444:44:8;;;;;;;-1:-1:-1;25444:12:8;:44;;;5:2:-1;;;;30:1;27;20:12;5:2;25444:44:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25444:44:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25444:44:8;25429:179;;;;;;;-1:-1:-1;;;;;25429:179:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25429:179:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25621:4:8;;25248:382;-1:-1:-1;;;25248:382:8:o;47178:822::-;47307:12;47433;47535;47342:34;47359:4;47365:10;47342:16;:34::i;:::-;47327:99;;;;;;;-1:-1:-1;;;;;47327:99:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47499:10;47511:16;47458:70;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;47458:70:8;;;;;;;-1:-1:-1;;;;;47458:70:8;-1:-1:-1;;;;;47458:70:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;47458:70:8;;;47448:81;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;47448:81:8;;;;;;;;;;;;47560:63;;;;;-1:-1:-1;;;;;47560:63:8;;;;;;;;;;26:21:-1;;;22:32;;6:49;;47560:63:8;;;;;;;;47550:74;;47448:81;;-1:-1:-1;47560:63:8;;-1:-1:-1;47560:63:8;;-1:-1:-1;47560:63:8;;47550:74;;;-1:-1:-1;47550:74:8;47560:63;47550:74;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;47550:74:8;;;;;;;;;;;;47646:12;;:36;;;;;;;;;;;;;;;;;;47550:74;;-1:-1:-1;;;;;;47646:12:8;;;;-1:-1:-1;47646:20:8;;-1:-1:-1;47646:36:8;;;;;263:2:-1;;-1:-1;47646:36:8;;;;;;;-1:-1:-1;47646:12:8;:36;;;5:2:-1;;;;30:1;27;20:12;5:2;47646:36:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;47646:36:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;47646:36:8;47631:167;;;;;;;-1:-1:-1;;;;;47631:167:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;47631:167:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47820:12;;:40;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;47820:12:8;;;;:22;;47843:4;;47849:10;;47820:40;;;;;;;;;;;;;:12;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;47820:40:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;47820:40:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;47820:40:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;47820:40:8;47805:171;;;;;;;-1:-1:-1;;;;;47805:171:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;47805:171:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;47991:4:8;;47178:822;-1:-1:-1;;;;;;47178:822:8:o;16400:357::-;16488:25;16521:10;16594:23;16579:7;16544:43;;;;;;;;;;;;;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;;;16544:43:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16544:43:8;;;16534:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16534:54:8;;;;;;;;;;;;16620:12;;:27;;;;;;;;;;;16534:54;;-1:-1:-1;;;;;;16620:12:8;;;;-1:-1:-1;16620:23:8;;-1:-1:-1;16620:27:8;;;;;263:2:-1;;-1:-1;16620:27:8;;;;;;;-1:-1:-1;16620:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16620:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16620:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16620:27:8;;-1:-1:-1;;;;;;16657:22:8;;;16653:100;;16696:15;16689:22;;;;16653:100;16739:7;16732:14;;;", + "source": "pragma solidity 0.4.24;\n\n/*\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n\n/**\n@title TokenIOAuthority - Authority Smart Contract for Token, Inc.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n*/\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\ncontract TokenIOAuthority is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n * @notice Constructor method for Authority contract\n * @param _storageContract Ethereum Address of TokenIOStorage contract\n */\n constructor(address _storageContract) public {\n /*\n * @notice Set the storage contract for the interface\n * @dev This contract will be unable to use the storage constract until\n * @dev contract address is authorized with the storage contract\n * @dev Once authorized, you can setRegisteredFirm and setRegisteredAuthority\n */\n lib.Storage = TokenIOStorage(_storageContract);\n\n /// @dev set owner to contract initiator\n owner[msg.sender] = true;\n }\n\n /**\n * @notice Registers a firm as authorized true/false\n * @param firmName Name of firm\n * @param _authorized Authorization status\n * @return {\"success\" : \"Returns true if lib.setRegisteredFirm succeeds\"}\n */\n function setRegisteredFirm(string firmName, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) {\n /// @notice set firm registration status\n require(\n lib.setRegisteredFirm(firmName, _authorized),\n \"Error: Failed to register firm with storage contract! Please check your arguments.\"\n );\n return true;\n }\n\n /**\n * @notice Registers an authority asoociated with the given firm as true/false\n * @param firmName Name of firm\n * @param authority Address of authority account\n * @param _authorized Authorization status\n * @return {\"success\" : \"Returns true if lib.setRegisteredAuthority succeeds\"}\n */\n function setRegisteredAuthority(string firmName, address authority, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) {\n /// @notice set authority of firm to given status\n require(\n lib.setRegisteredAuthority(firmName, authority, _authorized),\n \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"\n );\n return true;\n }\n\n /**\n * @notice Gets firm asoociated with an authority address\n * @param authority Address of authority account\n * @return {\"firm\" : \"name of firm\"}\n */\n function getFirmFromAuthority(address authority) public view returns (string firm) {\n return lib.getFirmFromAuthority(authority);\n }\n\n /**\n * @notice Gets status of firm registration\n * @param firmName Name of firm\n * @return {\"status\" : \"Returns status of firm registration\"}\n */\n function isRegisteredFirm(string firmName) public view returns (bool status) {\n /// @notice check firm's registration status\n return lib.isRegisteredFirm(firmName);\n }\n\n /**\n * @notice Checks if an authority account is registered to a given firm\n * @param firmName Name of firm\n * @param authority Address of authority account\n * @return {\"registered\" : \"Returns status of account registration to firm\"}\n */\n function isRegisteredToFirm(string firmName, address authority) public view returns (bool registered) {\n /// @notice check if registered to firm\n return lib.isRegisteredToFirm(firmName, authority);\n }\n\n /**\n * @notice Gets status of authority registration\n * @param authority Address of authority account\n * @return { \"registered\" : \"Returns true if account is a registered authority\" }\n */\n function isRegisteredAuthority(address authority) public view returns (bool registered) {\n /// @notice check if registered authority\n return lib.isRegisteredAuthority(authority);\n }\n\n /**\n * @notice Sets contract which specifies fee parameters\n * @param feeContract Address of the fee contract\n * @return { \"success\" : \"Returns true if lib.setMasterFeeContract succeeds\" }\n */\n function setMasterFeeContract(address feeContract) public onlyOwner returns (bool success) {\n /// @notice set master fee contract\n require(\n lib.setMasterFeeContract(feeContract),\n \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"\n );\n return true;\n }\n\n\n modifier onlyAuthority(string firmName, address authority) {\n /// @notice throws if not an owner authority or not registered to the given firm\n require(owner[authority] || lib.isRegisteredToFirm(firmName, authority),\n \"Error: Transaction sender does not have permission for this operation!\"\n );\n _;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOAuthority.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOAuthority.sol", + "exportedSymbols": { + "TokenIOAuthority": [ + 470 + ] + }, + "id": 471, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 287, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 288, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 185, + "src": "788:23:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 289, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 5226, + "src": "812:30:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 290, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 4607, + "src": "843:26:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "900:7:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "900:7:3" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 470, + "linearizedBaseContracts": [ + 470, + 184 + ], + "name": "TokenIOAuthority", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 295, + "libraryName": { + "contractScope": null, + "id": 293, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1004:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "998:37:3", + "typeName": { + "contractScope": null, + "id": 294, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1019:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 297, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 470, + "src": "1040:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 296, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1040:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 317, + "nodeType": "Block", + "src": "1259:470:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 302, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "1592:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1592:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 306, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 299, + "src": "1621:16:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 305, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1606:14:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1606:32:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1592:46:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1592:46:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 310, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1698:5:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 313, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 311, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1704:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1704:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1698:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1698:24:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 316, + "nodeType": "ExpressionStatement", + "src": "1698:24:3" + } + ] + }, + "documentation": "@notice Constructor method for Authority contract\n@param _storageContract Ethereum Address of TokenIOStorage contract", + "id": 318, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 318, + "src": "1226:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1226:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1225:26:3" + }, + "payable": false, + "returnParameters": { + "id": 301, + "nodeType": "ParameterList", + "parameters": [], + "src": "1259:0:3" + }, + "scope": 470, + "src": "1214:515:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 343, + "nodeType": "Block", + "src": "2097:256:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 335, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "2197:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 336, + "name": "_authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 322, + "src": "2207:11:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 333, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2175:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setRegisteredFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3764, + "src": "2175:21:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_bool_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,bool) returns (bool)" + } + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2175:44:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f207265676973746572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e74732e", + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2231:84:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7c061aadab049d8f25969f3d079d42a1e8f36ec72210e2d32fa2967857012c0f", + "typeString": "literal_string \"Error: Failed to register firm with storage contract! Please check your arguments.\"" + }, + "value": "Error: Failed to register firm with storage contract! Please check your arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7c061aadab049d8f25969f3d079d42a1e8f36ec72210e2d32fa2967857012c0f", + "typeString": "literal_string \"Error: Failed to register firm with storage contract! Please check your arguments.\"" + } + ], + "id": 332, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2156:169:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 340, + "nodeType": "ExpressionStatement", + "src": "2156:169:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2342:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 331, + "id": 342, + "nodeType": "Return", + "src": "2335:11:3" + } + ] + }, + "documentation": "@notice Registers a firm as authorized true/false\n@param firmName Name of firm\n@param _authorized Authorization status\n@return {\"success\" : \"Returns true if lib.setRegisteredFirm succeeds\"}", + "id": 344, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 325, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "2052:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 326, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "2062:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2062:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 324, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2038:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2038:35:3" + } + ], + "name": "setRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "1996:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 319, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 322, + "name": "_authorized", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "2013:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 321, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2013:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1995:35:3" + }, + "payable": false, + "returnParameters": { + "id": 331, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 330, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "2083:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 329, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2083:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2082:14:3" + }, + "scope": 470, + "src": "1969:384:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 372, + "nodeType": "Block", + "src": "2829:377:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "2943:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 364, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "2953:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 365, + "name": "_authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 350, + "src": "2964:11:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2916:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 362, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setRegisteredAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3829, + "src": "2916:26:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_bool_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,bool) returns (bool)" + } + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2916:60:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f20726567697374657220617574686f7269747920666f7220697373756572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e747320616e6420656e73757265206669726d4e616d652069732072656769737465726564206265666f726520616c6c6f77696e6720616e20617574686f72697479206f662073616964206669726d", + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2988:180:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2d4a4b60f49ee08372af5e34c3f2336392554fd91a2dbaa0c7da248171f215ec", + "typeString": "literal_string \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"" + }, + "value": "Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2d4a4b60f49ee08372af5e34c3f2336392554fd91a2dbaa0c7da248171f215ec", + "typeString": "literal_string \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"" + } + ], + "id": 360, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2897:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2897:281:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 369, + "nodeType": "ExpressionStatement", + "src": "2897:281:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 359, + "id": 371, + "nodeType": "Return", + "src": "3188:11:3" + } + ] + }, + "documentation": "@notice Registers an authority asoociated with the given firm as true/false\n@param firmName Name of firm\n@param authority Address of authority account\n@param _authorized Authorization status\n@return {\"success\" : \"Returns true if lib.setRegisteredAuthority succeeds\"}", + "id": 373, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 353, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "2784:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "2794:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2794:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 356, + "modifierName": { + "argumentTypes": null, + "id": 352, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2770:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2770:35:3" + } + ], + "name": "setRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 346, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2709:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 345, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2709:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 348, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2726:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 347, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2726:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 350, + "name": "_authorized", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2745:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2708:54:3" + }, + "payable": false, + "returnParameters": { + "id": 359, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 358, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2815:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 357, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2815:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2814:14:3" + }, + "scope": 470, + "src": "2677:529:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 385, + "nodeType": "Block", + "src": "3467:59:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 382, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 375, + "src": "3509:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 380, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "3484:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 381, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFirmFromAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3858, + "src": "3484:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3484:35:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 379, + "id": 384, + "nodeType": "Return", + "src": "3477:42:3" + } + ] + }, + "documentation": "@notice Gets firm asoociated with an authority address\n@param authority Address of authority account\n@return {\"firm\" : \"name of firm\"}", + "id": 386, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFirmFromAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 375, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3414:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 374, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3413:19:3" + }, + "payable": false, + "returnParameters": { + "id": 379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 378, + "name": "firm", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3454:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 377, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3454:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3453:13:3" + }, + "scope": 470, + "src": "3384:142:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 398, + "nodeType": "Block", + "src": "3775:107:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 395, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "3866:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 393, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "3845:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 394, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3884, + "src": "3845:20:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3845:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 392, + "id": 397, + "nodeType": "Return", + "src": "3838:37:3" + } + ] + }, + "documentation": "@notice Gets status of firm registration\n@param firmName Name of firm\n@return {\"status\" : \"Returns status of firm registration\"}", + "id": 399, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 388, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "3724:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 387, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3724:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3723:17:3" + }, + "payable": false, + "returnParameters": { + "id": 392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 391, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "3762:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 390, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3762:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3761:13:3" + }, + "scope": 470, + "src": "3698:184:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 414, + "nodeType": "Block", + "src": "4252:115:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 410, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "4340:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 411, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 403, + "src": "4350:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 408, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "4317:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3916, + "src": "4317:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4317:43:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 407, + "id": 413, + "nodeType": "Return", + "src": "4310:50:3" + } + ] + }, + "documentation": "@notice Checks if an authority account is registered to a given firm\n@param firmName Name of firm\n@param authority Address of authority account\n@return {\"registered\" : \"Returns status of account registration to firm\"}", + "id": 415, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredToFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 404, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 401, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4178:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 400, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4178:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 403, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4195:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 402, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4195:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4177:36:3" + }, + "payable": false, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 406, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4235:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 405, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4235:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4234:17:3" + }, + "scope": 470, + "src": "4150:217:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 427, + "nodeType": "Block", + "src": "4669:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 424, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 417, + "src": "4762:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 422, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "4736:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 423, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3952, + "src": "4736:25:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4736:36:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 421, + "id": 426, + "nodeType": "Return", + "src": "4729:43:3" + } + ] + }, + "documentation": "@notice Gets status of authority registration\n@param authority Address of authority account\n@return { \"registered\" : \"Returns true if account is a registered authority\" }", + "id": 428, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 417, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 428, + "src": "4612:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4612:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4611:19:3" + }, + "payable": false, + "returnParameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 420, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 428, + "src": "4652:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 419, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4652:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4651:17:3" + }, + "scope": 470, + "src": "4581:198:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 447, + "nodeType": "Block", + "src": "5089:260:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 440, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "5187:11:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 438, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "5162:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setMasterFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2657, + "src": "5162:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5162:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206d61737465722066656520636f6e74726163742e20506c6561736520656e737572652066656520636f6e7472616374206861732074686520636f727265637420706172616d65746572732e", + "id": 442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5211:98:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a96b771d97a968a04d199c5b6408cd38e4f78c25aa05fad6c1579ba20e33b4e4", + "typeString": "literal_string \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"" + }, + "value": "Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a96b771d97a968a04d199c5b6408cd38e4f78c25aa05fad6c1579ba20e33b4e4", + "typeString": "literal_string \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"" + } + ], + "id": 437, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5143:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5143:176:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 444, + "nodeType": "ExpressionStatement", + "src": "5143:176:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5336:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 436, + "id": 446, + "nodeType": "Return", + "src": "5329:11:3" + } + ] + }, + "documentation": "@notice Sets contract which specifies fee parameters\n@param feeContract Address of the fee contract\n@return { \"success\" : \"Returns true if lib.setMasterFeeContract succeeds\" }", + "id": 448, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 433, + "modifierName": { + "argumentTypes": null, + "id": 432, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5056:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5056:9:3" + } + ], + "name": "setMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 430, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 448, + "src": "5028:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5028:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5027:21:3" + }, + "payable": false, + "returnParameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 435, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 448, + "src": "5075:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 434, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5075:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5074:14:3" + }, + "scope": 470, + "src": "4998:351:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 468, + "nodeType": "Block", + "src": "5415:282:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 455, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "5522:5:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 457, + "indexExpression": { + "argumentTypes": null, + "id": 456, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "5528:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5522:16:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 460, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "5565:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 461, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "5575:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 458, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "5542:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 459, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3916, + "src": "5542:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5542:43:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5522:63:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e6f742068617665207065726d697373696f6e20666f722074686973206f7065726174696f6e21", + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5597:72:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d3def153e2e51aa28ae18a72fd9db16026b538556464ddd7af6de088c3965fad", + "typeString": "literal_string \"Error: Transaction sender does not have permission for this operation!\"" + }, + "value": "Error: Transaction sender does not have permission for this operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d3def153e2e51aa28ae18a72fd9db16026b538556464ddd7af6de088c3965fad", + "typeString": "literal_string \"Error: Transaction sender does not have permission for this operation!\"" + } + ], + "id": 454, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5514:165:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 466, + "nodeType": "ExpressionStatement", + "src": "5514:165:3" + }, + { + "id": 467, + "nodeType": "PlaceholderStatement", + "src": "5689:1:3" + } + ] + }, + "documentation": null, + "id": 469, + "name": "onlyAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 450, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 469, + "src": "5379:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 449, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5379:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 452, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 469, + "src": "5396:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5396:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5378:36:3" + }, + "src": "5356:341:3", + "visibility": "internal" + } + ], + "scope": 471, + "src": "871:4829:3" + } + ], + "src": "0:5701:3" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOAuthority.sol", + "exportedSymbols": { + "TokenIOAuthority": [ + 470 + ] + }, + "id": 471, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 287, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 288, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 185, + "src": "788:23:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 289, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 5226, + "src": "812:30:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 290, + "nodeType": "ImportDirective", + "scope": 471, + "sourceUnit": 4607, + "src": "843:26:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "900:7:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "900:7:3" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 470, + "linearizedBaseContracts": [ + 470, + 184 + ], + "name": "TokenIOAuthority", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 295, + "libraryName": { + "contractScope": null, + "id": 293, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1004:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "998:37:3", + "typeName": { + "contractScope": null, + "id": 294, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1019:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 297, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 470, + "src": "1040:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 296, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1040:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 317, + "nodeType": "Block", + "src": "1259:470:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 302, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "1592:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1592:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 306, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 299, + "src": "1621:16:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 305, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1606:14:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1606:32:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1592:46:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1592:46:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 310, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1698:5:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 313, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 311, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1704:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1704:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1698:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1698:24:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 316, + "nodeType": "ExpressionStatement", + "src": "1698:24:3" + } + ] + }, + "documentation": "@notice Constructor method for Authority contract\n@param _storageContract Ethereum Address of TokenIOStorage contract", + "id": 318, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 318, + "src": "1226:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1226:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1225:26:3" + }, + "payable": false, + "returnParameters": { + "id": 301, + "nodeType": "ParameterList", + "parameters": [], + "src": "1259:0:3" + }, + "scope": 470, + "src": "1214:515:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 343, + "nodeType": "Block", + "src": "2097:256:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 335, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "2197:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 336, + "name": "_authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 322, + "src": "2207:11:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 333, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2175:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setRegisteredFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3764, + "src": "2175:21:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_bool_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,bool) returns (bool)" + } + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2175:44:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f207265676973746572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e74732e", + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2231:84:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7c061aadab049d8f25969f3d079d42a1e8f36ec72210e2d32fa2967857012c0f", + "typeString": "literal_string \"Error: Failed to register firm with storage contract! Please check your arguments.\"" + }, + "value": "Error: Failed to register firm with storage contract! Please check your arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7c061aadab049d8f25969f3d079d42a1e8f36ec72210e2d32fa2967857012c0f", + "typeString": "literal_string \"Error: Failed to register firm with storage contract! Please check your arguments.\"" + } + ], + "id": 332, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2156:169:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 340, + "nodeType": "ExpressionStatement", + "src": "2156:169:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2342:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 331, + "id": 342, + "nodeType": "Return", + "src": "2335:11:3" + } + ] + }, + "documentation": "@notice Registers a firm as authorized true/false\n@param firmName Name of firm\n@param _authorized Authorization status\n@return {\"success\" : \"Returns true if lib.setRegisteredFirm succeeds\"}", + "id": 344, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 325, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "2052:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 326, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "2062:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2062:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 324, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2038:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2038:35:3" + } + ], + "name": "setRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "1996:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 319, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 322, + "name": "_authorized", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "2013:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 321, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2013:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1995:35:3" + }, + "payable": false, + "returnParameters": { + "id": 331, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 330, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 344, + "src": "2083:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 329, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2083:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2082:14:3" + }, + "scope": 470, + "src": "1969:384:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 372, + "nodeType": "Block", + "src": "2829:377:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "2943:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 364, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "2953:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 365, + "name": "_authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 350, + "src": "2964:11:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2916:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 362, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setRegisteredAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3829, + "src": "2916:26:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_bool_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,bool) returns (bool)" + } + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2916:60:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f20726567697374657220617574686f7269747920666f7220697373756572206669726d20776974682073746f7261676520636f6e74726163742120506c6561736520636865636b20796f757220617267756d656e747320616e6420656e73757265206669726d4e616d652069732072656769737465726564206265666f726520616c6c6f77696e6720616e20617574686f72697479206f662073616964206669726d", + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2988:180:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2d4a4b60f49ee08372af5e34c3f2336392554fd91a2dbaa0c7da248171f215ec", + "typeString": "literal_string \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"" + }, + "value": "Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2d4a4b60f49ee08372af5e34c3f2336392554fd91a2dbaa0c7da248171f215ec", + "typeString": "literal_string \"Error: Failed to register authority for issuer firm with storage contract! Please check your arguments and ensure firmName is registered before allowing an authority of said firm\"" + } + ], + "id": 360, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2897:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2897:281:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 369, + "nodeType": "ExpressionStatement", + "src": "2897:281:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 359, + "id": 371, + "nodeType": "Return", + "src": "3188:11:3" + } + ] + }, + "documentation": "@notice Registers an authority asoociated with the given firm as true/false\n@param firmName Name of firm\n@param authority Address of authority account\n@param _authorized Authorization status\n@return {\"success\" : \"Returns true if lib.setRegisteredAuthority succeeds\"}", + "id": 373, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 353, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "2784:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "2794:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2794:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 356, + "modifierName": { + "argumentTypes": null, + "id": 352, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2770:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2770:35:3" + } + ], + "name": "setRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 346, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2709:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 345, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2709:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 348, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2726:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 347, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2726:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 350, + "name": "_authorized", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2745:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2708:54:3" + }, + "payable": false, + "returnParameters": { + "id": 359, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 358, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 373, + "src": "2815:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 357, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2815:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2814:14:3" + }, + "scope": 470, + "src": "2677:529:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 385, + "nodeType": "Block", + "src": "3467:59:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 382, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 375, + "src": "3509:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 380, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "3484:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 381, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFirmFromAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3858, + "src": "3484:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3484:35:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 379, + "id": 384, + "nodeType": "Return", + "src": "3477:42:3" + } + ] + }, + "documentation": "@notice Gets firm asoociated with an authority address\n@param authority Address of authority account\n@return {\"firm\" : \"name of firm\"}", + "id": 386, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFirmFromAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 375, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3414:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 374, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3413:19:3" + }, + "payable": false, + "returnParameters": { + "id": 379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 378, + "name": "firm", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3454:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 377, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3454:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3453:13:3" + }, + "scope": 470, + "src": "3384:142:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 398, + "nodeType": "Block", + "src": "3775:107:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 395, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "3866:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 393, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "3845:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 394, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3884, + "src": "3845:20:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3845:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 392, + "id": 397, + "nodeType": "Return", + "src": "3838:37:3" + } + ] + }, + "documentation": "@notice Gets status of firm registration\n@param firmName Name of firm\n@return {\"status\" : \"Returns status of firm registration\"}", + "id": 399, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 388, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "3724:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 387, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3724:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3723:17:3" + }, + "payable": false, + "returnParameters": { + "id": 392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 391, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "3762:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 390, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3762:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3761:13:3" + }, + "scope": 470, + "src": "3698:184:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 414, + "nodeType": "Block", + "src": "4252:115:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 410, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "4340:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 411, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 403, + "src": "4350:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 408, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "4317:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3916, + "src": "4317:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4317:43:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 407, + "id": 413, + "nodeType": "Return", + "src": "4310:50:3" + } + ] + }, + "documentation": "@notice Checks if an authority account is registered to a given firm\n@param firmName Name of firm\n@param authority Address of authority account\n@return {\"registered\" : \"Returns status of account registration to firm\"}", + "id": 415, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredToFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 404, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 401, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4178:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 400, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4178:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 403, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4195:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 402, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4195:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4177:36:3" + }, + "payable": false, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 406, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 415, + "src": "4235:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 405, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4235:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4234:17:3" + }, + "scope": 470, + "src": "4150:217:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 427, + "nodeType": "Block", + "src": "4669:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 424, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 417, + "src": "4762:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 422, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "4736:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 423, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredAuthority", + "nodeType": "MemberAccess", + "referencedDeclaration": 3952, + "src": "4736:25:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4736:36:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 421, + "id": 426, + "nodeType": "Return", + "src": "4729:43:3" + } + ] + }, + "documentation": "@notice Gets status of authority registration\n@param authority Address of authority account\n@return { \"registered\" : \"Returns true if account is a registered authority\" }", + "id": 428, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 417, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 428, + "src": "4612:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4612:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4611:19:3" + }, + "payable": false, + "returnParameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 420, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 428, + "src": "4652:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 419, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4652:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4651:17:3" + }, + "scope": 470, + "src": "4581:198:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 447, + "nodeType": "Block", + "src": "5089:260:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 440, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "5187:11:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 438, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "5162:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setMasterFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2657, + "src": "5162:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5162:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206d61737465722066656520636f6e74726163742e20506c6561736520656e737572652066656520636f6e7472616374206861732074686520636f727265637420706172616d65746572732e", + "id": 442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5211:98:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a96b771d97a968a04d199c5b6408cd38e4f78c25aa05fad6c1579ba20e33b4e4", + "typeString": "literal_string \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"" + }, + "value": "Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a96b771d97a968a04d199c5b6408cd38e4f78c25aa05fad6c1579ba20e33b4e4", + "typeString": "literal_string \"Error: Unable to set master fee contract. Please ensure fee contract has the correct parameters.\"" + } + ], + "id": 437, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5143:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5143:176:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 444, + "nodeType": "ExpressionStatement", + "src": "5143:176:3" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5336:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 436, + "id": 446, + "nodeType": "Return", + "src": "5329:11:3" + } + ] + }, + "documentation": "@notice Sets contract which specifies fee parameters\n@param feeContract Address of the fee contract\n@return { \"success\" : \"Returns true if lib.setMasterFeeContract succeeds\" }", + "id": 448, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 433, + "modifierName": { + "argumentTypes": null, + "id": 432, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5056:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5056:9:3" + } + ], + "name": "setMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 430, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 448, + "src": "5028:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5028:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5027:21:3" + }, + "payable": false, + "returnParameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 435, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 448, + "src": "5075:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 434, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5075:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5074:14:3" + }, + "scope": 470, + "src": "4998:351:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 468, + "nodeType": "Block", + "src": "5415:282:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 455, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "5522:5:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 457, + "indexExpression": { + "argumentTypes": null, + "id": 456, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "5528:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5522:16:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 460, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "5565:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 461, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "5575:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 458, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "5542:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 459, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3916, + "src": "5542:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5542:43:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5522:63:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e2073656e64657220646f6573206e6f742068617665207065726d697373696f6e20666f722074686973206f7065726174696f6e21", + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5597:72:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d3def153e2e51aa28ae18a72fd9db16026b538556464ddd7af6de088c3965fad", + "typeString": "literal_string \"Error: Transaction sender does not have permission for this operation!\"" + }, + "value": "Error: Transaction sender does not have permission for this operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d3def153e2e51aa28ae18a72fd9db16026b538556464ddd7af6de088c3965fad", + "typeString": "literal_string \"Error: Transaction sender does not have permission for this operation!\"" + } + ], + "id": 454, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5514:165:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 466, + "nodeType": "ExpressionStatement", + "src": "5514:165:3" + }, + { + "id": 467, + "nodeType": "PlaceholderStatement", + "src": "5689:1:3" + } + ] + }, + "documentation": null, + "id": 469, + "name": "onlyAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 450, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 469, + "src": "5379:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 449, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5379:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 452, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 469, + "src": "5396:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5396:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5378:36:3" + }, + "src": "5356:341:3", + "visibility": "internal" + } + ], + "scope": 471, + "src": "871:4829:3" + } + ], + "src": "0:5701:3" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x84348c89f20b303ef5139a99a7f8f4618a644a82", + "transactionHash": "0xc61d00626194dc673696915f656d66e8a9b4841964fcdac91231c06e92fd74f0" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0x75c35c980c0d37ef46df04d31a140b65503c0eed", + "transactionHash": "0xf63de1a9bcc8d9155965010f3567a3b624451b3c768233ec733fed39a6eb209c" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:17:57.557Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOCurrencyAuthority.json b/deployed/mainnet-v1.0.1/TokenIOCurrencyAuthority.json new file mode 100644 index 0000000..9d366f5 --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIOCurrencyAuthority.json @@ -0,0 +1,12494 @@ +{ + "contractName": "TokenIOCurrencyAuthority", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "account", + "type": "address" + } + ], + "name": "getTokenBalance", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + } + ], + "name": "getTokenSupply", + "outputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "isAllowed", + "type": "bool" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "freezeAccount", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "isApproved", + "type": "bool" + }, + { + "name": "limit", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "approveKYC", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "limit", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "approveKYCAndDeposit", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "limit", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "setAccountSpendingLimit", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "getAccountSpendingRemaining", + "outputs": [ + { + "name": "spendingRemaining", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "getAccountSpendingLimit", + "outputs": [ + { + "name": "spendingLimit", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "bpsRate", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "setFxBpsRate", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "fxAmount", + "type": "uint256" + } + ], + "name": "getFxUSDAmount", + "outputs": [ + { + "name": "usdAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "originalAccount", + "type": "address" + }, + { + "name": "updatedAccount", + "type": "address" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "approveForwardedAccount", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "deposit", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "issuerFirm", + "type": "string" + } + ], + "name": "withdraw", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506040516020806141d4833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a03909416939093178355815416909117905561415e90819061007690396000f3006080604052600436106100d75763ffffffff60e060020a60003504166328e53bb281146100dc57806329db8ec4146101a25780633cdb9762146101d5578063448900141461023957806346e06634146102d65780634bbc142c146103445780635d586bfd1461036557806361e7662b14610412578063666a342714610433578063666e1b391461045457806379662bd5146104755780638a8f1f2514610522578063a0776a591461058b578063e354a3f2146105e4578063e6562fe11461064f578063f2de12fc146106be578063f2fde38b14610719575b600080fd5b3480156100e857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020601f60608a01358b0180359182018390048302840183018552818452989b600160a060020a038b35169b838c01359b958601359a91995097506080909401955091935091820191819084018382808284375094975061073a9650505050505050565b604080519115158252519081900360200190f35b3480156101ae57600080fd5b506101c3600160a060020a0360043516610b8f565b60408051918252519081900360200190f35b3480156101e157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c394369492936024939284019190819084018382808284375094975050509235600160a060020a03169350610ba892505050565b34801561024557600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a909994019750919550918201935091508190840183828082843750949750610bc39650505050505050565b3480156102e257600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261018e94600160a060020a0381351694602480351515956044359536956084949301918190840183828082843750949750610cf19650505050505050565b34801561035057600080fd5b5061018e600160a060020a036004351661108f565b34801561037157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a9199909850606090910196509194509081019250819084018382808284375094975061116f9650505050505050565b34801561041e57600080fd5b506101c3600160a060020a0360043516611293565b34801561043f57600080fd5b5061018e600160a060020a03600435166112a6565b34801561046057600080fd5b5061018e600160a060020a0360043516611383565b34801561048157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a919990985060609091019650919450908101925081908401838280828437509497506113989650505050505050565b34801561052e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a031694602480359536959460649492019190819084018382808284375094975061145a9650505050505050565b34801561059757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c39436949293602493928401919081908401838280828437509497506115a29650505050505050565b3480156105f057600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a031694602480351515953695946064949201919081908401838280828437509497506115b59650505050505050565b34801561065b57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a03908116956024803590921695369594606494929301919081908401838280828437509497506116d89650505050505050565b3480156106ca57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c394369492936024939284019190819084018382808284375094975050933594506118209350505050565b34801561072557600080fd5b5061018e600160a060020a0360043516611834565b600081336107506001838363ffffffff61199216565b15156107a8576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b6107bb600188818763ffffffff611b3e16565b151561085d576040805160e560020a62461bcd02815260206004820152605b60248201527f4572726f723a20556e61626c6520746f20617070726f7665206163636f756e7460448201527f2e20506c6561736520636865636b206973737565724669726d20616e6420666960648201527f726d20617574686f726974792061726520726567697374657265640000000000608482015290519081900360a40190fd5b610870600188818763ffffffff611e0b16565b1515610912576040805160e560020a62461bcd02815260206004820152605e60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073746160448201527f7475732e20506c6561736520636865636b206973737565724669726d20616e6460648201527f206669726d20617574686f726974792061726520726567697374657265640000608482015290519081900360a40190fd5b61092660018989898863ffffffff61209016565b15156109c8576040805160e560020a62461bcd02815260206004820152605960248201527f4572726f723a20556e61626c6520746f206465706f7369742066756e64732e2060448201527f506c6561736520636865636b206973737565724669726d20616e64206669726d60648201527f20617574686f7269747920617265207265676973746572656400000000000000608482015290519081900360a40190fd5b6109da6001888763ffffffff61290d16565b1515610aa2576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b610ab960018862015180420163ffffffff612b2016565b1515610b81576040805160e560020a62461bcd02815260206004820152606b60248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720706560448201527f72696f6420666f72206163636f756e742e20506c6561736520636865636b206960648201527f73737565724669726d20616e64206669726d20617574686f726974792061726560848201527f207265676973746572656400000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001979650505050505050565b6000610ba260018363ffffffff612bb116565b92915050565b6000610bbc6001848463ffffffff612bd616565b9392505050565b60008133610bd96001838363ffffffff61199216565b1515610c31576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b610c436001878763ffffffff612d3716565b1515610ce5576040805160e560020a62461bcd02815260206004820152605560248201527f4572726f723a20556e61626c6520746f2073657420465820555344206261736960448201527f7320706f696e747320726174652e20506c6561736520656e737572652069737360648201527f7565724669726d20697320617574686f72697a65640000000000000000000000608482015290519081900360a40190fd5b50600195945050505050565b60008133610d076001838363ffffffff61199216565b1515610d5f576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b610d72600188888763ffffffff611b3e16565b1515610e14576040805160e560020a62461bcd02815260206004820152605b60248201527f4572726f723a20556e61626c6520746f20617070726f7665206163636f756e7460448201527f2e20506c6561736520636865636b206973737565724669726d20616e6420666960648201527f726d20617574686f726974792061726520726567697374657265640000000000608482015290519081900360a40190fd5b610e27600188888763ffffffff611e0b16565b1515610ec9576040805160e560020a62461bcd02815260206004820152605e60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073746160448201527f7475732e20506c6561736520636865636b206973737565724669726d20616e6460648201527f206669726d20617574686f726974792061726520726567697374657265640000608482015290519081900360a40190fd5b610edb6001888763ffffffff61290d16565b1515610fa3576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b610fba60018862015180420163ffffffff612b2016565b1515611082576040805160e560020a62461bcd02815260206004820152606b60248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720706560448201527f72696f6420666f72206163636f756e742e20506c6561736520636865636b206960648201527f73737565724669726d20616e64206669726d20617574686f726974792061726560848201527f207265676973746572656400000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019695505050505050565b3360009081526020819052604081205460ff16151561111e576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600081336111856001838363ffffffff61199216565b15156111dd576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b6111f160018888888863ffffffff61209016565b1515611082576040805160e560020a62461bcd02815260206004820152605960248201527f4572726f723a20556e61626c6520746f206465706f7369742066756e64732e2060448201527f506c6561736520636865636b206973737565724669726d20616e64206669726d60648201527f20617574686f7269747920617265207265676973746572656400000000000000608482015290519081900360a40190fd5b6000610ba260018363ffffffff612f3416565b3360009081526020819052604081205460ff161515611335576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b600081336113ae6001838363ffffffff61199216565b1515611406576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b61141a60018888888863ffffffff61307316565b15156110825760405160e560020a62461bcd0281526004018080602001828103825260868152602001806140ad6086913960a00191505060405180910390fd5b600081336114706001838363ffffffff61199216565b15156114c8576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b6114da6001878763ffffffff61290d16565b1515610ce5576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b6000610ba260018363ffffffff61384316565b600081336115cb6001838363ffffffff61199216565b1515611623576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b611636600187878763ffffffff611e0b16565b1515610ce5576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a20556e61626c6520746f20667265657a65206163636f756e742e60448201527f20506c6561736520636865636b206973737565724669726d20616e642066697260648201527f6d20617574686f72697479206172652072656769737465726564000000000000608482015290519081900360a40190fd5b600081336116ee6001838363ffffffff61199216565b1515611746576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b6117586001878763ffffffff61390316565b1515610ce5576040805160e560020a62461bcd02815260206004820152606d60248201527f4572726f723a20556e61626c6520746f2073657420666f72776172646564206160448201527f64647265737320666f72206163636f756e742e20506c6561736520636865636b60648201527f206973737565724669726d20616e64206669726d20617574686f72697479206160848201527f726520726567697374657265640000000000000000000000000000000000000060a482015290519081900360c40190fd5b6000610bbc6001848463ffffffff613a2b16565b3360009081526020819052604081205460ff1615156118c3576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515611923576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b600080836119a08685613acf565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b602083106119fa5780518252601f1990920191602091820191016119db565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310611a7c5780518252601f199092019160209182019101611a5d565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015611b0957600080fd5b505af1158015611b1d573d6000803e3d6000fd5b505050506040513d6020811015611b3357600080fd5b505195945050505050565b600080611b4b8686613acf565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611bd95780518252601f199092019160209182019101611bba565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015611c6e57600080fd5b505af1158015611c82573d6000803e3d6000fd5b505050506040513d6020811015611c9857600080fd5b50511515611d50576040805160e560020a62461bcd028152602060048201526068602482015260008051602061404d83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b84600160a060020a03167fab56f1457128531bea5d39a6dbdbcdc655f2b2959bd7ee369f6461581aa6444d8585604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611dc4578181015183820152602001611dac565b50505050905090810190601f168015611df15780820380516001836020036101000a031916815260200191505b50935050505060405180910390a250600195945050505050565b600080611e188686613acf565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ea65780518252601f199092019160209182019101611e87565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015611f3b57600080fd5b505af1158015611f4f573d6000803e3d6000fd5b505050506040513d6020811015611f6557600080fd5b5051151561201d576040805160e560020a62461bcd028152602060048201526068602482015260008051602061404d83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b84600160a060020a03167f1d71109398f40d30b03a3640657b60db5013a5e75026c3db99007b43bede166585856040518083151515158152602001806020018281038252838181518152602001915080519060200190808383600083811015611dc4578181015183820152602001611dac565b600080600080876120a18a89613acf565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106120fb5780518252601f1990920191602091820191016120dc565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b6020831061217d5780518252601f19909201916020918201910161215e565b51815160001960209485036101000a019081169019919091161790526040519390910183900383207f746f6b656e2e69737375656400000000000000000000000000000000000000008483019081528e519199508e96508b955093602c019250908501908083835b602083106122045780518252601f1990920191602091820191016121e5565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061224c5780518252601f19909201916020918201910161222d565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106122b05780518252601f199092019160209182019101612291565b51815160209384036101000a60001901801990921691161790526040519190930181900381207f746f6b656e2e737570706c7900000000000000000000000000000000000000008285019081528e519198508e96509450602c90910192850191508083835b602083106123345780518252601f199092019160209182019101612315565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106123975780518252601f199092019160209182019101612378565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018b90529451909750600160a060020a03909416955063e2a4853a9450889361245293508c92879263bd02d0f5926024808401938290030181600087803b15801561241a57600080fd5b505af115801561242e573d6000803e3d6000fd5b505050506040513d602081101561244457600080fd5b50519063ffffffff613c4116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561249a57600080fd5b505af11580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b50511515612546576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018590529051600160a060020a039092169163e2a4853a9185916125a5918b91869163bd02d0f59160248083019260209291908290030181600087803b15801561241a57600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156125ed57600080fd5b505af1158015612601573d6000803e3d6000fd5b505050506040513d602081101561261757600080fd5b50511515612699576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a9184916126f8918b91869163bd02d0f59160248083019260209291908290030181600087803b15801561241a57600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561274057600080fd5b505af1158015612754573d6000803e3d6000fd5b505050506040513d602081101561276a57600080fd5b505115156127ec576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b86600160a060020a03167fb20a35859ac659f96b757a0975ff35141c00728783cc1b222c2fc323ed8a34ea898888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b83811015612861578181015183820152602001612849565b50505050905090810190601f16801561288e5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156128c15781810151838201526020016128a9565b50505050905090810190601f1680156128ee5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a250600198975050505050505050565b6000808360405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061299f5780518252601f199092019160209182019101612980565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612a3357600080fd5b505af1158015612a47573d6000803e3d6000fd5b505050506040513d6020811015612a5d57600080fd5b50511515612b15576040805160e560020a62461bcd028152602060048201526068602482015260008051602061404d83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083836020831061299f5780518252601f199092019160209182019101612980565b6000610bbc612bc08484613cc4565b612bca8585612f34565b9063ffffffff613d6616565b60008083612be48685613acf565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310612c3e5780518252601f199092019160209182019101612c1f565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310612cc05780518252601f199092019160209182019101612ca1565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015611b0957600080fd5b6000808360405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b0182805190602001908083835b60208310612d955780518252601f199092019160209182019101612d76565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310612df85780518252601f199092019160209182019101612dd9565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612e8c57600080fd5b505af1158015612ea0573d6000803e3d6000fd5b505050506040513d6020811015612eb657600080fd5b50511515612b15576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310612fc65780518252601f199092019160209182019101612fa7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561303d57600080fd5b505af1158015613051573d6000803e3d6000fd5b505050506040513d602081101561306757600080fd5b505191505b5092915050565b600080600080876130848a89613acf565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106130de5780518252601f1990920191602091820191016130bf565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106131605780518252601f199092019160209182019101613141565b51815160001960209485036101000a019081169019919091161790526040519390910183900383207f746f6b656e2e69737375656400000000000000000000000000000000000000008483019081528e519199508e96508b955093602c019250908501908083835b602083106131e75780518252601f1990920191602091820191016131c8565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061322f5780518252601f199092019160209182019101613210565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106132935780518252601f199092019160209182019101613274565b51815160209384036101000a60001901801990921691161790526040519190930181900381207f746f6b656e2e737570706c7900000000000000000000000000000000000000008285019081528e519198508e96509450602c90910192850191508083835b602083106133175780518252601f1990920191602091820191016132f8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061337a5780518252601f19909201916020918201910161335b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018b90529451909750600160a060020a03909416955063e2a4853a9450889361343593508c92879263bd02d0f5926024808401938290030181600087803b1580156133fd57600080fd5b505af1158015613411573d6000803e3d6000fd5b505050506040513d602081101561342757600080fd5b50519063ffffffff613d6616565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561347d57600080fd5b505af1158015613491573d6000803e3d6000fd5b505050506040513d60208110156134a757600080fd5b50511515613529576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018590529051600160a060020a039092169163e2a4853a918591613588918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156133fd57600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156135d057600080fd5b505af11580156135e4573d6000803e3d6000fd5b505050506040513d60208110156135fa57600080fd5b5051151561367c576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a9184916136db918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156133fd57600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561372357600080fd5b505af1158015613737573d6000803e3d6000fd5b505050506040513d602081101561374d57600080fd5b505115156137cf576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b86600160a060020a03167fbe0071d3ab0eb6dc7f33a38ba50120d775cd62fa123f3b59c193caf48e44bb4c8988886040518080602001848152602001806020018381038352868181518152602001915080519060200190808383600083811015612861578181015183820152602001612849565b6000808260405160200180807f746f6b656e2e737570706c790000000000000000000000000000000000000000815250600c0182805190602001908083835b602083106138a15780518252601f199092019160209182019101613882565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405180828051906020019080838360208310612fc65780518252601f199092019160209182019101612fa7565b6000808260405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106139955780518252601f199092019160209182019101613976565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038c81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b158015612a3357600080fd5b600080600080613a70876040805190810160405280600481526020017f5553447800000000000000000000000000000000000000000000000000000000815250613deb565b9250613a7c8787613deb565b9150613ac482600a0a613aac85600a0a613ab8612710613aac613a9f8e8e613e48565b8c9063ffffffff613ea516565b9063ffffffff613f4416565b9063ffffffff613ea516565b979650505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613b635780518252601f199092019160209182019101613b44565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015613bf057600080fd5b505af1158015613c04573d6000803e3d6000fd5b505050506040513d6020811015613c1a57600080fd5b50519050600160a060020a03811615613c3557809250613c39565b8392505b505092915050565b600082820183811015610bbc576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008082613cd28585613f5b565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a0281526014018281526020019250505060405160208183030381529060405260405180828051906020019080838360208310612fc65780518252601f199092019160209182019101612fa7565b600082821115613de5576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e018280519060200190808383602083106138a15780518252601f199092019160209182019101613882565b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b018280519060200190808383602083106138a15780518252601f199092019160209182019101613882565b600080831515613eb8576000915061306c565b50828202828482811515613ec857fe5b0414610bbc576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808284811515613f5257fe5b04949350505050565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310612fc65780518252601f199092019160209182019101612fa756004572726f723a206973737565724669726d20616e642f6f72206669726d2061756c6c6f776564207065726d697373696f6e7320776974682073746f726167652075652e20506c6561736520656e7375726520636f6e74726163742068617320614572726f723a20556e61626c6520746f207365742073746f726167652076616c636f6e74726163742e000000000000000000000000000000000000000000000074686f7269747920617265206e6f7420726567697374657265640000000000004572726f723a20556e61626c6520746f2077697468647261772066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f7269747920617265207265676973746572656420616e642068617665206973737565642066756e647320746861742063616e2062652077697468647261776ea165627a7a72305820202768ce7da49e7741483b78b1396fb680665921eef847f295223e40b6f927070029", + "deployedBytecode": "0x6080604052600436106100d75763ffffffff60e060020a60003504166328e53bb281146100dc57806329db8ec4146101a25780633cdb9762146101d5578063448900141461023957806346e06634146102d65780634bbc142c146103445780635d586bfd1461036557806361e7662b14610412578063666a342714610433578063666e1b391461045457806379662bd5146104755780638a8f1f2514610522578063a0776a591461058b578063e354a3f2146105e4578063e6562fe11461064f578063f2de12fc146106be578063f2fde38b14610719575b600080fd5b3480156100e857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020601f60608a01358b0180359182018390048302840183018552818452989b600160a060020a038b35169b838c01359b958601359a91995097506080909401955091935091820191819084018382808284375094975061073a9650505050505050565b604080519115158252519081900360200190f35b3480156101ae57600080fd5b506101c3600160a060020a0360043516610b8f565b60408051918252519081900360200190f35b3480156101e157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c394369492936024939284019190819084018382808284375094975050509235600160a060020a03169350610ba892505050565b34801561024557600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a909994019750919550918201935091508190840183828082843750949750610bc39650505050505050565b3480156102e257600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261018e94600160a060020a0381351694602480351515956044359536956084949301918190840183828082843750949750610cf19650505050505050565b34801561035057600080fd5b5061018e600160a060020a036004351661108f565b34801561037157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a9199909850606090910196509194509081019250819084018382808284375094975061116f9650505050505050565b34801561041e57600080fd5b506101c3600160a060020a0360043516611293565b34801561043f57600080fd5b5061018e600160a060020a03600435166112a6565b34801561046057600080fd5b5061018e600160a060020a0360043516611383565b34801561048157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018e94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a919990985060609091019650919450908101925081908401838280828437509497506113989650505050505050565b34801561052e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a031694602480359536959460649492019190819084018382808284375094975061145a9650505050505050565b34801561059757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c39436949293602493928401919081908401838280828437509497506115a29650505050505050565b3480156105f057600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a031694602480351515953695946064949201919081908401838280828437509497506115b59650505050505050565b34801561065b57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261018e948235600160a060020a03908116956024803590921695369594606494929301919081908401838280828437509497506116d89650505050505050565b3480156106ca57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101c394369492936024939284019190819084018382808284375094975050933594506118209350505050565b34801561072557600080fd5b5061018e600160a060020a0360043516611834565b600081336107506001838363ffffffff61199216565b15156107a8576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b6107bb600188818763ffffffff611b3e16565b151561085d576040805160e560020a62461bcd02815260206004820152605b60248201527f4572726f723a20556e61626c6520746f20617070726f7665206163636f756e7460448201527f2e20506c6561736520636865636b206973737565724669726d20616e6420666960648201527f726d20617574686f726974792061726520726567697374657265640000000000608482015290519081900360a40190fd5b610870600188818763ffffffff611e0b16565b1515610912576040805160e560020a62461bcd02815260206004820152605e60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073746160448201527f7475732e20506c6561736520636865636b206973737565724669726d20616e6460648201527f206669726d20617574686f726974792061726520726567697374657265640000608482015290519081900360a40190fd5b61092660018989898863ffffffff61209016565b15156109c8576040805160e560020a62461bcd02815260206004820152605960248201527f4572726f723a20556e61626c6520746f206465706f7369742066756e64732e2060448201527f506c6561736520636865636b206973737565724669726d20616e64206669726d60648201527f20617574686f7269747920617265207265676973746572656400000000000000608482015290519081900360a40190fd5b6109da6001888763ffffffff61290d16565b1515610aa2576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b610ab960018862015180420163ffffffff612b2016565b1515610b81576040805160e560020a62461bcd02815260206004820152606b60248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720706560448201527f72696f6420666f72206163636f756e742e20506c6561736520636865636b206960648201527f73737565724669726d20616e64206669726d20617574686f726974792061726560848201527f207265676973746572656400000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001979650505050505050565b6000610ba260018363ffffffff612bb116565b92915050565b6000610bbc6001848463ffffffff612bd616565b9392505050565b60008133610bd96001838363ffffffff61199216565b1515610c31576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b610c436001878763ffffffff612d3716565b1515610ce5576040805160e560020a62461bcd02815260206004820152605560248201527f4572726f723a20556e61626c6520746f2073657420465820555344206261736960448201527f7320706f696e747320726174652e20506c6561736520656e737572652069737360648201527f7565724669726d20697320617574686f72697a65640000000000000000000000608482015290519081900360a40190fd5b50600195945050505050565b60008133610d076001838363ffffffff61199216565b1515610d5f576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b610d72600188888763ffffffff611b3e16565b1515610e14576040805160e560020a62461bcd02815260206004820152605b60248201527f4572726f723a20556e61626c6520746f20617070726f7665206163636f756e7460448201527f2e20506c6561736520636865636b206973737565724669726d20616e6420666960648201527f726d20617574686f726974792061726520726567697374657265640000000000608482015290519081900360a40190fd5b610e27600188888763ffffffff611e0b16565b1515610ec9576040805160e560020a62461bcd02815260206004820152605e60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073746160448201527f7475732e20506c6561736520636865636b206973737565724669726d20616e6460648201527f206669726d20617574686f726974792061726520726567697374657265640000608482015290519081900360a40190fd5b610edb6001888763ffffffff61290d16565b1515610fa3576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b610fba60018862015180420163ffffffff612b2016565b1515611082576040805160e560020a62461bcd02815260206004820152606b60248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720706560448201527f72696f6420666f72206163636f756e742e20506c6561736520636865636b206960648201527f73737565724669726d20616e64206669726d20617574686f726974792061726560848201527f207265676973746572656400000000000000000000000000000000000000000060a482015290519081900360c40190fd5b5060019695505050505050565b3360009081526020819052604081205460ff16151561111e576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600081336111856001838363ffffffff61199216565b15156111dd576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b6111f160018888888863ffffffff61209016565b1515611082576040805160e560020a62461bcd02815260206004820152605960248201527f4572726f723a20556e61626c6520746f206465706f7369742066756e64732e2060448201527f506c6561736520636865636b206973737565724669726d20616e64206669726d60648201527f20617574686f7269747920617265207265676973746572656400000000000000608482015290519081900360a40190fd5b6000610ba260018363ffffffff612f3416565b3360009081526020819052604081205460ff161515611335576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b600081336113ae6001838363ffffffff61199216565b1515611406576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b61141a60018888888863ffffffff61307316565b15156110825760405160e560020a62461bcd0281526004018080602001828103825260868152602001806140ad6086913960a00191505060405180910390fd5b600081336114706001838363ffffffff61199216565b15156114c8576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b6114da6001878763ffffffff61290d16565b1515610ce5576040805160e560020a62461bcd02815260206004820152607260248201527f4572726f723a20556e61626c6520746f2073657420696e697469616c2073706560448201527f6e64696e67206c696d697420666f72206163636f756e742e20506c656173652060648201527f636865636b206973737565724669726d20616e64206669726d20617574686f7260848201527f697479206172652072656769737465726564000000000000000000000000000060a482015290519081900360c40190fd5b6000610ba260018363ffffffff61384316565b600081336115cb6001838363ffffffff61199216565b1515611623576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b611636600187878763ffffffff611e0b16565b1515610ce5576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a20556e61626c6520746f20667265657a65206163636f756e742e60448201527f20506c6561736520636865636b206973737565724669726d20616e642066697260648201527f6d20617574686f72697479206172652072656769737465726564000000000000608482015290519081900360a40190fd5b600081336116ee6001838363ffffffff61199216565b1515611746576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020613fed833981519152604482015260008051602061408d833981519152606482015290519081900360840190fd5b6117586001878763ffffffff61390316565b1515610ce5576040805160e560020a62461bcd02815260206004820152606d60248201527f4572726f723a20556e61626c6520746f2073657420666f72776172646564206160448201527f64647265737320666f72206163636f756e742e20506c6561736520636865636b60648201527f206973737565724669726d20616e64206669726d20617574686f72697479206160848201527f726520726567697374657265640000000000000000000000000000000000000060a482015290519081900360c40190fd5b6000610bbc6001848463ffffffff613a2b16565b3360009081526020819052604081205460ff1615156118c3576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515611923576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b600080836119a08685613acf565b60405160200180807f726567697374657265642e617574686f7269747900000000000000000000000081525060140183805190602001908083835b602083106119fa5780518252601f1990920191602091820191016119db565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310611a7c5780518252601f199092019160209182019101611a5d565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015611b0957600080fd5b505af1158015611b1d573d6000803e3d6000fd5b505050506040513d6020811015611b3357600080fd5b505195945050505050565b600080611b4b8686613acf565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611bd95780518252601f199092019160209182019101611bba565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015611c6e57600080fd5b505af1158015611c82573d6000803e3d6000fd5b505050506040513d6020811015611c9857600080fd5b50511515611d50576040805160e560020a62461bcd028152602060048201526068602482015260008051602061404d83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b84600160a060020a03167fab56f1457128531bea5d39a6dbdbcdc655f2b2959bd7ee369f6461581aa6444d8585604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611dc4578181015183820152602001611dac565b50505050905090810190601f168015611df15780820380516001836020036101000a031916815260200191505b50935050505060405180910390a250600195945050505050565b600080611e188686613acf565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ea65780518252601f199092019160209182019101611e87565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fabfdcced000000000000000000000000000000000000000000000000000000008452600484018290528b151560248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b158015611f3b57600080fd5b505af1158015611f4f573d6000803e3d6000fd5b505050506040513d6020811015611f6557600080fd5b5051151561201d576040805160e560020a62461bcd028152602060048201526068602482015260008051602061404d83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b84600160a060020a03167f1d71109398f40d30b03a3640657b60db5013a5e75026c3db99007b43bede166585856040518083151515158152602001806020018281038252838181518152602001915080519060200190808383600083811015611dc4578181015183820152602001611dac565b600080600080876120a18a89613acf565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106120fb5780518252601f1990920191602091820191016120dc565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b6020831061217d5780518252601f19909201916020918201910161215e565b51815160001960209485036101000a019081169019919091161790526040519390910183900383207f746f6b656e2e69737375656400000000000000000000000000000000000000008483019081528e519199508e96508b955093602c019250908501908083835b602083106122045780518252601f1990920191602091820191016121e5565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061224c5780518252601f19909201916020918201910161222d565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106122b05780518252601f199092019160209182019101612291565b51815160209384036101000a60001901801990921691161790526040519190930181900381207f746f6b656e2e737570706c7900000000000000000000000000000000000000008285019081528e519198508e96509450602c90910192850191508083835b602083106123345780518252601f199092019160209182019101612315565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106123975780518252601f199092019160209182019101612378565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018b90529451909750600160a060020a03909416955063e2a4853a9450889361245293508c92879263bd02d0f5926024808401938290030181600087803b15801561241a57600080fd5b505af115801561242e573d6000803e3d6000fd5b505050506040513d602081101561244457600080fd5b50519063ffffffff613c4116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561249a57600080fd5b505af11580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b50511515612546576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018590529051600160a060020a039092169163e2a4853a9185916125a5918b91869163bd02d0f59160248083019260209291908290030181600087803b15801561241a57600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156125ed57600080fd5b505af1158015612601573d6000803e3d6000fd5b505050506040513d602081101561261757600080fd5b50511515612699576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a9184916126f8918b91869163bd02d0f59160248083019260209291908290030181600087803b15801561241a57600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561274057600080fd5b505af1158015612754573d6000803e3d6000fd5b505050506040513d602081101561276a57600080fd5b505115156127ec576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b86600160a060020a03167fb20a35859ac659f96b757a0975ff35141c00728783cc1b222c2fc323ed8a34ea898888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b83811015612861578181015183820152602001612849565b50505050905090810190601f16801561288e5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156128c15781810151838201526020016128a9565b50505050905090810190601f1680156128ee5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a250600198975050505050505050565b6000808360405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061299f5780518252601f199092019160209182019101612980565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612a3357600080fd5b505af1158015612a47573d6000803e3d6000fd5b505050506040513d6020811015612a5d57600080fd5b50511515612b15576040805160e560020a62461bcd028152602060048201526068602482015260008051602061404d83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083836020831061299f5780518252601f199092019160209182019101612980565b6000610bbc612bc08484613cc4565b612bca8585612f34565b9063ffffffff613d6616565b60008083612be48685613acf565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310612c3e5780518252601f199092019160209182019101612c1f565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310612cc05780518252601f199092019160209182019101612ca1565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015611b0957600080fd5b6000808360405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b0182805190602001908083835b60208310612d955780518252601f199092019160209182019101612d76565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310612df85780518252601f199092019160209182019101612dd9565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612e8c57600080fd5b505af1158015612ea0573d6000803e3d6000fd5b505050506040513d6020811015612eb657600080fd5b50511515612b15576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310612fc65780518252601f199092019160209182019101612fa7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561303d57600080fd5b505af1158015613051573d6000803e3d6000fd5b505050506040513d602081101561306757600080fd5b505191505b5092915050565b600080600080876130848a89613acf565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106130de5780518252601f1990920191602091820191016130bf565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106131605780518252601f199092019160209182019101613141565b51815160001960209485036101000a019081169019919091161790526040519390910183900383207f746f6b656e2e69737375656400000000000000000000000000000000000000008483019081528e519199508e96508b955093602c019250908501908083835b602083106131e75780518252601f1990920191602091820191016131c8565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061322f5780518252601f199092019160209182019101613210565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106132935780518252601f199092019160209182019101613274565b51815160209384036101000a60001901801990921691161790526040519190930181900381207f746f6b656e2e737570706c7900000000000000000000000000000000000000008285019081528e519198508e96509450602c90910192850191508083835b602083106133175780518252601f1990920191602091820191016132f8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061337a5780518252601f19909201916020918201910161335b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018b90529451909750600160a060020a03909416955063e2a4853a9450889361343593508c92879263bd02d0f5926024808401938290030181600087803b1580156133fd57600080fd5b505af1158015613411573d6000803e3d6000fd5b505050506040513d602081101561342757600080fd5b50519063ffffffff613d6616565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561347d57600080fd5b505af1158015613491573d6000803e3d6000fd5b505050506040513d60208110156134a757600080fd5b50511515613529576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018590529051600160a060020a039092169163e2a4853a918591613588918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156133fd57600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156135d057600080fd5b505af11580156135e4573d6000803e3d6000fd5b505050506040513d60208110156135fa57600080fd5b5051151561367c576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a9184916136db918b91869163bd02d0f59160248083019260209291908290030181600087803b1580156133fd57600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561372357600080fd5b505af1158015613737573d6000803e3d6000fd5b505050506040513d602081101561374d57600080fd5b505115156137cf576040805160e560020a62461bcd028152602060048201526069602482015260008051602061404d833981519152604482015260008051602061402d833981519152606482015260008051602061400d833981519152608482015260008051602061406d83398151915260a482015290519081900360c40190fd5b86600160a060020a03167fbe0071d3ab0eb6dc7f33a38ba50120d775cd62fa123f3b59c193caf48e44bb4c8988886040518080602001848152602001806020018381038352868181518152602001915080519060200190808383600083811015612861578181015183820152602001612849565b6000808260405160200180807f746f6b656e2e737570706c790000000000000000000000000000000000000000815250600c0182805190602001908083835b602083106138a15780518252601f199092019160209182019101613882565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405180828051906020019080838360208310612fc65780518252601f199092019160209182019101612fa7565b6000808260405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106139955780518252601f199092019160209182019101613976565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038c81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b158015612a3357600080fd5b600080600080613a70876040805190810160405280600481526020017f5553447800000000000000000000000000000000000000000000000000000000815250613deb565b9250613a7c8787613deb565b9150613ac482600a0a613aac85600a0a613ab8612710613aac613a9f8e8e613e48565b8c9063ffffffff613ea516565b9063ffffffff613f4416565b9063ffffffff613ea516565b979650505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613b635780518252601f199092019160209182019101613b44565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015613bf057600080fd5b505af1158015613c04573d6000803e3d6000fd5b505050506040513d6020811015613c1a57600080fd5b50519050600160a060020a03811615613c3557809250613c39565b8392505b505092915050565b600082820183811015610bbc576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008082613cd28585613f5b565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a0281526014018281526020019250505060405160208183030381529060405260405180828051906020019080838360208310612fc65780518252601f199092019160209182019101612fa7565b600082821115613de5576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e018280519060200190808383602083106138a15780518252601f199092019160209182019101613882565b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b018280519060200190808383602083106138a15780518252601f199092019160209182019101613882565b600080831515613eb8576000915061306c565b50828202828482811515613ec857fe5b0414610bbc576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808284811515613f5257fe5b04949350505050565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310612fc65780518252601f199092019160209182019101612fa756004572726f723a206973737565724669726d20616e642f6f72206669726d2061756c6c6f776564207065726d697373696f6e7320776974682073746f726167652075652e20506c6561736520656e7375726520636f6e74726163742068617320614572726f723a20556e61626c6520746f207365742073746f726167652076616c636f6e74726163742e000000000000000000000000000000000000000000000074686f7269747920617265206e6f7420726567697374657265640000000000004572726f723a20556e61626c6520746f2077697468647261772066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f7269747920617265207265676973746572656420616e642068617665206973737565642066756e647320746861742063616e2062652077697468647261776ea165627a7a72305820202768ce7da49e7741483b78b1396fb680665921eef847f295223e40b6f927070029", + "sourceMap": "881:11789:4:-;;;1234:430;8:9:-1;5:2;;;30:1;27;20:12;5:2;1234:430:4;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1234:430:4;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1528:46:4;;-1:-1:-1;;;;;;1528:46:4;-1:-1:-1;;;;;1528:46:4;;;;;;;;;1633:24;;;;;;;;881:11789;;;;;;;;", + "deployedSourceMap": "881:11789:4:-;;;;;;;;;-1:-1:-1;;;881:11789:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5134:1383;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5134:1383:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5134:1383:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5134:1383:4;;;;;;;;;;;;;;;;-1:-1:-1;5134:1383:4;-1:-1:-1;5134:1383:4;;;;;-1:-1:-1;5134:1383:4;;-1:-1:-1;5134:1383:4;;;;;;;;;;;;;;-1:-1:-1;5134:1383:4;;-1:-1:-1;5134:1383:4;;-1:-1:-1;;;;;;;5134:1383:4;;;;;;;;;;;;;;;;;;;7513:161;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7513:161:4;-1:-1:-1;;;;;7513:161:4;;;;;;;;;;;;;;;;;;;;;1905:154;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1905:154:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1905:154:4;;-1:-1:-1;;;1905:154:4;;-1:-1:-1;;;;;1905:154:4;;-1:-1:-1;1905:154:4;;-1:-1:-1;;;1905:154:4;8561:334;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8561:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8561:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8561:334:4;;-1:-1:-1;8561:334:4;;;;-1:-1:-1;8561:334:4;-1:-1:-1;8561:334:4;;;;;;;;;;-1:-1:-1;8561:334:4;;-1:-1:-1;8561:334:4;;-1:-1:-1;;;;;;;8561:334:4;3508:1172;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3508:1172:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3508:1172:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3508:1172:4;;-1:-1:-1;3508:1172:4;;-1:-1:-1;;;;;;;3508:1172:4;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;10549:577:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10549:577:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;10549:577:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10549:577:4;;;;;;;;;;;-1:-1:-1;10549:577:4;;;;;-1:-1:-1;10549:577:4;;-1:-1:-1;10549:577:4;;;;-1:-1:-1;10549:577:4;;;;;;;;;;-1:-1:-1;10549:577:4;;-1:-1:-1;10549:577:4;;-1:-1:-1;;;;;;;10549:577:4;7905:149;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7905:149:4;-1:-1:-1;;;;;7905:149:4;;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;11526:620:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;11526:620:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11526:620:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11526:620:4;;;;;;;;;;;-1:-1:-1;11526:620:4;;;;;-1:-1:-1;11526:620:4;;-1:-1:-1;11526:620:4;;;;-1:-1:-1;11526:620:4;;;;;;;;;;-1:-1:-1;11526:620:4;;-1:-1:-1;11526:620:4;;-1:-1:-1;;;;;;;11526:620:4;6883:377;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6883:377:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6883:377:4;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6883:377:4;;-1:-1:-1;6883:377:4;;-1:-1:-1;;;;;;;6883:377:4;2245:125;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2245:125:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2245:125:4;;-1:-1:-1;2245:125:4;;-1:-1:-1;;;;;;;2245:125:4;2720:450;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2720:450:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2720:450:4;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2720:450:4;;-1:-1:-1;2720:450:4;;-1:-1:-1;;;;;;;2720:450:4;9677:503;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9677:503:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9677:503:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9677:503:4;;-1:-1:-1;9677:503:4;;-1:-1:-1;;;;;;;9677:503:4;9203:153;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9203:153:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9203:153:4;;-1:-1:-1;;9203:153:4;;;-1:-1:-1;9203:153:4;;-1:-1:-1;;;;9203:153:4;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;5134:1383:4;5296:12;5263:10;5275;12524:43;:3;5263:10;5275;12524:43;:22;:43;:::i;:::-;12505:144;;;;;;;-1:-1:-1;;;;;12505:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;;;;;;;;;;;;5430:45;5458:4;5449:7;5458:4;5464:10;5430:45;:18;:45;:::i;:::-;5411:179;;;;;;;-1:-1:-1;;;;;5411:179:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5710:47;5740:4;5731:7;5740:4;5746:10;5710:47;:20;:47;:::i;:::-;5691:184;;;;;;;-1:-1:-1;;;;;5691:184:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5904:50;:3;5916:8;5926:7;5935:6;5943:10;5904:50;:11;:50;:::i;:::-;5885:182;;;;;;;-1:-1:-1;;;;;5885:182:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6096:43;:3;6124:7;6133:5;6096:43;:27;:43;:::i;:::-;6077:200;;;;;;;-1:-1:-1;;;;;6077:200:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6306:52;:3;6335:7;6351:5;6345:3;:11;6306:52;:28;:52;:::i;:::-;6287:202;;;;;;;-1:-1:-1;;;;;6287:202:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6506:4:4;;5134:1383;-1:-1:-1;;;;;;;5134:1383:4:o;7513:161::-;7588:22;7627:40;:3;7659:7;7627:40;:31;:40;:::i;:::-;7620:47;7513:161;-1:-1:-1;;7513:161:4:o;1905:154::-;1985:12;2014:38;:3;2034:8;2044:7;2014:38;:19;:38;:::i;:::-;2007:45;1905:154;-1:-1:-1;;;1905:154:4:o;8561:334::-;8687:12;8654:10;8666;12524:43;:3;8654:10;8666;12524:43;:22;:43;:::i;:::-;12505:144;;;;;;;-1:-1:-1;;;;;12505:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;;;;;;;;;;;;8726:38;:3;8746:8;8756:7;8726:38;:19;:38;:::i;:::-;8709:160;;;;;;;-1:-1:-1;;;;;8709:160:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8884:4:4;;8561:334;-1:-1:-1;;;;;8561:334:4:o;3508:1172::-;3647:12;3614:10;3626;12524:43;:3;3614:10;3626;12524:43;:22;:43;:::i;:::-;12505:144;;;;;;;-1:-1:-1;;;;;12505:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;;;;;;;;;;;;3779:51;:3;3798:7;3807:10;3819;3779:51;:18;:51;:::i;:::-;3760:185;;;;;;;-1:-1:-1;;;;;3760:185:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4059:53;:3;4080:7;4089:10;4101;4059:53;:20;:53;:::i;:::-;4040:190;;;;;;;-1:-1:-1;;;;;4040:190:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4259:43;:3;4287:7;4296:5;4259:43;:27;:43;:::i;:::-;4240:200;;;;;;;-1:-1:-1;;;;;4240:200:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4469:52;:3;4498:7;4514:5;4508:3;:11;4469:52;:28;:52;:::i;:::-;4450:202;;;;;;;-1:-1:-1;;;;;4450:202:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4669:4:4;;3508:1172;-1:-1:-1;;;;;;3508:1172:4:o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;10549:577:4:-;10686:12;10653:10;10665;12524:43;:3;10653:10;10665;12524:43;:22;:43;:::i;:::-;12505:144;;;;;;;-1:-1:-1;;;;;12505:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;;;;;;;;;;;;10935:50;:3;10947:8;10957:7;10966:6;10974:10;10935:50;:11;:50;:::i;:::-;10916:182;;;;;;;-1:-1:-1;;;;;10916:182:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7905:149;7976:18;8011:36;:3;8039:7;8011:36;:27;:36;:::i;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;11526:620:4:-;11664:12;11631:10;11643;12524:43;:3;11631:10;11643;12524:43;:22;:43;:::i;:::-;12505:144;;;;;;;-1:-1:-1;;;;;12505:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;;;;;;;;;;;;11909:51;:3;11922:8;11932:7;11941:6;11949:10;11909:51;:12;:51;:::i;:::-;11890:228;;;;;;-1:-1:-1;;;;;11890:228:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6883:377;7018:12;6985:10;6997;12524:43;:3;6985:10;6997;12524:43;:22;:43;:::i;:::-;12505:144;;;;;;;-1:-1:-1;;;;;12505:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;;;;;;;;;;;;7057:43;:3;7085:7;7094:5;7057:43;:27;:43;:::i;:::-;7040:194;;;;;;;-1:-1:-1;;;;;7040:194:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2245:125;2307:11;2335:28;:3;2354:8;2335:28;:18;:28;:::i;2720:450::-;2849:12;2816:10;2828;12524:43;:3;2816:10;2828;12524:43;:22;:43;:::i;:::-;12505:144;;;;;;;-1:-1:-1;;;;;12505:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;;;;;;;;;;;;2976:52;:3;2997:7;3006:9;3017:10;2976:52;:20;:52;:::i;:::-;2957:185;;;;;;;-1:-1:-1;;;;;2957:185:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9677:503;9832:12;9799:10;9811;12524:43;:3;9799:10;9811;12524:43;:22;:43;:::i;:::-;12505:144;;;;;;;-1:-1:-1;;;;;12505:144:4;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;-1:-1:-1;;;;;;;;;;;12505:144:4;;;;;;;;;;;;;;;9963:56;:3;9987:15;10004:14;9963:56;:23;:56;:::i;:::-;9944:208;;;;;;;-1:-1:-1;;;;;9944:208:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9203:153;9280:14;9311:38;:3;9330:8;9340;9311:38;:18;:38;:::i;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;49569:301:8:-;49684:15;49707:10;49771;49783:43;49803:4;49809:16;49783:19;:43::i;:::-;49730:97;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;49730:97:8;;;;;;;-1:-1:-1;;;;;49730:97:8;-1:-1:-1;;;;;49730:97:8;-1:-1:-1;;;49730:97:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;49730:97:8;;;49720:108;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;49720:108:8;;;;;;;;;;;;49841:12;;:24;;;;;;;;;;;49720:108;;-1:-1:-1;;;;;;49841:12:8;;;;-1:-1:-1;49841:20:8;;-1:-1:-1;49841:24:8;;;;;263:2:-1;;-1:-1;49841:24:8;;;;;;;-1:-1:-1;49841:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;49841:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;49841:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;49841:24:8;;49569:301;-1:-1:-1;;;;;49569:301:8:o;12985:563::-;13099:12;13121:10;13176:34;13196:4;13202:7;13176:19;:34::i;:::-;13144:67;;;;;;;;;;;;;-1:-1:-1;;;;;13144:67:8;-1:-1:-1;;;;;13144:67:8;-1:-1:-1;;;13144:67:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;13144:67:8;;;13134:78;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;13134:78:8;;;;;;;;;;;;13237:12;;:36;;;;;;;;;;;;;;;;;;13134:78;;-1:-1:-1;;;;;;13237:12:8;;;;-1:-1:-1;13237:20:8;;-1:-1:-1;13237:36:8;;;;;263:2:-1;;-1:-1;13237:36:8;;;;;;;-1:-1:-1;13237:12:8;:36;;;5:2:-1;;;;30:1;27;20:12;5:2;13237:36:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13237:36:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13237:36:8;13220:177;;;;;;;-1:-1:-1;;;;;13220:177:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13220:177:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13492:7;-1:-1:-1;;;;;13480:44:8;;13501:10;13513;13480:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;13480:44:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13539:4:8;;12985:563;-1:-1:-1;;;;;12985:563:8:o;14214:548::-;14329:12;14349:10;14408:34;14428:4;14434:7;14408:19;:34::i;:::-;14372:71;;;;;;;;;;;;;-1:-1:-1;;;;;14372:71:8;-1:-1:-1;;;;;14372:71:8;-1:-1:-1;;;14372:71:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;14372:71:8;;;14362:82;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;14362:82:8;;;;;;;;;;;;14465:12;;:35;;;;;;;;;;;;;;;;;;14362:82;;-1:-1:-1;;;;;;14465:12:8;;;;-1:-1:-1;14465:20:8;;-1:-1:-1;14465:35:8;;;;;263:2:-1;;-1:-1;14465:35:8;;;;;;;-1:-1:-1;14465:12:8;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;14465:35:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14465:35:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;14465:35:8;14450:170;;;;;;;-1:-1:-1;;;;;14450:170:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14450:170:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14709:7;-1:-1:-1;;;;;14695:45:8;;14718:9;14729:10;14695:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;42570:1077:8;42690:12;42710;42821;42907;42769:8;42779:34;42799:4;42805:7;42779:19;:34::i;:::-;42735:79;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;42735:79:8;;;;;;;-1:-1:-1;;;;;42735:79:8;-1:-1:-1;;;;;42735:79:8;-1:-1:-1;;;42735:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;42735:79:8;;;42725:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;-1:-1;;263:2;259:12;;;254:3;250:22;246:30;340:21;;;311:9;;295:26;;;;377:20;365:33;;42725:90:8;;;;;;;;;;;42846:54;;;;;;;;;42725:90;;-1:-1:-1;42879:8:8;;-1:-1:-1;42889:10:8;;-1:-1:-1;42846:54:8;;;;-1:-1:-1;42846:54:8;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;42846:54:8;;;;;;;;;;-1:-1:-1;42846:54:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;42846:54:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;42846:54:8;;;42836:65;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;42836:65:8;;;;;;;;;;;42932:42;;;;;;;;;42836:65;;-1:-1:-1;42932:42:8;;-1:-1:-1;42932:42:8;-1:-1:-1;42932:42:8;;;;;;;;-1:-1:-1;42932:42:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;42932:42:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;42932:42:8;;;42922:53;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;42922:53:8;;;;;;;;;;;;42991:12;;-1:-1:-1;;;;;43018:26:8;;;;;;;;;;42922:53;;-1:-1:-1;;;;;;42991:12:8;;;;-1:-1:-1;42991:20:8;;-1:-1:-1;43018:26:8;;:38;;-1:-1:-1;43049:6:8;;42991:12;;43018:20;;:26;;;;;;;;;;-1:-1:-1;42991:12:8;43018:26;;;5:2:-1;;;;30:1;27;20:12;5:2;43018:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;43018:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;43018:26:8;;:38;:30;:38;:::i;:::-;42991:66;;;;;-1:-1:-1;;;42991:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;42991:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;42991:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;42991:66:8;42983:190;;;;;;;-1:-1:-1;;;;;42983:190:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;42983:190:8;;;;-1:-1:-1;;;;;;;;;;;42983:190:8;;;;-1:-1:-1;;;;;;;;;;;42983:190:8;;;;-1:-1:-1;;;;;;;;;;;42983:190:8;;;;;;;;;;;;;;;43187:12;;43214:26;;;-1:-1:-1;;;;;43214:26:8;;;;;;;;;;-1:-1:-1;;;;;43187:12:8;;;;:20;;43208:4;;43214:38;;43245:6;;43187:12;;43214:20;;:26;;;;;;;;;;;;;;43187:12;;43214:26;;;5:2:-1;;;;30:1;27;20:12;43214:38:8;43187:66;;;;;-1:-1:-1;;;43187:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;43187:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;43187:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;43187:66:8;43179:190;;;;;;;-1:-1:-1;;;;;43179:190:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;43179:190:8;;;;-1:-1:-1;;;;;;;;;;;43179:190:8;;;;-1:-1:-1;;;;;;;;;;;43179:190:8;;;;-1:-1:-1;;;;;;;;;;;43179:190:8;;;;;;;;;;;;;;;43383:12;;43410:26;;;-1:-1:-1;;;;;43410:26:8;;;;;;;;;;-1:-1:-1;;;;;43383:12:8;;;;:20;;43404:4;;43410:38;;43441:6;;43383:12;;43410:20;;:26;;;;;;;;;;;;;;43383:12;;43410:26;;;5:2:-1;;;;30:1;27;20:12;43410:38:8;43383:66;;;;;-1:-1:-1;;;43383:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;43383:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;43383:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;43383:66:8;43375:190;;;;;;;-1:-1:-1;;;;;43375:190:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;43375:190:8;;;;-1:-1:-1;;;;;;;;;;;43375:190:8;;;;-1:-1:-1;;;;;;;;;;;43375:190:8;;;;-1:-1:-1;;;;;;;;;;;43375:190:8;;;;;;;;;;;;;;;43595:7;-1:-1:-1;;;;;43577:46:8;;43585:8;43604:6;43612:10;43577:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;43577:46:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43577:46:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;43577:46:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43637:4:8;;42570:1077;-1:-1:-1;;;;;;;;42570:1077:8:o;58085:377::-;58184:12;58204:10;58270:7;58227:51;;;;;;;;;;;;;-1:-1:-1;;;;;58227:51:8;-1:-1:-1;;;;;58227:51:8;-1:-1:-1;;;58227:51:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;58227:51:8;;;58217:62;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;58217:62:8;;;;;;;;;;;;58293:12;;:31;;;;;;;;;;;;;;;;;58217:62;;-1:-1:-1;;;;;;58293:12:8;;;;-1:-1:-1;58293:20:8;;-1:-1:-1;58293:31:8;;;;;263:2:-1;;-1:-1;58293:31:8;;;;;;;-1:-1:-1;58293:12:8;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;58293:31:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;58293:31:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;58293:31:8;58285:154;;;;;;;-1:-1:-1;;;;;58285:154:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58285:154:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;58453:4:8;;58085:377;-1:-1:-1;;;;58085:377:8:o;56626:379::-;56727:12;56747:10;56812:7;56770:50;;;;;;;;;;;;;-1:-1:-1;;;;;56770:50:8;-1:-1:-1;;;;;56770:50:8;-1:-1:-1;;;56770:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;56770:50:8;;;56760:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;62550:218:8;62646:19;62680:83;62723:39;62748:4;62754:7;62723:24;:39::i;:::-;62680:38;62704:4;62710:7;62680:23;:38::i;:::-;:42;:83;:42;:83;:::i;28789:266::-;28890:12;28910:10;28967:8;28977:34;28997:4;29003:7;28977:19;:34::i;:::-;28933:79;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;28933:79:8;;;;;;;-1:-1:-1;;;;;28933:79:8;-1:-1:-1;;;;;28933:79:8;-1:-1:-1;;;28933:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;28933:79:8;;;28923:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;28923:90:8;;;;;;;;;;;;29026:12;;-1:-1:-1;;;;;29026:24:8;;;;;;;;;;28923:90;;-1:-1:-1;;;;;;29026:12:8;;;;-1:-1:-1;29026:20:8;;-1:-1:-1;29026:24:8;;;;;263:2:-1;;-1:-1;29026:24:8;;;;;;;-1:-1:-1;29026:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;63254:314:8;63347:12;63367:10;63422:8;63390:41;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;63390:41:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;63390:41:8;;;63380:52;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;63380:52:8;;;;;;;;;;;;63453:12;;:33;;;;;;;;;;;;;;;;;63380:52;;-1:-1:-1;;;;;;63453:12:8;;;;-1:-1:-1;63453:20:8;;-1:-1:-1;63453:33:8;;;;;263:2:-1;;-1:-1;63453:33:8;;;;;;;-1:-1:-1;63453:12:8;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;63453:33:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;63453:33:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;63453:33:8;63438:107;;;;;;;-1:-1:-1;;;;;63438:107:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58783:227;58875:10;58893;58959:7;58916:51;;;;;;;;;;;;;-1:-1:-1;;;;;58916:51:8;-1:-1:-1;;;;;58916:51:8;-1:-1:-1;;;58916:51:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;58916:51:8;;;58906:62;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;58906:62:8;;;;;;;;;;;;58981:12;;-1:-1:-1;;;;;58981:24:8;;;;;;;;;;58906:62;;-1:-1:-1;;;;;;58981:12:8;;;;-1:-1:-1;58981:20:8;;-1:-1:-1;58981:24:8;;;;;263:2:-1;;-1:-1;58981:24:8;;;;;;;-1:-1:-1;58981:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;58981:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;58981:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;58981:24:8;;-1:-1:-1;58783:227:8;;;;;;:::o;44343:1137::-;44464:12;44484;44595;44719;44543:8;44553:34;44573:4;44579:7;44553:19;:34::i;:::-;44509:79;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;44509:79:8;;;;;;;-1:-1:-1;;;;;44509:79:8;-1:-1:-1;;;;;44509:79:8;-1:-1:-1;;;44509:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;44509:79:8;;;44499:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;-1:-1;;263:2;259:12;;;254:3;250:22;246:30;340:21;;;311:9;;295:26;;;;377:20;365:33;;44499:90:8;;;;;;;;;;;44620:54;;;;;;;;;44499:90;;-1:-1:-1;44653:8:8;;-1:-1:-1;44663:10:8;;-1:-1:-1;44620:54:8;;;;-1:-1:-1;44620:54:8;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;44620:54:8;;;;;;;;;;-1:-1:-1;44620:54:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;44620:54:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;44620:54:8;;;44610:65;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;44610:65:8;;;;;;;;;;;44744:42;;;;;;;;;44610:65;;-1:-1:-1;44744:42:8;;-1:-1:-1;44744:42:8;-1:-1:-1;44744:42:8;;;;;;;;-1:-1:-1;44744:42:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;44744:42:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;44744:42:8;;;44734:53;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;44734:53:8;;;;;;;;;;;;44809:12;;-1:-1:-1;;;;;44836:26:8;;;;;;;;;;44734:53;;-1:-1:-1;;;;;;44809:12:8;;;;-1:-1:-1;44809:20:8;;-1:-1:-1;44836:26:8;;:38;;-1:-1:-1;44867:6:8;;44809:12;;44836:20;;:26;;;;;;;;;;-1:-1:-1;44809:12:8;44836:26;;;5:2:-1;;;;30:1;27;20:12;5:2;44836:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;44836:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;44836:26:8;;:38;:30;:38;:::i;:::-;44809:66;;;;;-1:-1:-1;;;44809:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;44809:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;44809:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;44809:66:8;44794:197;;;;;;;-1:-1:-1;;;;;44794:197:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;44794:197:8;;;;-1:-1:-1;;;;;;;;;;;44794:197:8;;;;-1:-1:-1;;;;;;;;;;;44794:197:8;;;;-1:-1:-1;;;;;;;;;;;44794:197:8;;;;;;;;;;;;;;;45012:12;;45039:26;;;-1:-1:-1;;;;;45039:26:8;;;;;;;;;;-1:-1:-1;;;;;45012:12:8;;;;:20;;45033:4;;45039:38;;45070:6;;45012:12;;45039:20;;:26;;;;;;;;;;;;;;45012:12;;45039:26;;;5:2:-1;;;;30:1;27;20:12;45039:38:8;45012:66;;;;;-1:-1:-1;;;45012:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;45012:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;45012:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;45012:66:8;44997:197;;;;;;;-1:-1:-1;;;;;44997:197:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;44997:197:8;;;;-1:-1:-1;;;;;;;;;;;44997:197:8;;;;-1:-1:-1;;;;;;;;;;;44997:197:8;;;;-1:-1:-1;;;;;;;;;;;44997:197:8;;;;;;;;;;;;;;;45215:12;;45242:26;;;-1:-1:-1;;;;;45242:26:8;;;;;;;;;;-1:-1:-1;;;;;45215:12:8;;;;:20;;45236:4;;45242:38;;45273:6;;45215:12;;45242:20;;:26;;;;;;;;;;;;;;45215:12;;45242:26;;;5:2:-1;;;;30:1;27;20:12;45242:38:8;45215:66;;;;;-1:-1:-1;;;45215:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;45215:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;45215:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;45215:66:8;45200:197;;;;;;;-1:-1:-1;;;;;45200:197:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;45200:197:8;;;;-1:-1:-1;;;;;;;;;;;45200:197:8;;;;-1:-1:-1;;;;;;;;;;;45200:197:8;;;;-1:-1:-1;;;;;;;;;;;45200:197:8;;;;;;;;;;;;;;;45428:7;-1:-1:-1;;;;;45409:47:8;;45418:8;45437:6;45445:10;45409:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;27455:210:8;27538:11;27557:10;27613:8;27580:42;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;27580:42:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;27580:42:8;;;27570:53;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;15516:420:8;15633:12;15653:10;15711:16;15676:52;;;;;;;;;;;;;-1:-1:-1;;;;;15676:52:8;-1:-1:-1;;;;;15676:52:8;-1:-1:-1;;;15676:52:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;15676:52:8;;;15666:63;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;15666:63:8;;;;;;;;;;;;15750:12;;:44;;;;;;;;;-1:-1:-1;;;;;15750:44:8;;;;;;;;;15666:63;;-1:-1:-1;15750:12:8;;;;;-1:-1:-1;15750:23:8;;-1:-1:-1;15750:44:8;;;;;263:2:-1;;-1:-1;15750:44:8;;;;;;;-1:-1:-1;15750:12:8;:44;;;5:2:-1;;;;30:1;27;20:12;64445:441:8;64543:11;64562:16;64617:15;64741:14;64581:30;64598:4;64581:30;;;;;;;;;;;;;;;;;;:16;:30::i;:::-;64562:49;;64635:32;64652:4;64658:8;64635:16;:32::i;:::-;64617:50;;64758:101;64848:10;64844:2;:14;64759:79;64826:11;64822:2;:15;64760:56;64810:5;64760:45;64773:31;64789:4;64795:8;64773:15;:31::i;:::-;64760:8;;:45;:12;:45;:::i;:::-;:49;:56;:49;:56;:::i;:::-;64759:62;:79;:62;:79;:::i;64758:101::-;64741:118;64445:441;-1:-1:-1;;;;;;;64445:441:8:o;16400:357::-;16488:25;16521:10;16594:23;16579:7;16544:43;;;;;;;;;;;;;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;16544:43:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16544:43:8;;;16534:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16534:54:8;;;;;;;;;;;;16620:12;;:27;;;;;;;;;;;16534:54;;-1:-1:-1;;;;;;16620:12:8;;;;-1:-1:-1;16620:23:8;;-1:-1:-1;16620:27:8;;;;;263:2:-1;;-1:-1;16620:27:8;;;;;;;-1:-1:-1;16620:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16620:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16620:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16620:27:8;;-1:-1:-1;;;;;;16657:22:8;;;16653:100;;16696:15;16689:22;;;;16653:100;16739:7;16732:14;;16653:100;16400:357;;;;;;:::o;1540:174:2:-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61913:271:8;62006:11;62025:10;62092:7;62101:39;62126:4;62132:7;62101:24;:39::i;:::-;62048:93;;;;;;;;;;;;;-1:-1:-1;;;;;62048:93:8;-1:-1:-1;;;;;62048:93:8;-1:-1:-1;;;62048:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;62048:93:8;;;62038:104;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;1143:234:2;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;21583:221:8:-;21668:18;21694:10;21752:8;21717:44;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;63876:211:8;63960:12;63980:10;64035:8;64003:41;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;301:224:2;359:14;;385:6;;381:35;;;408:1;401:8;;;;381:35;-1:-1:-1;433:5:2;;;437:1;433;:5;452;;;;;;;;:10;444:62;;;;;-1:-1:-1;;;;;444:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;697:284;755:14;857:9;873:1;869;:5;;;;;;;;;697:284;-1:-1:-1;;;;697:284:2:o;57484:228:8:-;57577:11;57596:10;57661:7;57619:50;;;;;;;;;;;;;-1:-1:-1;;;;;57619:50:8;-1:-1:-1;;;;;57619:50:8;-1:-1:-1;;;57619:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;57619:50:8;;;57609:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\n/*\n\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n@title TokenIOCurrencyAuthority - Currency Authority Smart Contract for Token, Inc.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n*/\n\ncontract TokenIOCurrencyAuthority is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage */\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n * @notice Constructor method for CurrencyAuthority contract\n * @param _storageContract Address of TokenIOStorage contract\n */\n constructor(address _storageContract) public {\n /**\n * @notice Set the storage contract for the interface\n * @dev This contract will be unable to use the storage constract until\n * @dev Contract address is authorized with the storage contract\n */\n lib.Storage = TokenIOStorage(_storageContract);\n\n // @dev set owner to contract initiator\n owner[msg.sender] = true;\n }\n\n /**\n * @notice Gets balance of sepcified account for a given currency\n * @param currency Currency symbol 'USDx'\n * @param account Sepcified account address\n * @return { \"balance\": \"Returns account balance\"}\n */\n function getTokenBalance(string currency, address account) public view returns (uint balance) {\n return lib.getTokenBalance(currency, account);\n }\n\n /**\n * @notice Gets total supply of specified currency\n * @param currency Currency symbol 'USDx'\n * @return { \"supply\": \"Returns total supply of currency\"}\n */\n function getTokenSupply(string currency) public view returns (uint supply) {\n return lib.getTokenSupply(currency);\n }\n\n /**\n * @notice Updates account status. false: frozen, true: un-frozen\n * @param account Sepcified account address\n * @param isAllowed Frozen status\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function freezeAccount(address account, bool isAllowed, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n // @notice updates account status\n // @dev !!! mutates storage state\n require(\n lib.setAccountStatus(account, isAllowed, issuerFirm),\n \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Sets approval status of specified account\n * @param account Sepcified account address\n * @param isApproved Frozen status\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function approveKYC(address account, bool isApproved, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n // @notice updates kyc approval status\n // @dev !!! mutates storage state\n require(\n lib.setKYCApproval(account, isApproved, issuerFirm),\n \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"\n );\n // @notice updates account statuss\n // @dev !!! mutates storage state\n require(\n lib.setAccountStatus(account, isApproved, issuerFirm),\n \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.setAccountSpendingLimit(account, limit),\n \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.setAccountSpendingPeriod(account, (now + 86400)),\n \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Approves account and deposits specified amount of given currency\n * @param currency Currency symbol of amount to be deposited;\n * @param account Ethereum address of account holder;\n * @param amount Deposit amount for account holder;\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function approveKYCAndDeposit(string currency, address account, uint amount, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n /// @notice updates kyc approval status\n /// @dev !!! mutates storage state\n require(\n lib.setKYCApproval(account, true, issuerFirm),\n \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"\n );\n /// @notice updates kyc approval status\n /// @dev !!! mutates storage state\n require(\n lib.setAccountStatus(account, true, issuerFirm),\n \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.deposit(currency, account, amount, issuerFirm),\n \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.setAccountSpendingLimit(account, limit),\n \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"\n );\n require(\n lib.setAccountSpendingPeriod(account, (now + 86400)),\n \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Sets the spending limit for a given account\n * @param account Ethereum address of account holder;\n * @param limit Spending limit amount for account;\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function setAccountSpendingLimit(address account, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n require(\n lib.setAccountSpendingLimit(account, limit),\n \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Returns the periodic remaining spending amount for an account\n * @param account Ethereum address of account holder;\n * @return {\"spendingRemaining\" : \"Returns the remaining spending amount for the account\"}\n */\n function getAccountSpendingRemaining(address account) public view returns (uint spendingRemaining) {\n return lib.getAccountSpendingRemaining(account);\n }\n\n /**\n * @notice Return the spending limit for an account\n * @param account Ethereum address of account holder\n * @return {\"spendingLimit\" : \"Returns the remaining daily spending limit of the account\"}\n */\n function getAccountSpendingLimit(address account) public view returns (uint spendingLimit) {\n return lib.getAccountSpendingLimit(account);\n }\n\n /**\n * @notice Set the foreign currency exchange rate to USD in basis points\n * @dev NOTE: This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param bpsRate Basis point rate of foreign currency exchange rate to USD\n * @param issuerFirm Firm setting the foreign currency exchange\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function setFxBpsRate(string currency, uint bpsRate, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n require(\n lib.setFxUSDBPSRate(currency, bpsRate),\n \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"\n );\n return true;\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param fxAmount Amount of foreign currency to exchange into USD\n * @return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDAmount(string currency, uint fxAmount) public view returns (uint usdAmount) {\n return lib.getFxUSDAmount(currency, fxAmount);\n }\n\n /**\n * @notice Updates to new forwarded account\n * @param originalAccount [address]\n * @param updatedAccount [address]\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function approveForwardedAccount(address originalAccount, address updatedAccount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n // @notice updatesa forwarded account\n // @dev !!! mutates storage state\n require(\n lib.setForwardedAccount(originalAccount, updatedAccount),\n \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Issues a specified account to recipient account of a given currency\n * @param currency [string] currency symbol\n * @param amount [uint] issuance amount\n * @param issuerFirm Name of the issuer firm with authority on account holder;\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function deposit(string currency, address account, uint amount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n /* require(\n lib.verifyAccount(account),\n \"Error: Account is not verified!\"\n ); */\n // @notice depositing tokens to account\n // @dev !!! mutates storage state\n require(\n lib.deposit(currency, account, amount, issuerFirm),\n \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"\n );\n return true;\n }\n\n /**\n * @notice Withdraws a specified amount of tokens of a given currency\n * @param currency Currency symbol\n * @param account Ethereum address of account holder\n * @param amount Issuance amount\n * @param issuerFirm Name of the issuer firm with authority on account holder\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function withdraw(string currency, address account, uint amount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) {\n /* require(\n lib.verifyAccount(account),\n \"Error: Account is not verified!\"\n ); */\n // @notice withdrawing from account\n // @dev !!! mutates storage state\n require(\n lib.withdraw(currency, account, amount, issuerFirm),\n \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"\n );\n return true;\n }\n\n /**\n * @notice Ensure only authorized currency firms and authorities can modify protected methods\n * @dev authority must be registered to an authorized firm to use protected methods\n */\n modifier onlyAuthority(string firmName, address authority) {\n // @notice throws if authority account is not registred to the given firm\n require(\n lib.isRegisteredToFirm(firmName, authority),\n \"Error: issuerFirm and/or firm authority are not registered\"\n );\n _;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOCurrencyAuthority.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOCurrencyAuthority.sol", + "exportedSymbols": { + "TokenIOCurrencyAuthority": [ + 906 + ] + }, + "id": 907, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 472, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 473, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 185, + "src": "25:23:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 474, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5226, + "src": "49:30:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 475, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 4607, + "src": "80:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 476, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "918:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 477, + "nodeType": "InheritanceSpecifier", + "src": "918:7:4" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 906, + "linearizedBaseContracts": [ + 906, + 184 + ], + "name": "TokenIOCurrencyAuthority", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 480, + "libraryName": { + "contractScope": null, + "id": 478, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1025:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1019:37:4", + "typeName": { + "contractScope": null, + "id": 479, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1040:15:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 482, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 906, + "src": "1061:19:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 481, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1061:15:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "1279:385:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "1528:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 489, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1528:11:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 491, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "1557:16:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 490, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1542:14:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1542:32:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1528:46:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 494, + "nodeType": "ExpressionStatement", + "src": "1528:46:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 495, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1633:5:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 498, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 496, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1639:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1639:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1633:17:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1653:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1633:24:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "1633:24:4" + } + ] + }, + "documentation": "@notice Constructor method for CurrencyAuthority contract\n@param _storageContract Address of TokenIOStorage contract", + "id": 503, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 484, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 503, + "src": "1246:24:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 483, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1246:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1245:26:4" + }, + "payable": false, + "returnParameters": { + "id": 486, + "nodeType": "ParameterList", + "parameters": [], + "src": "1279:0:4" + }, + "scope": 906, + "src": "1234:430:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 518, + "nodeType": "Block", + "src": "1999:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 514, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 505, + "src": "2034:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 515, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 507, + "src": "2044:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 512, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2014:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 513, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2816, + "src": "2014:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2014:38:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 511, + "id": 517, + "nodeType": "Return", + "src": "2007:45:4" + } + ] + }, + "documentation": "@notice Gets balance of sepcified account for a given currency\n@param currency Currency symbol 'USDx'\n@param account Sepcified account address\n@return { \"balance\": \"Returns account balance\"}", + "id": 519, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 505, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1930:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 504, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1930:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 507, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1947:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1947:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1929:34:4" + }, + "payable": false, + "returnParameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 510, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1985:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 509, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1985:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1984:14:4" + }, + "scope": 906, + "src": "1905:154:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 531, + "nodeType": "Block", + "src": "2320:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 528, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 521, + "src": "2354:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 526, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2335:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 527, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 2746, + "src": "2335:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2335:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 525, + "id": 530, + "nodeType": "Return", + "src": "2328:35:4" + } + ] + }, + "documentation": "@notice Gets total supply of specified currency\n@param currency Currency symbol 'USDx'\n@return { \"supply\": \"Returns total supply of currency\"}", + "id": 532, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 521, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "2269:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 520, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2269:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2268:17:4" + }, + "payable": false, + "returnParameters": { + "id": 525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "2307:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2307:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2306:13:4" + }, + "scope": 906, + "src": "2245:125:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 560, + "nodeType": "Block", + "src": "2863:307:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 551, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 534, + "src": "2997:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 552, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "3006:9:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 553, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "3017:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 549, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2976:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 550, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2210, + "src": "2976:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20667265657a65206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3040:92:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f197396b05ade1cce611708853992e455bcadbeffc759d9c87bb519e9c019f7", + "typeString": "literal_string \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to freeze account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f197396b05ade1cce611708853992e455bcadbeffc759d9c87bb519e9c019f7", + "typeString": "literal_string \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 548, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2957:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2957:185:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 557, + "nodeType": "ExpressionStatement", + "src": "2957:185:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3159:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 547, + "id": 559, + "nodeType": "Return", + "src": "3152:11:4" + } + ] + }, + "documentation": "@notice Updates account status. false: frozen, true: un-frozen\n@param account Sepcified account address\n@param isAllowed Frozen status\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 561, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 541, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "2816:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 542, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "2828:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2828:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 544, + "modifierName": { + "argumentTypes": null, + "id": 540, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "2802:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2802:37:4" + } + ], + "name": "freezeAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 534, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2743:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2743:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 536, + "name": "isAllowed", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2760:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 535, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2760:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 538, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2776:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 537, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2776:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2742:52:4" + }, + "payable": false, + "returnParameters": { + "id": 547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 546, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2849:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 545, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2849:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2848:14:4" + }, + "scope": 906, + "src": "2720:450:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 622, + "nodeType": "Block", + "src": "3661:1019:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 582, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "3798:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 583, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "3807:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 584, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "3819:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 580, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "3779:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 581, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setKYCApproval", + "nodeType": "MemberAccess", + "referencedDeclaration": 2165, + "src": "3779:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3779:51:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f7665206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3842:93:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to approve account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 579, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "3760:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3760:185:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 588, + "nodeType": "ExpressionStatement", + "src": "3760:185:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 592, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4080:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 593, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "4089:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 594, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "4101:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 590, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4059:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 591, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2210, + "src": "4059:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4059:53:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207374617475732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4124:96:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set account status. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 589, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4040:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4040:190:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 598, + "nodeType": "ExpressionStatement", + "src": "4040:190:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 602, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4287:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 603, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 567, + "src": "4296:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 600, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4259:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 601, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4292, + "src": "4259:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4259:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4314:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 599, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4240:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4240:200:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 607, + "nodeType": "ExpressionStatement", + "src": "4240:200:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 611, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4498:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 612, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "4508:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4514:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "src": "4508:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 615, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4507:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 609, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4469:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "4469:28:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4469:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720706572696f6420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4533:109:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4450:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4450:202:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 619, + "nodeType": "ExpressionStatement", + "src": "4450:202:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4669:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 578, + "id": 621, + "nodeType": "Return", + "src": "4662:11:4" + } + ] + }, + "documentation": "@notice Sets approval status of specified account\n@param account Sepcified account address\n@param isApproved Frozen status\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 623, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 572, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "3614:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "3626:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3626:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 575, + "modifierName": { + "argumentTypes": null, + "id": 571, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "3600:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3600:37:4" + } + ], + "name": "approveKYC", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 563, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3528:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 562, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3528:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 565, + "name": "isApproved", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3545:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3545:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 567, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3562:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 566, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3562:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 569, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3574:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 568, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3574:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3527:65:4" + }, + "payable": false, + "returnParameters": { + "id": 578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 577, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3647:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 576, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3647:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3646:14:4" + }, + "scope": 906, + "src": "3508:1172:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 697, + "nodeType": "Block", + "src": "5310:1207:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 646, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5449:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5458:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "id": 648, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5464:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 644, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5430:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 645, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setKYCApproval", + "nodeType": "MemberAccess", + "referencedDeclaration": 2165, + "src": "5430:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5430:45:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f7665206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5487:93:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to approve account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 643, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5411:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:179:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 652, + "nodeType": "ExpressionStatement", + "src": "5411:179:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 656, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5731:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5740:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "id": 658, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5746:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 654, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5710:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 655, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2210, + "src": "5710:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5710:47:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207374617475732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5769:96:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set account status. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 653, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5691:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5691:184:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 662, + "nodeType": "ExpressionStatement", + "src": "5691:184:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 666, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "5916:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 667, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5926:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 668, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 629, + "src": "5935:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 669, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5943:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 664, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5904:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 3619, + "src": "5904:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5904:50:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f206465706f7369742066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5966:91:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 663, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5885:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5885:182:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 673, + "nodeType": "ExpressionStatement", + "src": "5885:182:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "6124:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 631, + "src": "6133:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 675, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "6096:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 676, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4292, + "src": "6096:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6096:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6151:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 674, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6077:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6077:200:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 682, + "nodeType": "ExpressionStatement", + "src": "6077:200:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 686, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "6335:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 687, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "6345:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6351:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "src": "6345:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 690, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6344:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 684, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "6306:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 685, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "6306:28:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6306:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720706572696f6420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6370:109:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 683, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6287:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6287:202:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 694, + "nodeType": "ExpressionStatement", + "src": "6287:202:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6506:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 642, + "id": 696, + "nodeType": "Return", + "src": "6499:11:4" + } + ] + }, + "documentation": "@notice Approves account and deposits specified amount of given currency\n@param currency Currency symbol of amount to be deposited;\n@param account Ethereum address of account holder;\n@param amount Deposit amount for account holder;\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 698, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 636, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5263:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 637, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "5275:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5275:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 639, + "modifierName": { + "argumentTypes": null, + "id": 635, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "5249:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5249:37:4" + } + ], + "name": "approveKYCAndDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 634, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 625, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5164:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 624, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5164:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 627, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5181:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 626, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5181:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 629, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5198:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 628, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5198:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 631, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5211:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 630, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5211:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 633, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5223:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 632, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5223:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5163:78:4" + }, + "payable": false, + "returnParameters": { + "id": 642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 641, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5296:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 640, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5296:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5295:14:4" + }, + "scope": 906, + "src": "5134:1383:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 725, + "nodeType": "Block", + "src": "7032:228:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 717, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "7085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 718, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 702, + "src": "7094:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 715, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "7057:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 716, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4292, + "src": "7057:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7057:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7110:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "7040:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7040:194:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 722, + "nodeType": "ExpressionStatement", + "src": "7040:194:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7249:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 713, + "id": 724, + "nodeType": "Return", + "src": "7242:11:4" + } + ] + }, + "documentation": "@notice Sets the spending limit for a given account\n@param account Ethereum address of account holder;\n@param limit Spending limit amount for account;\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 726, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 707, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "6985:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 708, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "6997:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6997:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 710, + "modifierName": { + "argumentTypes": null, + "id": 706, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "6971:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6971:37:4" + } + ], + "name": "setAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 700, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6916:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6916:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 702, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6933:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 701, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6933:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 704, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6945:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 703, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6945:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6915:48:4" + }, + "payable": false, + "returnParameters": { + "id": 713, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 712, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "7018:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 711, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7018:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7017:14:4" + }, + "scope": 906, + "src": "6883:377:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 738, + "nodeType": "Block", + "src": "7612:62:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 735, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 728, + "src": "7659:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 733, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "7627:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 734, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getAccountSpendingRemaining", + "nodeType": "MemberAccess", + "referencedDeclaration": 4492, + "src": "7627:31:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7627:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 732, + "id": 737, + "nodeType": "Return", + "src": "7620:47:4" + } + ] + }, + "documentation": "@notice Returns the periodic remaining spending amount for an account\n@param account Ethereum address of account holder;\n@return {\"spendingRemaining\" : \"Returns the remaining spending amount for the account\"}", + "id": 739, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingRemaining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 729, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 728, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 739, + "src": "7550:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 727, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7550:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7549:17:4" + }, + "payable": false, + "returnParameters": { + "id": 732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 731, + "name": "spendingRemaining", + "nodeType": "VariableDeclaration", + "scope": 739, + "src": "7588:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 730, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7588:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7587:24:4" + }, + "scope": 906, + "src": "7513:161:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 751, + "nodeType": "Block", + "src": "7996:58:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 748, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 741, + "src": "8039:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 746, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "8011:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 747, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4318, + "src": "8011:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8011:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 745, + "id": 750, + "nodeType": "Return", + "src": "8004:43:4" + } + ] + }, + "documentation": "@notice Return the spending limit for an account\n@param account Ethereum address of account holder\n@return {\"spendingLimit\" : \"Returns the remaining daily spending limit of the account\"}", + "id": 752, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 741, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "7938:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 740, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7938:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7937:17:4" + }, + "payable": false, + "returnParameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 744, + "name": "spendingLimit", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "7976:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 743, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7976:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7975:20:4" + }, + "scope": 906, + "src": "7905:149:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 779, + "nodeType": "Block", + "src": "8701:194:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 771, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 754, + "src": "8746:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 772, + "name": "bpsRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "8756:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 769, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "8726:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFxUSDBPSRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4526, + "src": "8726:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8726:38:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742046582055534420626173697320706f696e747320726174652e20506c6561736520656e73757265206973737565724669726d20697320617574686f72697a6564", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8774:87:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb75f554926078abd19b386958c530b812c30dcf00b22d8f88e84ef51c06cb71", + "typeString": "literal_string \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"" + }, + "value": "Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb75f554926078abd19b386958c530b812c30dcf00b22d8f88e84ef51c06cb71", + "typeString": "literal_string \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"" + } + ], + "id": 768, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8709:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8709:160:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 776, + "nodeType": "ExpressionStatement", + "src": "8709:160:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8884:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 767, + "id": 778, + "nodeType": "Return", + "src": "8877:11:4" + } + ] + }, + "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev NOTE: This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@param issuerFirm Firm setting the foreign currency exchange\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 780, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 761, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 758, + "src": "8654:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 762, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "8666:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8666:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 764, + "modifierName": { + "argumentTypes": null, + "id": 760, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "8640:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8640:37:4" + } + ], + "name": "setFxBpsRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 754, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8583:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 753, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8583:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 756, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8600:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 755, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8600:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 758, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8614:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 757, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8614:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8582:50:4" + }, + "payable": false, + "returnParameters": { + "id": 767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 766, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8687:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 765, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8687:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8686:14:4" + }, + "scope": 906, + "src": "8561:334:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 795, + "nodeType": "Block", + "src": "9296:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 791, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "9330:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 792, + "name": "fxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 784, + "src": "9340:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 789, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "9311:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFxUSDAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4605, + "src": "9311:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9311:38:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 788, + "id": 794, + "nodeType": "Return", + "src": "9304:45:4" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", + "id": 796, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 782, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9227:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 781, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9227:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 784, + "name": "fxAmount", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9244:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 783, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9244:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9226:32:4" + }, + "payable": false, + "returnParameters": { + "id": 788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 787, + "name": "usdAmount", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9280:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9280:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9279:16:4" + }, + "scope": 906, + "src": "9203:153:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 823, + "nodeType": "Block", + "src": "9846:334:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 815, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 798, + "src": "9987:15:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 816, + "name": "updatedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 800, + "src": "10004:14:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 813, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "9963:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setForwardedAccount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2244, + "src": "9963:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) returns (bool)" + } + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9963:56:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420666f72776172646564206164647265737320666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10031:111:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6961bf7e2117bb8ea6b863d500e7333e3944d065ba6c8fa1114eacec3e93704", + "typeString": "literal_string \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e6961bf7e2117bb8ea6b863d500e7333e3944d065ba6c8fa1114eacec3e93704", + "typeString": "literal_string \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 812, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "9944:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9944:208:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 820, + "nodeType": "ExpressionStatement", + "src": "9944:208:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10169:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 811, + "id": 822, + "nodeType": "Return", + "src": "10162:11:4" + } + ] + }, + "documentation": "@notice Updates to new forwarded account\n@param originalAccount [address]\n@param updatedAccount [address]\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 824, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 802, + "src": "9799:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 806, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "9811:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9811:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 808, + "modifierName": { + "argumentTypes": null, + "id": 804, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "9785:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9785:37:4" + } + ], + "name": "approveForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 798, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9710:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9710:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 800, + "name": "updatedAccount", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9735:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 799, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9735:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 802, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9759:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 801, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9759:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9709:68:4" + }, + "payable": false, + "returnParameters": { + "id": 811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 810, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9832:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 809, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9832:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9831:14:4" + }, + "scope": 906, + "src": "9677:503:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "10700:426:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 845, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "10947:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 846, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "10957:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 847, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "10966:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "10974:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 843, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "10935:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 3619, + "src": "10935:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10935:50:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f206465706f7369742066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10997:91:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 842, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "10916:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10916:182:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 852, + "nodeType": "ExpressionStatement", + "src": "10916:182:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11115:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 841, + "id": 854, + "nodeType": "Return", + "src": "11108:11:4" + } + ] + }, + "documentation": "@notice Issues a specified account to recipient account of a given currency\n@param currency [string] currency symbol\n@param amount [uint] issuance amount\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 835, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "10653:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "10665:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10665:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 838, + "modifierName": { + "argumentTypes": null, + "id": 834, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "10639:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10639:37:4" + } + ], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 833, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 826, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10566:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 825, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10566:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 828, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10583:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10583:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 830, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10600:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 829, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10600:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 832, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10613:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 831, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10613:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10565:66:4" + }, + "payable": false, + "returnParameters": { + "id": 841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 840, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10686:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 839, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10686:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10685:14:4" + }, + "scope": 906, + "src": "10549:577:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 887, + "nodeType": "Block", + "src": "11678:468:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 877, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "11922:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 878, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "11932:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 879, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 862, + "src": "11941:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 880, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 864, + "src": "11949:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 875, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "11909:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 3730, + "src": "11909:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11909:51:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2077697468647261772066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f7269747920617265207265676973746572656420616e642068617665206973737565642066756e647320746861742063616e2062652077697468647261776e", + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11972:136:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6e626bbbdfa2315c15e2b539714496598c6d0294b7989222c4553c1a4a17622", + "typeString": "literal_string \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"" + }, + "value": "Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d6e626bbbdfa2315c15e2b539714496598c6d0294b7989222c4553c1a4a17622", + "typeString": "literal_string \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"" + } + ], + "id": 874, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "11890:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11890:228:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "11890:228:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12135:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 873, + "id": 886, + "nodeType": "Return", + "src": "12128:11:4" + } + ] + }, + "documentation": "@notice Withdraws a specified amount of tokens of a given currency\n@param currency Currency symbol\n@param account Ethereum address of account holder\n@param amount Issuance amount\n@param issuerFirm Name of the issuer firm with authority on account holder\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 888, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 867, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 864, + "src": "11631:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "11643:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11643:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 870, + "modifierName": { + "argumentTypes": null, + "id": 866, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "11617:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11617:37:4" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 865, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11544:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 857, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11544:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 860, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11561:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11561:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 862, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11578:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 861, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11578:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 864, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11591:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 863, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11591:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11543:66:4" + }, + "payable": false, + "returnParameters": { + "id": 873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 872, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11664:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 871, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11664:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11663:14:4" + }, + "scope": 906, + "src": "11526:620:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 904, + "nodeType": "Block", + "src": "12413:254:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 890, + "src": "12547:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 898, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "12557:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 895, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "12524:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 896, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3916, + "src": "12524:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12524:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a206973737565724669726d20616e642f6f72206669726d20617574686f7269747920617265206e6f742072656769737465726564", + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12579:60:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_462b4c77bf54838ec38a464948b1a941796aa7d982a63221057f242b5bb9741d", + "typeString": "literal_string \"Error: issuerFirm and/or firm authority are not registered\"" + }, + "value": "Error: issuerFirm and/or firm authority are not registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_462b4c77bf54838ec38a464948b1a941796aa7d982a63221057f242b5bb9741d", + "typeString": "literal_string \"Error: issuerFirm and/or firm authority are not registered\"" + } + ], + "id": 894, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "12505:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12505:144:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 902, + "nodeType": "ExpressionStatement", + "src": "12505:144:4" + }, + { + "id": 903, + "nodeType": "PlaceholderStatement", + "src": "12659:1:4" + } + ] + }, + "documentation": "@notice Ensure only authorized currency firms and authorities can modify protected methods\n@dev authority must be registered to an authorized firm to use protected methods", + "id": 905, + "name": "onlyAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 893, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 890, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 905, + "src": "12377:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 889, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12377:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 892, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 905, + "src": "12394:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 891, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12394:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12376:36:4" + }, + "src": "12354:313:4", + "visibility": "internal" + } + ], + "scope": 907, + "src": "881:11789:4" + } + ], + "src": "0:12671:4" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOCurrencyAuthority.sol", + "exportedSymbols": { + "TokenIOCurrencyAuthority": [ + 906 + ] + }, + "id": 907, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 472, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 473, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 185, + "src": "25:23:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 474, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5226, + "src": "49:30:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 475, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 4607, + "src": "80:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 476, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "918:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 477, + "nodeType": "InheritanceSpecifier", + "src": "918:7:4" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 906, + "linearizedBaseContracts": [ + 906, + 184 + ], + "name": "TokenIOCurrencyAuthority", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 480, + "libraryName": { + "contractScope": null, + "id": 478, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1025:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1019:37:4", + "typeName": { + "contractScope": null, + "id": 479, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1040:15:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 482, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 906, + "src": "1061:19:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 481, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1061:15:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "1279:385:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "1528:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 489, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1528:11:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 491, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "1557:16:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 490, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1542:14:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1542:32:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1528:46:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 494, + "nodeType": "ExpressionStatement", + "src": "1528:46:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 495, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1633:5:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 498, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 496, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1639:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1639:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1633:17:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1653:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1633:24:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "1633:24:4" + } + ] + }, + "documentation": "@notice Constructor method for CurrencyAuthority contract\n@param _storageContract Address of TokenIOStorage contract", + "id": 503, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 484, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 503, + "src": "1246:24:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 483, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1246:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1245:26:4" + }, + "payable": false, + "returnParameters": { + "id": 486, + "nodeType": "ParameterList", + "parameters": [], + "src": "1279:0:4" + }, + "scope": 906, + "src": "1234:430:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 518, + "nodeType": "Block", + "src": "1999:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 514, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 505, + "src": "2034:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 515, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 507, + "src": "2044:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 512, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2014:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 513, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2816, + "src": "2014:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2014:38:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 511, + "id": 517, + "nodeType": "Return", + "src": "2007:45:4" + } + ] + }, + "documentation": "@notice Gets balance of sepcified account for a given currency\n@param currency Currency symbol 'USDx'\n@param account Sepcified account address\n@return { \"balance\": \"Returns account balance\"}", + "id": 519, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 505, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1930:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 504, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1930:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 507, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1947:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1947:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1929:34:4" + }, + "payable": false, + "returnParameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 510, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "1985:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 509, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1985:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1984:14:4" + }, + "scope": 906, + "src": "1905:154:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 531, + "nodeType": "Block", + "src": "2320:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 528, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 521, + "src": "2354:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 526, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2335:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 527, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 2746, + "src": "2335:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2335:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 525, + "id": 530, + "nodeType": "Return", + "src": "2328:35:4" + } + ] + }, + "documentation": "@notice Gets total supply of specified currency\n@param currency Currency symbol 'USDx'\n@return { \"supply\": \"Returns total supply of currency\"}", + "id": 532, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 521, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "2269:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 520, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2269:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2268:17:4" + }, + "payable": false, + "returnParameters": { + "id": 525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "2307:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2307:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2306:13:4" + }, + "scope": 906, + "src": "2245:125:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 560, + "nodeType": "Block", + "src": "2863:307:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 551, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 534, + "src": "2997:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 552, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "3006:9:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 553, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "3017:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 549, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "2976:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 550, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2210, + "src": "2976:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20667265657a65206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3040:92:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f197396b05ade1cce611708853992e455bcadbeffc759d9c87bb519e9c019f7", + "typeString": "literal_string \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to freeze account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f197396b05ade1cce611708853992e455bcadbeffc759d9c87bb519e9c019f7", + "typeString": "literal_string \"Error: Unable to freeze account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 548, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2957:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2957:185:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 557, + "nodeType": "ExpressionStatement", + "src": "2957:185:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3159:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 547, + "id": 559, + "nodeType": "Return", + "src": "3152:11:4" + } + ] + }, + "documentation": "@notice Updates account status. false: frozen, true: un-frozen\n@param account Sepcified account address\n@param isAllowed Frozen status\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 561, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 541, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "2816:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 542, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "2828:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2828:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 544, + "modifierName": { + "argumentTypes": null, + "id": 540, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "2802:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2802:37:4" + } + ], + "name": "freezeAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 534, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2743:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2743:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 536, + "name": "isAllowed", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2760:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 535, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2760:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 538, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2776:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 537, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2776:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2742:52:4" + }, + "payable": false, + "returnParameters": { + "id": 547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 546, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "2849:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 545, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2849:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2848:14:4" + }, + "scope": 906, + "src": "2720:450:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 622, + "nodeType": "Block", + "src": "3661:1019:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 582, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "3798:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 583, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "3807:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 584, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "3819:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 580, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "3779:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 581, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setKYCApproval", + "nodeType": "MemberAccess", + "referencedDeclaration": 2165, + "src": "3779:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3779:51:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f7665206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3842:93:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to approve account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 579, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "3760:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3760:185:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 588, + "nodeType": "ExpressionStatement", + "src": "3760:185:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 592, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4080:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 593, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "4089:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 594, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "4101:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 590, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4059:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 591, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2210, + "src": "4059:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4059:53:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207374617475732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4124:96:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set account status. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 589, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4040:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4040:190:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 598, + "nodeType": "ExpressionStatement", + "src": "4040:190:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 602, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4287:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 603, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 567, + "src": "4296:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 600, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4259:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 601, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4292, + "src": "4259:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4259:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4314:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 599, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4240:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4240:200:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 607, + "nodeType": "ExpressionStatement", + "src": "4240:200:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 611, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "4498:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 612, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "4508:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4514:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "src": "4508:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 615, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4507:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 609, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "4469:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "4469:28:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4469:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720706572696f6420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4533:109:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4450:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4450:202:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 619, + "nodeType": "ExpressionStatement", + "src": "4450:202:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4669:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 578, + "id": 621, + "nodeType": "Return", + "src": "4662:11:4" + } + ] + }, + "documentation": "@notice Sets approval status of specified account\n@param account Sepcified account address\n@param isApproved Frozen status\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 623, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 572, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "3614:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "3626:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3626:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 575, + "modifierName": { + "argumentTypes": null, + "id": 571, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "3600:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3600:37:4" + } + ], + "name": "approveKYC", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 563, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3528:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 562, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3528:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 565, + "name": "isApproved", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3545:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3545:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 567, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3562:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 566, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3562:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 569, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3574:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 568, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3574:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3527:65:4" + }, + "payable": false, + "returnParameters": { + "id": 578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 577, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "3647:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 576, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3647:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3646:14:4" + }, + "scope": 906, + "src": "3508:1172:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 697, + "nodeType": "Block", + "src": "5310:1207:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 646, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5449:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5458:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "id": 648, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5464:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 644, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5430:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 645, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setKYCApproval", + "nodeType": "MemberAccess", + "referencedDeclaration": 2165, + "src": "5430:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5430:45:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f7665206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5487:93:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to approve account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2adead5f449a6a2ad329ab364a208ed0d211b31aa2a852e47f50e9ff362b00fc", + "typeString": "literal_string \"Error: Unable to approve account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 643, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5411:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:179:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 652, + "nodeType": "ExpressionStatement", + "src": "5411:179:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 656, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5731:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5740:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "id": 658, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5746:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 654, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5710:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 655, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 2210, + "src": "5710:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,bool,string memory) returns (bool)" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5710:47:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207374617475732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5769:96:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set account status. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d5b494d954ebc1ea25ff613cbe2af5e5e6dee30f2d294a40b95846fb93c0b75b", + "typeString": "literal_string \"Error: Unable to set account status. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 653, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5691:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5691:184:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 662, + "nodeType": "ExpressionStatement", + "src": "5691:184:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 666, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "5916:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 667, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "5926:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 668, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 629, + "src": "5935:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 669, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5943:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 664, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "5904:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 3619, + "src": "5904:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5904:50:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f206465706f7369742066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5966:91:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 663, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5885:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5885:182:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 673, + "nodeType": "ExpressionStatement", + "src": "5885:182:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "6124:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 631, + "src": "6133:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 675, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "6096:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 676, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4292, + "src": "6096:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6096:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6151:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 674, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6077:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6077:200:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 682, + "nodeType": "ExpressionStatement", + "src": "6077:200:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 686, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "6335:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 687, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "6345:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6351:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "src": "6345:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 690, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6344:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 684, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "6306:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 685, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "6306:28:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6306:52:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720706572696f6420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6370:109:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8ea4dffeecef2c14480ec77d7f295f45e20ccebde68ef7164f5662998110ce0", + "typeString": "literal_string \"Error: Unable to set spending period for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 683, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6287:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6287:202:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 694, + "nodeType": "ExpressionStatement", + "src": "6287:202:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6506:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 642, + "id": 696, + "nodeType": "Return", + "src": "6499:11:4" + } + ] + }, + "documentation": "@notice Approves account and deposits specified amount of given currency\n@param currency Currency symbol of amount to be deposited;\n@param account Ethereum address of account holder;\n@param amount Deposit amount for account holder;\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 698, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 636, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "5263:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 637, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "5275:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5275:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 639, + "modifierName": { + "argumentTypes": null, + "id": 635, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "5249:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5249:37:4" + } + ], + "name": "approveKYCAndDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 634, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 625, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5164:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 624, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5164:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 627, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5181:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 626, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5181:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 629, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5198:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 628, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5198:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 631, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5211:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 630, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5211:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 633, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5223:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 632, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5223:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5163:78:4" + }, + "payable": false, + "returnParameters": { + "id": 642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 641, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 698, + "src": "5296:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 640, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5296:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5295:14:4" + }, + "scope": 906, + "src": "5134:1383:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 725, + "nodeType": "Block", + "src": "7032:228:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 717, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "7085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 718, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 702, + "src": "7094:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 715, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "7057:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 716, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4292, + "src": "7057:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7057:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420696e697469616c207370656e64696e67206c696d697420666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7110:116:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3db3df495834b8a5dacc61243eb5b9d04e4582608388cabb972a238d9e98e4fe", + "typeString": "literal_string \"Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "7040:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7040:194:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 722, + "nodeType": "ExpressionStatement", + "src": "7040:194:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7249:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 713, + "id": 724, + "nodeType": "Return", + "src": "7242:11:4" + } + ] + }, + "documentation": "@notice Sets the spending limit for a given account\n@param account Ethereum address of account holder;\n@param limit Spending limit amount for account;\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 726, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 707, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "6985:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 708, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "6997:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6997:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 710, + "modifierName": { + "argumentTypes": null, + "id": 706, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "6971:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6971:37:4" + } + ], + "name": "setAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 700, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6916:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6916:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 702, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6933:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 701, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6933:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 704, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "6945:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 703, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6945:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6915:48:4" + }, + "payable": false, + "returnParameters": { + "id": 713, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 712, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 726, + "src": "7018:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 711, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7018:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7017:14:4" + }, + "scope": 906, + "src": "6883:377:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 738, + "nodeType": "Block", + "src": "7612:62:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 735, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 728, + "src": "7659:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 733, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "7627:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 734, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getAccountSpendingRemaining", + "nodeType": "MemberAccess", + "referencedDeclaration": 4492, + "src": "7627:31:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7627:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 732, + "id": 737, + "nodeType": "Return", + "src": "7620:47:4" + } + ] + }, + "documentation": "@notice Returns the periodic remaining spending amount for an account\n@param account Ethereum address of account holder;\n@return {\"spendingRemaining\" : \"Returns the remaining spending amount for the account\"}", + "id": 739, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingRemaining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 729, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 728, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 739, + "src": "7550:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 727, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7550:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7549:17:4" + }, + "payable": false, + "returnParameters": { + "id": 732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 731, + "name": "spendingRemaining", + "nodeType": "VariableDeclaration", + "scope": 739, + "src": "7588:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 730, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7588:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7587:24:4" + }, + "scope": 906, + "src": "7513:161:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 751, + "nodeType": "Block", + "src": "7996:58:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 748, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 741, + "src": "8039:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 746, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "8011:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 747, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getAccountSpendingLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 4318, + "src": "8011:27:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8011:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 745, + "id": 750, + "nodeType": "Return", + "src": "8004:43:4" + } + ] + }, + "documentation": "@notice Return the spending limit for an account\n@param account Ethereum address of account holder\n@return {\"spendingLimit\" : \"Returns the remaining daily spending limit of the account\"}", + "id": 752, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 741, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "7938:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 740, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7938:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7937:17:4" + }, + "payable": false, + "returnParameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 744, + "name": "spendingLimit", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "7976:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 743, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7976:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7975:20:4" + }, + "scope": 906, + "src": "7905:149:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 779, + "nodeType": "Block", + "src": "8701:194:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 771, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 754, + "src": "8746:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 772, + "name": "bpsRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "8756:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 769, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "8726:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFxUSDBPSRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4526, + "src": "8726:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8726:38:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742046582055534420626173697320706f696e747320726174652e20506c6561736520656e73757265206973737565724669726d20697320617574686f72697a6564", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8774:87:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb75f554926078abd19b386958c530b812c30dcf00b22d8f88e84ef51c06cb71", + "typeString": "literal_string \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"" + }, + "value": "Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb75f554926078abd19b386958c530b812c30dcf00b22d8f88e84ef51c06cb71", + "typeString": "literal_string \"Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized\"" + } + ], + "id": 768, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8709:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8709:160:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 776, + "nodeType": "ExpressionStatement", + "src": "8709:160:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8884:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 767, + "id": 778, + "nodeType": "Return", + "src": "8877:11:4" + } + ] + }, + "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev NOTE: This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@param issuerFirm Firm setting the foreign currency exchange\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 780, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 761, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 758, + "src": "8654:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 762, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "8666:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8666:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 764, + "modifierName": { + "argumentTypes": null, + "id": 760, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "8640:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8640:37:4" + } + ], + "name": "setFxBpsRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 754, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8583:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 753, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8583:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 756, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8600:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 755, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8600:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 758, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8614:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 757, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8614:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8582:50:4" + }, + "payable": false, + "returnParameters": { + "id": 767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 766, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 780, + "src": "8687:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 765, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8687:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8686:14:4" + }, + "scope": 906, + "src": "8561:334:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 795, + "nodeType": "Block", + "src": "9296:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 791, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "9330:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 792, + "name": "fxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 784, + "src": "9340:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 789, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "9311:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFxUSDAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4605, + "src": "9311:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9311:38:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 788, + "id": 794, + "nodeType": "Return", + "src": "9304:45:4" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", + "id": 796, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 782, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9227:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 781, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9227:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 784, + "name": "fxAmount", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9244:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 783, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9244:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9226:32:4" + }, + "payable": false, + "returnParameters": { + "id": 788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 787, + "name": "usdAmount", + "nodeType": "VariableDeclaration", + "scope": 796, + "src": "9280:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9280:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9279:16:4" + }, + "scope": 906, + "src": "9203:153:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 823, + "nodeType": "Block", + "src": "9846:334:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 815, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 798, + "src": "9987:15:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 816, + "name": "updatedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 800, + "src": "10004:14:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 813, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "9963:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setForwardedAccount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2244, + "src": "9963:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) returns (bool)" + } + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9963:56:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420666f72776172646564206164647265737320666f72206163636f756e742e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10031:111:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6961bf7e2117bb8ea6b863d500e7333e3944d065ba6c8fa1114eacec3e93704", + "typeString": "literal_string \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e6961bf7e2117bb8ea6b863d500e7333e3944d065ba6c8fa1114eacec3e93704", + "typeString": "literal_string \"Error: Unable to set forwarded address for account. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 812, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "9944:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9944:208:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 820, + "nodeType": "ExpressionStatement", + "src": "9944:208:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10169:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 811, + "id": 822, + "nodeType": "Return", + "src": "10162:11:4" + } + ] + }, + "documentation": "@notice Updates to new forwarded account\n@param originalAccount [address]\n@param updatedAccount [address]\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 824, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 802, + "src": "9799:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 806, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "9811:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9811:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 808, + "modifierName": { + "argumentTypes": null, + "id": 804, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "9785:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9785:37:4" + } + ], + "name": "approveForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 798, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9710:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9710:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 800, + "name": "updatedAccount", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9735:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 799, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9735:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 802, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9759:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 801, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9759:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9709:68:4" + }, + "payable": false, + "returnParameters": { + "id": 811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 810, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 824, + "src": "9832:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 809, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9832:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9831:14:4" + }, + "scope": 906, + "src": "9677:503:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "10700:426:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 845, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "10947:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 846, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "10957:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 847, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "10966:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "10974:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 843, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "10935:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 3619, + "src": "10935:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10935:50:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f206465706f7369742066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f72697479206172652072656769737465726564", + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10997:91:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + }, + "value": "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_05597560a0a09591bd512c7af73fab8ea943a53c0f5353c4fe6fe2cc72d5d3f2", + "typeString": "literal_string \"Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered\"" + } + ], + "id": 842, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "10916:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10916:182:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 852, + "nodeType": "ExpressionStatement", + "src": "10916:182:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11115:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 841, + "id": 854, + "nodeType": "Return", + "src": "11108:11:4" + } + ] + }, + "documentation": "@notice Issues a specified account to recipient account of a given currency\n@param currency [string] currency symbol\n@param amount [uint] issuance amount\n@param issuerFirm Name of the issuer firm with authority on account holder;\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 835, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "10653:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "10665:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10665:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 838, + "modifierName": { + "argumentTypes": null, + "id": 834, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "10639:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10639:37:4" + } + ], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 833, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 826, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10566:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 825, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10566:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 828, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10583:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10583:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 830, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10600:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 829, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10600:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 832, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10613:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 831, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10613:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10565:66:4" + }, + "payable": false, + "returnParameters": { + "id": 841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 840, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10686:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 839, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10686:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10685:14:4" + }, + "scope": 906, + "src": "10549:577:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 887, + "nodeType": "Block", + "src": "11678:468:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 877, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "11922:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 878, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "11932:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 879, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 862, + "src": "11941:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 880, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 864, + "src": "11949:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 875, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "11909:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 3730, + "src": "11909:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,string memory) returns (bool)" + } + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11909:51:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2077697468647261772066756e64732e20506c6561736520636865636b206973737565724669726d20616e64206669726d20617574686f7269747920617265207265676973746572656420616e642068617665206973737565642066756e647320746861742063616e2062652077697468647261776e", + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11972:136:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6e626bbbdfa2315c15e2b539714496598c6d0294b7989222c4553c1a4a17622", + "typeString": "literal_string \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"" + }, + "value": "Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d6e626bbbdfa2315c15e2b539714496598c6d0294b7989222c4553c1a4a17622", + "typeString": "literal_string \"Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn\"" + } + ], + "id": 874, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "11890:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11890:228:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "11890:228:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12135:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 873, + "id": 886, + "nodeType": "Return", + "src": "12128:11:4" + } + ] + }, + "documentation": "@notice Withdraws a specified amount of tokens of a given currency\n@param currency Currency symbol\n@param account Ethereum address of account holder\n@param amount Issuance amount\n@param issuerFirm Name of the issuer firm with authority on account holder\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 888, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 867, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 864, + "src": "11631:10:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "11643:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11643:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 870, + "modifierName": { + "argumentTypes": null, + "id": 866, + "name": "onlyAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "11617:13:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_address_$", + "typeString": "modifier (string memory,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11617:37:4" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 865, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11544:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 857, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11544:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 860, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11561:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11561:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 862, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11578:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 861, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11578:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 864, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11591:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 863, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11591:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11543:66:4" + }, + "payable": false, + "returnParameters": { + "id": 873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 872, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "11664:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 871, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11664:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11663:14:4" + }, + "scope": 906, + "src": "11526:620:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 904, + "nodeType": "Block", + "src": "12413:254:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "firmName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 890, + "src": "12547:8:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 898, + "name": "authority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "12557:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 895, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 482, + "src": "12524:3:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 896, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegisteredToFirm", + "nodeType": "MemberAccess", + "referencedDeclaration": 3916, + "src": "12524:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (bool)" + } + }, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12524:43:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a206973737565724669726d20616e642f6f72206669726d20617574686f7269747920617265206e6f742072656769737465726564", + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12579:60:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_462b4c77bf54838ec38a464948b1a941796aa7d982a63221057f242b5bb9741d", + "typeString": "literal_string \"Error: issuerFirm and/or firm authority are not registered\"" + }, + "value": "Error: issuerFirm and/or firm authority are not registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_462b4c77bf54838ec38a464948b1a941796aa7d982a63221057f242b5bb9741d", + "typeString": "literal_string \"Error: issuerFirm and/or firm authority are not registered\"" + } + ], + "id": 894, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "12505:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12505:144:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 902, + "nodeType": "ExpressionStatement", + "src": "12505:144:4" + }, + { + "id": 903, + "nodeType": "PlaceholderStatement", + "src": "12659:1:4" + } + ] + }, + "documentation": "@notice Ensure only authorized currency firms and authorities can modify protected methods\n@dev authority must be registered to an authorized firm to use protected methods", + "id": 905, + "name": "onlyAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 893, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 890, + "name": "firmName", + "nodeType": "VariableDeclaration", + "scope": 905, + "src": "12377:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 889, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12377:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 892, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 905, + "src": "12394:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 891, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12394:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12376:36:4" + }, + "src": "12354:313:4", + "visibility": "internal" + } + ], + "scope": 907, + "src": "881:11789:4" + } + ], + "src": "0:12671:4" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0xff0a559183f5bb5c6c65b29fbfee6c3758822664", + "transactionHash": "0xb8da63b98eedf2b31cfd344c8c0441e7bfa435bc3165c4009b0dba9cab129c72" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0x38cf23c52bb4b13f051aec09580a2de845a7fa35", + "transactionHash": "0xe98c7acaee49f62f37f49ce057d9f3bbc5d5440c56c8bad9fa6f18eaf58e5db3" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:22:03.565Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOERC20.json b/deployed/mainnet-v1.0.1/TokenIOERC20.json new file mode 100644 index 0000000..2be6a03 --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIOERC20.json @@ -0,0 +1,12508 @@ +{ + "contractName": "TokenIOERC20", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_tla", + "type": "string" + }, + { + "name": "_version", + "type": "string" + }, + { + "name": "_decimals", + "type": "uint256" + }, + { + "name": "_feeContract", + "type": "address" + }, + { + "name": "_fxUSDBPSRate", + "type": "uint256" + } + ], + "name": "setParams", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "_name", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "_symbol", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "tla", + "outputs": [ + { + "name": "_tla", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "version", + "outputs": [ + { + "name": "_version", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "_decimals", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getFeeParams", + "outputs": [ + { + "name": "bps", + "type": "uint256" + }, + { + "name": "min", + "type": "uint256" + }, + { + "name": "max", + "type": "uint256" + }, + { + "name": "flat", + "type": "uint256" + }, + { + "name": "feeMsg", + "type": "bytes" + }, + { + "name": "feeAccount", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateFees", + "outputs": [ + { + "name": "fees", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deprecateInterface", + "outputs": [ + { + "name": "deprecated", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051602080615539833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a0390941693909317835581541690911790556154c390819061007690396000f3006080604052600436106100ed5763ffffffff60e060020a60003504166306fdde0381146100f2578063095ea7b31461017c57806318160ddd146101b457806323b872dd146101db578063313ce567146102055780634bbc142c1461021a57806352238fdd1461023b57806354fd4d5014610253578063666a342714610268578063666e1b39146102895780636b0235a0146102aa57806370a08231146102bf57806395d89b41146102e0578063a9059cbb146102f5578063be6fc18114610319578063dd62ed3e146103db578063e052f0c814610402578063ebe6ba071461052a578063f2fde38b1461053f575b600080fd5b3480156100fe57600080fd5b50610107610560565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610141578181015183820152602001610129565b50505050905090810190601f16801561016e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018857600080fd5b506101a0600160a060020a0360043516602435610578565b604080519115158252519081900360200190f35b3480156101c057600080fd5b506101c96106e9565b60408051918252519081900360200190f35b3480156101e757600080fd5b506101a0600160a060020a036004358116906024351660443561070d565b34801561021157600080fd5b506101c9610842565b34801561022657600080fd5b506101a0600160a060020a0360043516610866565b34801561024757600080fd5b506101c9600435610922565b34801561025f57600080fd5b5061010761094d565b34801561027457600080fd5b506101a0600160a060020a0360043516610960565b34801561029557600080fd5b506101a0600160a060020a0360043516610a19565b3480156102b657600080fd5b50610107610a2e565b3480156102cb57600080fd5b506101c9600160a060020a0360043516610a41565b3480156102ec57600080fd5b50610107610a66565b34801561030157600080fd5b506101a0600160a060020a0360043516602435610a79565b34801561032557600080fd5b5061032e610bde565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b8381101561039b578181015183820152602001610383565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3480156103e757600080fd5b506101c9600160a060020a0360043581169060243516610c63565b34801561040e57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101a094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975050843595505050506020820135600160a060020a031691604001359050610c90565b34801561053657600080fd5b506101a061110c565b34801561054b57600080fd5b506101a0600160a060020a0360043516611209565b606061057360013063ffffffff61134316565b905090565b600061058b60013063ffffffff6114f816565b15610606576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b6106186001848463ffffffff61164b16565b15156106e0576040805160e560020a62461bcd02815260206004820152607560248201527f4572726f723a20556e61626c6520746f20617070726f766520616c6c6f77616e60448201527f636520666f72207370656e6465722e20506c6561736520656e7375726520737060648201527f656e646572206973206e6f74206e756c6c20616e6420646f6573206e6f74206860848201527f61766520612066726f7a656e2062616c616e63652e000000000000000000000060a482015290519081900360c40190fd5b50600192915050565b60006105736106ff60013063ffffffff611d1c16565b60019063ffffffff611dae16565b600061072060013063ffffffff6114f816565b1561079b576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b6107f86107af60013063ffffffff611d1c16565b60408051808201909152600381527f307830000000000000000000000000000000000000000000000000000000000060208201526001919087908790879063ffffffff611ee616565b15156108385760405160e560020a62461bcd0281526004018080602001828103825260828152602001806153766082913960a00191505060405180910390fd5b5060019392505050565b600061057361085860013063ffffffff611d1c16565b60019063ffffffff6121ce16565b3360009081526020819052604081205460ff1615156108d1576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600061094761093860013063ffffffff61222b16565b6001908463ffffffff6123a616565b92915050565b606061057360013063ffffffff61289716565b3360009081526020819052604081205460ff1615156109cb576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b606061057360013063ffffffff61292916565b6000610947610a5760013063ffffffff611d1c16565b6001908463ffffffff6129bb16565b606061057360013063ffffffff611d1c16565b6000610a8c60013063ffffffff6114f816565b15610b07576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b610b62610b1b60013063ffffffff611d1c16565b60408051808201909152600381527f30783000000000000000000000000000000000000000000000000000000000006020820152600191908690869063ffffffff612b3f16565b15156106e0576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732e60448201527f20506c6561736520636865636b20796f757220706172616d65746572732e0000606482015290519081900360840190fd5b600080808060608180610bf860013063ffffffff61222b16565b9050610c0b60018263ffffffff612e0416565b610c1c60018363ffffffff612e9516565b610c2d60018463ffffffff612f2616565b610c3e60018563ffffffff612fb716565b610c4f60018663ffffffff61304816565b939b929a5090985096509094509092509050565b6000610c89610c7960013063ffffffff611d1c16565b600190858563ffffffff61316b16565b9392505050565b3360009081526020819052604081205460ff161515610cfb576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b610d0c60018963ffffffff61332b16565b1515610d88576040805160e560020a62461bcd02815260206004820152603860248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e206e616d652e60448201527f20506c6561736520636865636b20617267756d656e74732e0000000000000000606482015290519081900360840190fd5b610d9960018863ffffffff61358416565b1515610e15576040805160e560020a62461bcd02815260206004820152603a60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e2073796d626f60448201527f6c2e20506c6561736520636865636b20617267756d656e74732e000000000000606482015290519081900360840190fd5b610e2660018763ffffffff6135ff16565b1515610ea2576040805160e560020a62461bcd02815260206004820152603760248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20544c412e2060448201527f506c6561736520636865636b20617267756d656e74732e000000000000000000606482015290519081900360840190fd5b610eb360018663ffffffff61367d16565b1515610f2f576040805160e560020a62461bcd02815260206004820152603b60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20766572736960448201527f6f6e2e20506c6561736520636865636b20617267756d656e74732e0000000000606482015290519081900360840190fd5b610f416001888663ffffffff6136fb16565b1515610fbd576040805160e560020a62461bcd02815260206004820152603c60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20646563696d60448201527f616c732e20506c6561736520636865636b20617267756d656e74732e00000000606482015290519081900360840190fd5b610fce60018463ffffffff61392716565b151561104a576040805160e560020a62461bcd02815260206004820152603a60248201527f4572726f723a20556e61626c6520746f207365742066656520636f6e7472616360448201527f742e20506c6561736520636865636b20617267756d656e74732e000000000000606482015290519081900360840190fd5b61105c6001888463ffffffff613a3c16565b15156110fe576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a20556e61626c6520746f2073657420667820555344206261736960448201527f7320706f696e747320726174652e20506c6561736520636865636b206172677560648201527f6d656e74732e0000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b506001979650505050505050565b3360009081526020819052604081205460ff161515611177576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b61118860013063ffffffff613c2316565b1515611203576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e61626c6520746f2064657072656361746520636f6e747260448201527f6163742100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600190565b3360009081526020819052604081205460ff161515611274576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a03821615156112d4576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b606060008260405160200180807f746f6b656e2e6e616d6500000000000000000000000000000000000000000000815250600a0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106113d65780518252601f1990920191602091820191016113b7565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547f986e791a000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063986e791a9350602480820193600093509182900301818387803b15801561146657600080fd5b505af115801561147a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156114a357600080fd5b8101908080516401000000008111156114bb57600080fd5b820160208101848111156114ce57600080fd5b81516401000000008111828201871017156114e857600080fd5b50909550505050505b5092915050565b6000808260405160200180807f6465706372656361746564000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061158a5780518252601f19909201916020918201910161156b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b505050506040513d602081101561164157600080fd5b5051949350505050565b600060608180600160a060020a03861615156116d7576040805160e560020a62461bcd02815260206004820152602860248201527f4572726f723a20607370656e6465726020616464726573732063616e6e6f742060448201527f6265206e756c6c2e000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6116e18730611d1c565b92506116f787846116f28a8a613dc3565b613f31565b15611772576040805160e560020a62461bcd02815260206004820152603660248201527f4572726f723a205370656e646572206d757374206e6f7420686176652061206660448201527f726f7a656e2062616c616e6365206469726563746c7900000000000000000000606482015290519081900360840190fd5b8261177d8833613dc3565b6117878989613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b602083106117e15780518252601f1990920191602091820191016117c2565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b602083106118825780518252601f199092019160209182019101611863565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150826118bc8833613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b602083106119045780518252601f1990920191602091820191016118e5565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106119865780518252601f199092019160209182019101611967565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208d5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b1580156119fd57600080fd5b505af1158015611a11573d6000803e3d6000fd5b505050506040513d6020811015611a2757600080fd5b50511580611a33575084155b1515611ad5576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283060448201527f29206265666f72652073657474696e6720616e207570646174656420616c6c6f60648201527f77616e636520666f72207370656e6465722e0000000000000000000000000000608482015290519081900360a40190fd5b86546040805160e060020a63bd02d0f50281526004810184905290518792600160a060020a03169163bd02d0f59160248083019260209291908290030181600087803b158015611b2457600080fd5b505af1158015611b38573d6000803e3d6000fd5b505050506040513d6020811015611b4e57600080fd5b50511015611bcc576040805160e560020a62461bcd02815260206004820152603860248201527f4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d60448201527f73672e73656e64657220746f6b656e2062616c616e63652e0000000000000000606482015290519081900360840190fd5b86546040805160e160020a637152429d02815260048101859052602481018890529051600160a060020a039092169163e2a4853a916044808201926020929091908290030181600087803b158015611c2357600080fd5b505af1158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b50511515611ccf576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b604080518681529051600160a060020a0388169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a35060019695505050505050565b606060008260405160200180807f746f6b656e2e73796d626f6c0000000000000000000000000000000000000000815250600c0182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b6000808260405160200180807f746f6b656e2e737570706c790000000000000000000000000000000000000000815250600c0182805190602001908083835b60208310611e0c5780518252601f199092019160209182019101611ded565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310611e6f5780518252601f199092019160209182019101611e50565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561161757600080fd5b60008080600160a060020a0386161515611f70576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b611f7a893061222b565b9150611f878983876123a6565b9050611f9e8988611f998c8c8a613f98565b614030565b151561201a576040805160e560020a62461bcd02815260206004820152602d60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073706560448201527f6e64696e6720616d6f756e742e00000000000000000000000000000000000000606482015290519081900360840190fd5b61202889898989898961435e565b15156120a4576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b6120bb89898985856120b68f89613048565b61435e565b1515612137576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b61214389898988614a26565b15156121bf576040805160e560020a62461bcd02815260206004820152602e60248201527f4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e6360448201527f6520666f72207370656e6465722e000000000000000000000000000000000000606482015290519081900360840190fd5b50600198975050505050505050565b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e01828051906020019080838360208310611e0c5780518252601f199092019160209182019101611ded565b60008060008360405160200180807f6665652e6163636f756e74000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122bf5780518252601f1990920191602091820191016122a0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561234c57600080fd5b505af1158015612360573d6000803e3d6000fd5b505050506040513d602081101561237657600080fd5b50519050600160a060020a038116151561239a5761239385614cb0565b925061239e565b8092505b505092915050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b602083106124415780518252601f199092019160209182019101612422565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156124a257600080fd5b505af11580156124b6573d6000803e3d6000fd5b505050506040513d60208110156124cc57600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b602083106125625780518252601f199092019160209182019101612543565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156125c357600080fd5b505af11580156125d7573d6000803e3d6000fd5b505050506040513d60208110156125ed57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106126835780518252601f199092019160209182019101612664565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156126e457600080fd5b505af11580156126f8573d6000803e3d6000fd5b505050506040513d602081101561270e57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106127a45780518252601f199092019160209182019101612785565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561280557600080fd5b505af1158015612819573d6000803e3d6000fd5b505050506040513d602081101561282f57600080fd5b505191506128658261285961271061284d8b8863ffffffff614de216565b9063ffffffff614e8116565b9063ffffffff614e9816565b9050848111156128775784955061288b565b838110156128875783955061288b565b8095505b50505050509392505050565b606060008260405160200180807f746f6b656e2e76657273696f6e00000000000000000000000000000000000000815250600d0182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b606060008260405160200180807f746f6b656e2e746c61000000000000000000000000000000000000000000000081525060090182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b600080836129c98685613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b60208310612a115780518252601f1990920191602091820191016129f2565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310612a935780518252601f199092019160209182019101612a74565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015612b0a57600080fd5b505af1158015612b1e573d6000803e3d6000fd5b505050506040513d6020811015612b3457600080fd5b505195945050505050565b60008080600160a060020a0386161515612bc9576040805160e560020a62461bcd02815260206004820152602360248201527f4572726f723a2060746f6020616464726573732063616e6e6f74206265206e7560448201527f6c6c2e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008511612c47576040805160e560020a62461bcd02815260206004820152602960248201527f4572726f723a2060616d6f756e7460206d75737420626520677265617465722060448201527f7468616e207a65726f0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b612c51883061222b565b9150612c5e8883876123a6565b9050612c708833611f998b8b8a613f98565b1515612cec576040805160e560020a62461bcd02815260206004820152603160248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d60448201527f6f756e7420666f72206163636f756e742e000000000000000000000000000000606482015290519081900360840190fd5b612cfa88883389898961435e565b1515612d76576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b612d8888883385856120b68e89613048565b15156110fe576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106130db5780518252601f1990920191602091820191016130bc565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b15801561146657600080fd5b600080846131798786613dc3565b6131838886613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b602083106131dd5780518252601f1990920191602091820191016131be565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b6020831061327e5780518252601f19909201916020918201910161325f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b1580156132f557600080fd5b505af1158015613309573d6000803e3d6000fd5b505050506040513d602081101561331f57600080fd5b50519695505050505050565b604080517f746f6b656e2e6e616d6500000000000000000000000000000000000000000000602080830191909152606060020a3002602a8301528251601e818403018152603e909201928390528151600093849392909182918401908083835b602083106133aa5780518252601f19909201916020918201910161338b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f6e89955000000000000000000000000000000000000000000000000000000000845260048401828152602485019687528b5160448601528b51929950600160a060020a039091169750636e899550965088958b9550909390926064909101919085019080838360005b8381101561345557818101518382015260200161343d565b50505050905090810190601f1680156134825780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156134a257600080fd5b505af11580156134b6573d6000803e3d6000fd5b505050506040513d60208110156134cc57600080fd5b50511515610838576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b604080517f746f6b656e2e73796d626f6c0000000000000000000000000000000000000000602080830191909152606060020a3002602c83015282518083038201815291830192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b604080517f746f6b656e2e746c610000000000000000000000000000000000000000000000602080830191909152606060020a300260298301528251601d818403018152603d90920192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b604080517f746f6b656e2e76657273696f6e00000000000000000000000000000000000000602080830191909152606060020a3002602d83015282516021818403018152604190920192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b6000808360405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e0182805190602001908083835b602083106137595780518252601f19909201916020918201910161373a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106137bc5780518252601f19909201916020918201910161379d565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e160020a637152429d02845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b15801561383a57600080fd5b505af115801561384e573d6000803e3d6000fd5b505050506040513d602081101561386457600080fd5b5051151561391c576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b604080517f6665652e6163636f756e74000000000000000000000000000000000000000000602080830191909152606060020a3002602b8301528251601f818403018152603f909201928390528151600093849392909182918401908083835b602083106139a65780518252601f199092019160209182019101613987565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b1580156134a257600080fd5b6000808360405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b0182805190602001908083835b60208310613a9a5780518252601f199092019160209182019101613a7b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310613afd5780518252601f199092019160209182019101613ade565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e160020a637152429d02845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015613b7b57600080fd5b505af1158015613b8f573d6000803e3d6000fd5b505050506040513d6020811015613ba557600080fd5b5051151561391c576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b600080600160a060020a0383161515613cac576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a2063616e6e6f74206465707265636174652061206e756c6c206160448201527f6464726573732e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080517f6465706372656361746564000000000000000000000000000000000000000000602080830191909152606060020a600160a060020a03871602602b8301528251601f818403018152603f90920192839052815191929182918401908083835b60208310613d2f5780518252601f199092019160209182019101613d10565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fabfdcced00000000000000000000000000000000000000000000000000000000845260048401829052600160248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b1580156134a257600080fd5b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613e575780518252601f199092019160209182019101613e38565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015613ee457600080fd5b505af1158015613ef8573d6000803e3d6000fd5b505050506040513d6020811015613f0e57600080fd5b50519050600160a060020a03811615613f295780925061239e565b83925061239e565b60008083613f3f8685613dc3565b60405160200180807f746f6b656e2e66726f7a656e0000000000000000000000000000000000000000815250600c01838051906020019080838360208310612a115780518252601f1990920191602091820191016129f2565b600080600080613fdd876040805190810160405280600481526020017f55534478000000000000000000000000000000000000000000000000000000008152506121ce565b9250613fe987876121ce565b915061402582600a0a61284d85600a0a61401961271061284d61400c8e8e614f1b565b8c9063ffffffff614de216565b9063ffffffff614de216565b979650505050505050565b600080600061403f8686614f78565b15156140bb576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6140c984612859888861505b565b9150816140d687876150fd565b1015614152576040805160e560020a62461bcd02815260206004820152603360248201527f4572726f723a204163636f756e742063616e6e6f74206578636565642069747360448201527f206461696c79207370656e64206c696d69742e00000000000000000000000000606482015290519081900360840190fd5b8461415d878761518e565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106141f25780518252601f1990920191602091820191016141d3565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e160020a637152429d02845260048401829052602484018a90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b15801561427057600080fd5b505af1158015614284573d6000803e3d6000fd5b505050506040513d602081101561429a57600080fd5b50511515614352576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b50600195945050505050565b60008080600160a060020a03861615156143e8576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876143f38a89613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b6020831061443b5780518252601f19909201916020918201910161441c565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106144bd5780518252601f19909201916020918201910161449e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150876144f78a88613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b6020831061453f5780518252601f199092019160209182019101614520565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106145c15780518252601f1990920191602091820191016145a2565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063e2a4853a9450879361467c93508b92879263bd02d0f5926024808401938290030181600087803b15801561464457600080fd5b505af1158015614658573d6000803e3d6000fd5b505050506040513d602081101561466e57600080fd5b50519063ffffffff61521f16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156146c457600080fd5b505af11580156146d8573d6000803e3d6000fd5b505050506040513d60208110156146ee57600080fd5b50511515614770576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a918491614807918a91869163bd02d0f59160248083019260209291908290030181600087803b1580156147cf57600080fd5b505af11580156147e3573d6000803e3d6000fd5b505050506040513d60208110156147f957600080fd5b50519063ffffffff614e9816565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561484f57600080fd5b505af1158015614863573d6000803e3d6000fd5b505050506040513d602081101561487957600080fd5b505115156148fb576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561497a578181015183820152602001614962565b50505050905090810190601f1680156149a75780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156149da5781810151838201526020016149c2565b50505050905090810190601f168015614a075780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b60008084614a348786613dc3565b614a3e8833613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b60208310614a985780518252601f199092019160209182019101614a79565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b60208310614b395780518252601f199092019160209182019101614b1a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063e2a4853a94508693614bbc93508992879263bd02d0f5926024808401938290030181600087803b15801561464457600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015614c0457600080fd5b505af1158015614c18573d6000803e3d6000fd5b505050506040513d6020811015614c2e57600080fd5b50511515614352576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b60208310614d225780518252601f199092019160209182019101614d03565b51815160209384036101000a60001901801990921691161790526040805192909401829003822089547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015614daf57600080fd5b505af1158015614dc3573d6000803e3d6000fd5b505050506040513d6020811015614dd957600080fd5b50519392505050565b600080831515614df557600091506114f1565b50828202828482811515614e0557fe5b0414610c89576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808284811515614e8f57fe5b04949350505050565b600082820183811015610c89576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b01828051906020019080838360208310611e0c5780518252601f199092019160209182019101611ded565b6000806000614f87858561518e565b915042821115614f9a576001925061239e565b5062015180614fd68585614fd1614fc48561401960016128598361284d428d63ffffffff61521f16565b869063ffffffff614e9816565b6152a4565b1515615052576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6001925061239e565b60008082615069858561518e565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a0281526014018281526020019250505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b60008282111561529e576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106137bc5780518252601f19909201916020918201910161379d560020616c6c6f7765642062792074686520636f6e74726163742e00000000000000746f6b656e2e62616c616e6365000000000000000000000000000000000000004572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d657465727320616e6420656e7375726520746865207370656e646572206861732074686520617070726f76656420616d6f756e74206f662066756e647320746f207472616e736665722e6c6c6f776564207065726d697373696f6e7320776974682073746f726167652075652e20506c6561736520656e7375726520636f6e74726163742068617320614572726f723a20556e61626c6520746f207365742073746f726167652076616c636f6e74726163742e00000000000000000000000000000000000000000000004572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a723058200c9617c9915829e5d747c0f9c842b737ef9886fd2b0e028949cdaf19f2e3bb890029", + "deployedBytecode": "0x6080604052600436106100ed5763ffffffff60e060020a60003504166306fdde0381146100f2578063095ea7b31461017c57806318160ddd146101b457806323b872dd146101db578063313ce567146102055780634bbc142c1461021a57806352238fdd1461023b57806354fd4d5014610253578063666a342714610268578063666e1b39146102895780636b0235a0146102aa57806370a08231146102bf57806395d89b41146102e0578063a9059cbb146102f5578063be6fc18114610319578063dd62ed3e146103db578063e052f0c814610402578063ebe6ba071461052a578063f2fde38b1461053f575b600080fd5b3480156100fe57600080fd5b50610107610560565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610141578181015183820152602001610129565b50505050905090810190601f16801561016e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018857600080fd5b506101a0600160a060020a0360043516602435610578565b604080519115158252519081900360200190f35b3480156101c057600080fd5b506101c96106e9565b60408051918252519081900360200190f35b3480156101e757600080fd5b506101a0600160a060020a036004358116906024351660443561070d565b34801561021157600080fd5b506101c9610842565b34801561022657600080fd5b506101a0600160a060020a0360043516610866565b34801561024757600080fd5b506101c9600435610922565b34801561025f57600080fd5b5061010761094d565b34801561027457600080fd5b506101a0600160a060020a0360043516610960565b34801561029557600080fd5b506101a0600160a060020a0360043516610a19565b3480156102b657600080fd5b50610107610a2e565b3480156102cb57600080fd5b506101c9600160a060020a0360043516610a41565b3480156102ec57600080fd5b50610107610a66565b34801561030157600080fd5b506101a0600160a060020a0360043516602435610a79565b34801561032557600080fd5b5061032e610bde565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b8381101561039b578181015183820152602001610383565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3480156103e757600080fd5b506101c9600160a060020a0360043581169060243516610c63565b34801561040e57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101a094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975050843595505050506020820135600160a060020a031691604001359050610c90565b34801561053657600080fd5b506101a061110c565b34801561054b57600080fd5b506101a0600160a060020a0360043516611209565b606061057360013063ffffffff61134316565b905090565b600061058b60013063ffffffff6114f816565b15610606576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b6106186001848463ffffffff61164b16565b15156106e0576040805160e560020a62461bcd02815260206004820152607560248201527f4572726f723a20556e61626c6520746f20617070726f766520616c6c6f77616e60448201527f636520666f72207370656e6465722e20506c6561736520656e7375726520737060648201527f656e646572206973206e6f74206e756c6c20616e6420646f6573206e6f74206860848201527f61766520612066726f7a656e2062616c616e63652e000000000000000000000060a482015290519081900360c40190fd5b50600192915050565b60006105736106ff60013063ffffffff611d1c16565b60019063ffffffff611dae16565b600061072060013063ffffffff6114f816565b1561079b576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b6107f86107af60013063ffffffff611d1c16565b60408051808201909152600381527f307830000000000000000000000000000000000000000000000000000000000060208201526001919087908790879063ffffffff611ee616565b15156108385760405160e560020a62461bcd0281526004018080602001828103825260828152602001806153766082913960a00191505060405180910390fd5b5060019392505050565b600061057361085860013063ffffffff611d1c16565b60019063ffffffff6121ce16565b3360009081526020819052604081205460ff1615156108d1576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600061094761093860013063ffffffff61222b16565b6001908463ffffffff6123a616565b92915050565b606061057360013063ffffffff61289716565b3360009081526020819052604081205460ff1615156109cb576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b606061057360013063ffffffff61292916565b6000610947610a5760013063ffffffff611d1c16565b6001908463ffffffff6129bb16565b606061057360013063ffffffff611d1c16565b6000610a8c60013063ffffffff6114f816565b15610b07576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20436f6e747261637420686173206265656e206465707265636160448201527f7465642c2063616e6e6f7420706572666f726d206f7065726174696f6e210000606482015290519081900360840190fd5b610b62610b1b60013063ffffffff611d1c16565b60408051808201909152600381527f30783000000000000000000000000000000000000000000000000000000000006020820152600191908690869063ffffffff612b3f16565b15156106e0576040805160e560020a62461bcd02815260206004820152603e60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732e60448201527f20506c6561736520636865636b20796f757220706172616d65746572732e0000606482015290519081900360840190fd5b600080808060608180610bf860013063ffffffff61222b16565b9050610c0b60018263ffffffff612e0416565b610c1c60018363ffffffff612e9516565b610c2d60018463ffffffff612f2616565b610c3e60018563ffffffff612fb716565b610c4f60018663ffffffff61304816565b939b929a5090985096509094509092509050565b6000610c89610c7960013063ffffffff611d1c16565b600190858563ffffffff61316b16565b9392505050565b3360009081526020819052604081205460ff161515610cfb576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b610d0c60018963ffffffff61332b16565b1515610d88576040805160e560020a62461bcd02815260206004820152603860248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e206e616d652e60448201527f20506c6561736520636865636b20617267756d656e74732e0000000000000000606482015290519081900360840190fd5b610d9960018863ffffffff61358416565b1515610e15576040805160e560020a62461bcd02815260206004820152603a60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e2073796d626f60448201527f6c2e20506c6561736520636865636b20617267756d656e74732e000000000000606482015290519081900360840190fd5b610e2660018763ffffffff6135ff16565b1515610ea2576040805160e560020a62461bcd02815260206004820152603760248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20544c412e2060448201527f506c6561736520636865636b20617267756d656e74732e000000000000000000606482015290519081900360840190fd5b610eb360018663ffffffff61367d16565b1515610f2f576040805160e560020a62461bcd02815260206004820152603b60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20766572736960448201527f6f6e2e20506c6561736520636865636b20617267756d656e74732e0000000000606482015290519081900360840190fd5b610f416001888663ffffffff6136fb16565b1515610fbd576040805160e560020a62461bcd02815260206004820152603c60248201527f4572726f723a20556e61626c6520746f2073657420746f6b656e20646563696d60448201527f616c732e20506c6561736520636865636b20617267756d656e74732e00000000606482015290519081900360840190fd5b610fce60018463ffffffff61392716565b151561104a576040805160e560020a62461bcd02815260206004820152603a60248201527f4572726f723a20556e61626c6520746f207365742066656520636f6e7472616360448201527f742e20506c6561736520636865636b20617267756d656e74732e000000000000606482015290519081900360840190fd5b61105c6001888463ffffffff613a3c16565b15156110fe576040805160e560020a62461bcd02815260206004820152604660248201527f4572726f723a20556e61626c6520746f2073657420667820555344206261736960448201527f7320706f696e747320726174652e20506c6561736520636865636b206172677560648201527f6d656e74732e0000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b506001979650505050505050565b3360009081526020819052604081205460ff161515611177576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b61118860013063ffffffff613c2316565b1515611203576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e61626c6520746f2064657072656361746520636f6e747260448201527f6163742100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600190565b3360009081526020819052604081205460ff161515611274576040805160e560020a62461bcd02815260206004820152603960248201526000805160206154788339815191526044820152600080516020615336833981519152606482015290519081900360840190fd5b600160a060020a03821615156112d4576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b606060008260405160200180807f746f6b656e2e6e616d6500000000000000000000000000000000000000000000815250600a0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106113d65780518252601f1990920191602091820191016113b7565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547f986e791a000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063986e791a9350602480820193600093509182900301818387803b15801561146657600080fd5b505af115801561147a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156114a357600080fd5b8101908080516401000000008111156114bb57600080fd5b820160208101848111156114ce57600080fd5b81516401000000008111828201871017156114e857600080fd5b50909550505050505b5092915050565b6000808260405160200180807f6465706372656361746564000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061158a5780518252601f19909201916020918201910161156b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b505050506040513d602081101561164157600080fd5b5051949350505050565b600060608180600160a060020a03861615156116d7576040805160e560020a62461bcd02815260206004820152602860248201527f4572726f723a20607370656e6465726020616464726573732063616e6e6f742060448201527f6265206e756c6c2e000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6116e18730611d1c565b92506116f787846116f28a8a613dc3565b613f31565b15611772576040805160e560020a62461bcd02815260206004820152603660248201527f4572726f723a205370656e646572206d757374206e6f7420686176652061206660448201527f726f7a656e2062616c616e6365206469726563746c7900000000000000000000606482015290519081900360840190fd5b8261177d8833613dc3565b6117878989613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b602083106117e15780518252601f1990920191602091820191016117c2565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b602083106118825780518252601f199092019160209182019101611863565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150826118bc8833613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b602083106119045780518252601f1990920191602091820191016118e5565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106119865780518252601f199092019160209182019101611967565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208d5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b1580156119fd57600080fd5b505af1158015611a11573d6000803e3d6000fd5b505050506040513d6020811015611a2757600080fd5b50511580611a33575084155b1515611ad5576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283060448201527f29206265666f72652073657474696e6720616e207570646174656420616c6c6f60648201527f77616e636520666f72207370656e6465722e0000000000000000000000000000608482015290519081900360a40190fd5b86546040805160e060020a63bd02d0f50281526004810184905290518792600160a060020a03169163bd02d0f59160248083019260209291908290030181600087803b158015611b2457600080fd5b505af1158015611b38573d6000803e3d6000fd5b505050506040513d6020811015611b4e57600080fd5b50511015611bcc576040805160e560020a62461bcd02815260206004820152603860248201527f4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d60448201527f73672e73656e64657220746f6b656e2062616c616e63652e0000000000000000606482015290519081900360840190fd5b86546040805160e160020a637152429d02815260048101859052602481018890529051600160a060020a039092169163e2a4853a916044808201926020929091908290030181600087803b158015611c2357600080fd5b505af1158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b50511515611ccf576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b604080518681529051600160a060020a0388169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a35060019695505050505050565b606060008260405160200180807f746f6b656e2e73796d626f6c0000000000000000000000000000000000000000815250600c0182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b6000808260405160200180807f746f6b656e2e737570706c790000000000000000000000000000000000000000815250600c0182805190602001908083835b60208310611e0c5780518252601f199092019160209182019101611ded565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310611e6f5780518252601f199092019160209182019101611e50565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561161757600080fd5b60008080600160a060020a0386161515611f70576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b611f7a893061222b565b9150611f878983876123a6565b9050611f9e8988611f998c8c8a613f98565b614030565b151561201a576040805160e560020a62461bcd02815260206004820152602d60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073706560448201527f6e64696e6720616d6f756e742e00000000000000000000000000000000000000606482015290519081900360840190fd5b61202889898989898961435e565b15156120a4576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b6120bb89898985856120b68f89613048565b61435e565b1515612137576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b61214389898988614a26565b15156121bf576040805160e560020a62461bcd02815260206004820152602e60248201527f4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e6360448201527f6520666f72207370656e6465722e000000000000000000000000000000000000606482015290519081900360840190fd5b50600198975050505050505050565b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e01828051906020019080838360208310611e0c5780518252601f199092019160209182019101611ded565b60008060008360405160200180807f6665652e6163636f756e74000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122bf5780518252601f1990920191602091820191016122a0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561234c57600080fd5b505af1158015612360573d6000803e3d6000fd5b505050506040513d602081101561237657600080fd5b50519050600160a060020a038116151561239a5761239385614cb0565b925061239e565b8092505b505092915050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b602083106124415780518252601f199092019160209182019101612422565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156124a257600080fd5b505af11580156124b6573d6000803e3d6000fd5b505050506040513d60208110156124cc57600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b602083106125625780518252601f199092019160209182019101612543565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156125c357600080fd5b505af11580156125d7573d6000803e3d6000fd5b505050506040513d60208110156125ed57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106126835780518252601f199092019160209182019101612664565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156126e457600080fd5b505af11580156126f8573d6000803e3d6000fd5b505050506040513d602081101561270e57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106127a45780518252601f199092019160209182019101612785565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561280557600080fd5b505af1158015612819573d6000803e3d6000fd5b505050506040513d602081101561282f57600080fd5b505191506128658261285961271061284d8b8863ffffffff614de216565b9063ffffffff614e8116565b9063ffffffff614e9816565b9050848111156128775784955061288b565b838110156128875783955061288b565b8095505b50505050509392505050565b606060008260405160200180807f746f6b656e2e76657273696f6e00000000000000000000000000000000000000815250600d0182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b606060008260405160200180807f746f6b656e2e746c61000000000000000000000000000000000000000000000081525060090182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106113d65780518252601f1990920191602091820191016113b7565b600080836129c98685613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b60208310612a115780518252601f1990920191602091820191016129f2565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310612a935780518252601f199092019160209182019101612a74565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015612b0a57600080fd5b505af1158015612b1e573d6000803e3d6000fd5b505050506040513d6020811015612b3457600080fd5b505195945050505050565b60008080600160a060020a0386161515612bc9576040805160e560020a62461bcd02815260206004820152602360248201527f4572726f723a2060746f6020616464726573732063616e6e6f74206265206e7560448201527f6c6c2e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008511612c47576040805160e560020a62461bcd02815260206004820152602960248201527f4572726f723a2060616d6f756e7460206d75737420626520677265617465722060448201527f7468616e207a65726f0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b612c51883061222b565b9150612c5e8883876123a6565b9050612c708833611f998b8b8a613f98565b1515612cec576040805160e560020a62461bcd02815260206004820152603160248201527f4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d60448201527f6f756e7420666f72206163636f756e742e000000000000000000000000000000606482015290519081900360840190fd5b612cfa88883389898961435e565b1515612d76576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b612d8888883385856120b68e89613048565b15156110fe576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106130db5780518252601f1990920191602091820191016130bc565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b15801561146657600080fd5b600080846131798786613dc3565b6131838886613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b602083106131dd5780518252601f1990920191602091820191016131be565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b6020831061327e5780518252601f19909201916020918201910161325f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b1580156132f557600080fd5b505af1158015613309573d6000803e3d6000fd5b505050506040513d602081101561331f57600080fd5b50519695505050505050565b604080517f746f6b656e2e6e616d6500000000000000000000000000000000000000000000602080830191909152606060020a3002602a8301528251601e818403018152603e909201928390528151600093849392909182918401908083835b602083106133aa5780518252601f19909201916020918201910161338b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f6e89955000000000000000000000000000000000000000000000000000000000845260048401828152602485019687528b5160448601528b51929950600160a060020a039091169750636e899550965088958b9550909390926064909101919085019080838360005b8381101561345557818101518382015260200161343d565b50505050905090810190601f1680156134825780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156134a257600080fd5b505af11580156134b6573d6000803e3d6000fd5b505050506040513d60208110156134cc57600080fd5b50511515610838576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b604080517f746f6b656e2e73796d626f6c0000000000000000000000000000000000000000602080830191909152606060020a3002602c83015282518083038201815291830192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b604080517f746f6b656e2e746c610000000000000000000000000000000000000000000000602080830191909152606060020a300260298301528251601d818403018152603d90920192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b604080517f746f6b656e2e76657273696f6e00000000000000000000000000000000000000602080830191909152606060020a3002602d83015282516021818403018152604190920192839052815160009384939290918291840190808383602083106133aa5780518252601f19909201916020918201910161338b565b6000808360405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e0182805190602001908083835b602083106137595780518252601f19909201916020918201910161373a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106137bc5780518252601f19909201916020918201910161379d565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e160020a637152429d02845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b15801561383a57600080fd5b505af115801561384e573d6000803e3d6000fd5b505050506040513d602081101561386457600080fd5b5051151561391c576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050565b604080517f6665652e6163636f756e74000000000000000000000000000000000000000000602080830191909152606060020a3002602b8301528251601f818403018152603f909201928390528151600093849392909182918401908083835b602083106139a65780518252601f199092019160209182019101613987565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b1580156134a257600080fd5b6000808360405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b0182805190602001908083835b60208310613a9a5780518252601f199092019160209182019101613a7b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310613afd5780518252601f199092019160209182019101613ade565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e160020a637152429d02845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015613b7b57600080fd5b505af1158015613b8f573d6000803e3d6000fd5b505050506040513d6020811015613ba557600080fd5b5051151561391c576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b600080600160a060020a0383161515613cac576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a2063616e6e6f74206465707265636174652061206e756c6c206160448201527f6464726573732e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080517f6465706372656361746564000000000000000000000000000000000000000000602080830191909152606060020a600160a060020a03871602602b8301528251601f818403018152603f90920192839052815191929182918401908083835b60208310613d2f5780518252601f199092019160209182019101613d10565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fabfdcced00000000000000000000000000000000000000000000000000000000845260048401829052600160248501529451909750600160a060020a03909416955063abfdcced945060448083019491935090918290030181600087803b1580156134a257600080fd5b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310613e575780518252601f199092019160209182019101613e38565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015613ee457600080fd5b505af1158015613ef8573d6000803e3d6000fd5b505050506040513d6020811015613f0e57600080fd5b50519050600160a060020a03811615613f295780925061239e565b83925061239e565b60008083613f3f8685613dc3565b60405160200180807f746f6b656e2e66726f7a656e0000000000000000000000000000000000000000815250600c01838051906020019080838360208310612a115780518252601f1990920191602091820191016129f2565b600080600080613fdd876040805190810160405280600481526020017f55534478000000000000000000000000000000000000000000000000000000008152506121ce565b9250613fe987876121ce565b915061402582600a0a61284d85600a0a61401961271061284d61400c8e8e614f1b565b8c9063ffffffff614de216565b9063ffffffff614de216565b979650505050505050565b600080600061403f8686614f78565b15156140bb576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6140c984612859888861505b565b9150816140d687876150fd565b1015614152576040805160e560020a62461bcd02815260206004820152603360248201527f4572726f723a204163636f756e742063616e6e6f74206578636565642069747360448201527f206461696c79207370656e64206c696d69742e00000000000000000000000000606482015290519081900360840190fd5b8461415d878761518e565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106141f25780518252601f1990920191602091820191016141d3565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e160020a637152429d02845260048401829052602484018a90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b15801561427057600080fd5b505af1158015614284573d6000803e3d6000fd5b505050506040513d602081101561429a57600080fd5b50511515614352576040805160e560020a62461bcd028152602060048201526068602482015260008051602061543883398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b50600195945050505050565b60008080600160a060020a03861615156143e8576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876143f38a89613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b6020831061443b5780518252601f19909201916020918201910161441c565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106144bd5780518252601f19909201916020918201910161449e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150876144f78a88613dc3565b6040516020018080600080516020615356833981519152815250600d0183805190602001908083835b6020831061453f5780518252601f199092019160209182019101614520565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106145c15780518252601f1990920191602091820191016145a2565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063e2a4853a9450879361467c93508b92879263bd02d0f5926024808401938290030181600087803b15801561464457600080fd5b505af1158015614658573d6000803e3d6000fd5b505050506040513d602081101561466e57600080fd5b50519063ffffffff61521f16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156146c457600080fd5b505af11580156146d8573d6000803e3d6000fd5b505050506040513d60208110156146ee57600080fd5b50511515614770576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a918491614807918a91869163bd02d0f59160248083019260209291908290030181600087803b1580156147cf57600080fd5b505af11580156147e3573d6000803e3d6000fd5b505050506040513d60208110156147f957600080fd5b50519063ffffffff614e9816565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561484f57600080fd5b505af1158015614863573d6000803e3d6000fd5b505050506040513d602081101561487957600080fd5b505115156148fb576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561497a578181015183820152602001614962565b50505050905090810190601f1680156149a75780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156149da5781810151838201526020016149c2565b50505050905090810190601f168015614a075780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b60008084614a348786613dc3565b614a3e8833613dc3565b60405160200180807f746f6b656e2e616c6c6f77616e63650000000000000000000000000000000000815250600f0184805190602001908083835b60208310614a985780518252601f199092019160209182019101614a79565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a02815260140193505050506040516020818303038152906040526040518082805190602001908083835b60208310614b395780518252601f199092019160209182019101614b1a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063e2a4853a94508693614bbc93508992879263bd02d0f5926024808401938290030181600087803b15801561464457600080fd5b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015614c0457600080fd5b505af1158015614c18573d6000803e3d6000fd5b505050506040513d6020811015614c2e57600080fd5b50511515614352576040805160e560020a62461bcd0281526020600482015260696024820152600080516020615438833981519152604482015260008051602061541883398151915260648201526000805160206153f8833981519152608482015260008051602061545883398151915260a482015290519081900360c40190fd5b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b60208310614d225780518252601f199092019160209182019101614d03565b51815160209384036101000a60001901801990921691161790526040805192909401829003822089547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015614daf57600080fd5b505af1158015614dc3573d6000803e3d6000fd5b505050506040513d6020811015614dd957600080fd5b50519392505050565b600080831515614df557600091506114f1565b50828202828482811515614e0557fe5b0414610c89576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808284811515614e8f57fe5b04949350505050565b600082820183811015610c89576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b01828051906020019080838360208310611e0c5780518252601f199092019160209182019101611ded565b6000806000614f87858561518e565b915042821115614f9a576001925061239e565b5062015180614fd68585614fd1614fc48561401960016128598361284d428d63ffffffff61521f16565b869063ffffffff614e9816565b6152a4565b1515615052576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b6001925061239e565b60008082615069858561518e565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a0281526014018281526020019250505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e6f5780518252601f199092019160209182019101611e50565b60008282111561529e576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106137bc5780518252601f19909201916020918201910161379d560020616c6c6f7765642062792074686520636f6e74726163742e00000000000000746f6b656e2e62616c616e6365000000000000000000000000000000000000004572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d657465727320616e6420656e7375726520746865207370656e646572206861732074686520617070726f76656420616d6f756e74206f662066756e647320746f207472616e736665722e6c6c6f776564207065726d697373696f6e7320776974682073746f726167652075652e20506c6561736520656e7375726520636f6e74726163742068617320614572726f723a20556e61626c6520746f207365742073746f726167652076616c636f6e74726163742e00000000000000000000000000000000000000000000004572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a723058200c9617c9915829e5d747c0f9c842b737ef9886fd2b0e028949cdaf19f2e3bb890029", + "sourceMap": "1060:8028:5:-;;;1371:465;8:9:-1;5:2;;;30:1;27;20:12;5:2;1371:465:5;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1371:465:5;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1708:46:5;;-1:-1:-1;;;;;;1708:46:5;-1:-1:-1;;;;;1708:46:5;;;;;;;;;1807:24;;;;;;;;1060:8028;;;;;;;;", + "deployedSourceMap": "1060:8028:5:-;;;;;;;;;-1:-1:-1;;;1060:8028:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3417:104;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3417:104:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3417:104:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8099:406;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8099:406:5;-1:-1:-1;;;;;8099:406:5;;;;;;;;;;;;;;;;;;;;;;;;;4593:132;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4593:132:5;;;;;;;;;;;;;;;;;;;;7417:476;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7417:476:5;-1:-1:-1;;;;;7417:476:5;;;;;;;;;;;;4330:134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4330:134:5;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;6385:150:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6385:150:5;;;;;4100:113;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4100:113:5;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;3886:101:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3886:101:5;;;;5306:156;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5306:156:5;-1:-1:-1;;;;;5306:156:5;;;;;3631:110;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3631:110:5;;;;6767:375;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6767:375:5;-1:-1:-1;;;;;6767:375:5;;;;;;;5739:415;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5739:415:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5739:415:5;-1:-1:-1;;;;;5739:415:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5739:415:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4963:183;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4963:183:5;-1:-1:-1;;;;;4963:183:5;;;;;;;;;;2242:1071;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2242:1071:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2242:1071:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2242:1071:5;;;;-1:-1:-1;2242:1071:5;-1:-1:-1;2242:1071:5;;-1:-1:-1;2242:1071:5;;;;;;;;-1:-1:-1;;2242:1071:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2242:1071:5;;;;-1:-1:-1;2242:1071:5;-1:-1:-1;2242:1071:5;;-1:-1:-1;2242:1071:5;;;;;;;;-1:-1:-1;;2242:1071:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2242:1071:5;;;;-1:-1:-1;2242:1071:5;-1:-1:-1;2242:1071:5;;-1:-1:-1;2242:1071:5;;;;;;;;-1:-1:-1;2242:1071:5;;-1:-1:-1;;2242:1071:5;;;-1:-1:-1;;;;2242:1071:5;;;;-1:-1:-1;;;;;2242:1071:5;;;;;;-1:-1:-1;2242:1071:5;;8650:204;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8650:204:5;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;3417:104:5;3454:12;3483:31;:3;3508:4;3483:31;:16;:31;:::i;:::-;3476:38;;3417:104;:::o;8099:406::-;8176:12;8953:39;:3;8986:4;8953:39;:24;:39;:::i;:::-;8952:40;8944:123;;;;;-1:-1:-1;;;;;8944:123:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8305:37;:3;8326:7;8335:6;8305:37;:20;:37;:::i;:::-;8288:191;;;;;;;-1:-1:-1;;;;;8288:191:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8494:4:5;8099:406;;;;:::o;4593:132::-;4637:11;4665:53;4684:33;:3;4711:4;4684:33;:18;:33;:::i;:::-;4665:3;;:53;:18;:53;:::i;7417:476::-;7508:12;8953:39;:3;8986:4;8953:39;:24;:39;:::i;:::-;8952:40;8944:123;;;;;-1:-1:-1;;;;;8944:123:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7641:76;7658:33;:3;7685:4;7658:33;:18;:33;:::i;:::-;7641:76;;;;;;;;;;;;;;;;;:3;;:76;7693:4;;7699:2;;7703:6;;7641:76;:16;:76;:::i;:::-;7624:243;;;;;;-1:-1:-1;;;;;7624:243:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7882:4:5;7417:476;;;;;:::o;4330:134::-;4371:14;4402:55;4423:33;:3;4450:4;4423:33;:18;:33;:::i;:::-;4402:3;;:55;:20;:55;:::i;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;6385:150:5:-;6442:9;6468:60;6486:33;:3;6513:4;6486:33;:18;:33;:::i;:::-;6468:3;;6521:6;6468:60;:17;:60;:::i;:::-;6461:67;6385:150;-1:-1:-1;;6385:150:5:o;4100:113::-;4140:15;4172:34;:3;4200:4;4172:34;:19;:34;:::i;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;3886:101:5:-;3922:11;3950:30;:3;3974:4;3950:30;:15;:30;:::i;5306:156::-;5363:12;5392:63;5412:33;:3;5439:4;5412:33;:18;:33;:::i;:::-;5392:3;;5447:7;5392:63;:19;:63;:::i;3631:110::-;3670:14;3701:33;:3;3728:4;3701:33;:18;:33;:::i;6767:375::-;6840:12;8953:39;:3;8986:4;8953:39;:24;:39;:::i;:::-;8952:40;8944:123;;;;;-1:-1:-1;;;;;8944:123:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6968:66;6981:33;:3;7008:4;6981:33;:18;:33;:::i;:::-;6968:66;;;;;;;;;;;;;;;;;:3;;:66;7016:2;;7020:6;;6968:66;:12;:66;:::i;:::-;6951:165;;;;;;;-1:-1:-1;;;;;6951:165:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5739:415;5784:8;;;;5825:12;5784:8;;5889:33;:3;5916:4;5889:33;:18;:33;:::i;:::-;5867:55;-1:-1:-1;5947:26:5;:3;5867:55;5947:26;:13;:26;:::i;:::-;5983;:3;5997:11;5983:26;:13;:26;:::i;:::-;6019;:3;6033:11;6019:26;:13;:26;:::i;:::-;6055:27;:3;6070:11;6055:27;:14;:27;:::i;:::-;6092:26;:3;6106:11;6092:26;:13;:26;:::i;:::-;5930:217;;;;-1:-1:-1;5930:217:5;;-1:-1:-1;5930:217:5;-1:-1:-1;5930:217:5;;-1:-1:-1;6128:11:5;;-1:-1:-1;5739:415:5;-1:-1:-1;5739:415:5:o;4963:183::-;5037:11;5065:74;5087:33;:3;5114:4;5087:33;:18;:33;:::i;:::-;5065:3;;5122:7;5131;5065:74;:21;:74;:::i;:::-;5058:81;4963:183;-1:-1:-1;;;4963:183:5:o;2242:1071::-;1261:10:1;2439:12:5;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;2469:23:5;:3;2486:5;2469:23;:16;:23;:::i;:::-;2461:100;;;;;;;-1:-1:-1;;;;;2461:100:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2577:27;:3;2596:7;2577:27;:18;:27;:::i;:::-;2569:106;;;;;;;-1:-1:-1;;;;;2569:106:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2691:21;:3;2707:4;2691:21;:15;:21;:::i;:::-;2683:97;;;;;;;-1:-1:-1;;;;;2683:97:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2796:29;:3;2816:8;2796:29;:19;:29;:::i;:::-;2788:109;;;;;;;-1:-1:-1;;;;;2788:109:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2913:40;:3;2934:7;2943:9;2913:40;:20;:40;:::i;:::-;2905:121;;;;;;;-1:-1:-1;;;;;2905:121:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3042:32;:3;3061:12;3042:32;:18;:32;:::i;:::-;3034:111;;;;;;;-1:-1:-1;;;;;3034:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3161:43;:3;3181:7;3190:13;3161:43;:19;:43;:::i;:::-;3153:134;;;;;;;-1:-1:-1;;;;;3153:134:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3302:4:5;2242:1071;;;;;;;;;:::o;8650:204::-;1261:10:1;8706:15:5;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;8739:40:5;:3;8773:4;8739:40;:25;:40;:::i;:::-;8731:97;;;;;;;-1:-1:-1;;;;;8731:97:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8843:4:5;8650:204;:::o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;19044:228:8:-;19133:16;19157:10;19211:15;19180:47;;;;;;;;;;;;;-1:-1:-1;;;;;19180:47:8;-1:-1:-1;;;;;19180:47:8;-1:-1:-1;;;19180:47:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;19180:47:8;;;19170:58;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;19170:58:8;;;;;;;;;;;;19241:12;;:26;;;;;;;;;;;19170:58;;-1:-1:-1;;;;;;19241:12:8;;;;-1:-1:-1;19241:22:8;;-1:-1:-1;19241:26:8;;;;;-1:-1:-1;;;19241:26:8;;;;;;-1:-1:-1;19241:12:8;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;19241:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;19241:26:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;19241:26:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;19241:26:8;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;-1:-1;19241:26:8;;-1:-1:-1;;;;;19044:228:8;;;;;;:::o;55988:230::-;56085:11;56104:10;56159:15;56127:48;;;;;;;;;;;;;-1:-1:-1;;;;;56127:48:8;-1:-1:-1;;;;;56127:48:8;-1:-1:-1;;;56127:48:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;56127:48:8;;;56117:59;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;56117:59:8;;;;;;;;;;;;56189:12;;:24;;;;;;;;;;;56117:59;;-1:-1:-1;;;;;;56189:12:8;;;;-1:-1:-1;56189:20:8;;-1:-1:-1;56189:24:8;;;;;263:2:-1;;-1:-1;56189:24:8;;;;;;;-1:-1:-1;56189:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;56189:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;56189:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;56189:24:8;;55988:230;-1:-1:-1;;;;55988:230:8:o;40660:1217::-;40753:12;40855:22;40753:12;;-1:-1:-1;;;;;40781:14:8;;;;40773:75;;;;;-1:-1:-1;;;;;40773:75:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40880:35;40895:4;40909;40880:14;:35::i;:::-;40855:60;;40937:73;40959:4;40965:8;40975:34;40995:4;41001:7;40975:19;:34::i;:::-;40937:21;:73::i;:::-;:78;40922:158;;;;;-1:-1:-1;;;;;40922:158:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41148:8;41158:37;41178:4;41184:10;41158:19;:37::i;:::-;41197:34;41217:4;41223:7;41197:19;:34::i;:::-;41112:120;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;41112:120:8;;;;;;;-1:-1:-1;;;;;41112:120:8;-1:-1:-1;;;;;41112:120:8;-1:-1:-1;;;41112:120:8;;;;;;-1:-1:-1;;;;;41112:120:8;-1:-1:-1;;;;;41112:120:8;-1:-1:-1;;;41112:120:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;41112:120:8;;;41102:131;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;41102:131:8;;;;;;;;;;;;;;;;41087:146;;41298:8;41308:37;41328:4;41334:10;41308:19;:37::i;:::-;41264:82;;;;;;-1:-1:-1;;;;;;;;;;;41264:82:8;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;41264:82:8;;;;;;;-1:-1:-1;;;;;41264:82:8;-1:-1:-1;;;;;41264:82:8;-1:-1:-1;;;41264:82:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;41264:82:8;;;41254:93;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;41254:93:8;;;;;;;;;;;;41369:12;;-1:-1:-1;;;;;41369:26:8;;;;;;;;;;41254:93;;-1:-1:-1;;;;;;41369:12:8;;;;-1:-1:-1;41369:20:8;;-1:-1:-1;41369:26:8;;;;;263:2:-1;;-1:-1;41369:26:8;;;;;;;-1:-1:-1;41369:12:8;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;41369:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;41369:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;41369:26:8;:31;;:46;;-1:-1:-1;41404:11:8;;41369:46;41354:154;;;;;;;-1:-1:-1;;;;;41354:154:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41530:12;;:26;;;-1:-1:-1;;;;;41530:26:8;;;;;;;;;;41560:6;;-1:-1:-1;;;;;41530:12:8;;:20;;:26;;;;;;;;;;;;;;:12;;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;41530:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;41530:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;41530:26:8;:36;;41515:118;;;;;-1:-1:-1;;;;;41515:118:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41655:12;;:34;;;-1:-1:-1;;;;;41655:34:8;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41655:12:8;;;;:20;;:34;;;;;;;;;;;;;;;:12;;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;41655:34:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;41655:34:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;41655:34:8;41640:165;;;;;;;-1:-1:-1;;;;;41640:165:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;41640:165:8;;;;-1:-1:-1;;;;;;;;;;;41640:165:8;;;;-1:-1:-1;;;;;;;;;;;41640:165:8;;;;-1:-1:-1;;;;;;;;;;;41640:165:8;;;;;;;;;;;;;;;41817:37;;;;;;;;-1:-1:-1;;;;;41817:37:8;;;41826:10;;41817:37;;;;;;;;;-1:-1:-1;41868:4:8;;40660:1217;-1:-1:-1;;;;;;40660:1217:8:o;19669:234::-;19760:18;19786:10;19842:15;19809:49;;;;;;;;;;;;;-1:-1:-1;;;;;19809:49:8;-1:-1:-1;;;;;19809:49:8;-1:-1:-1;;;19809:49:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;19809::8;;;19799:60;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;27455:210:8;27538:11;27557:10;27613:8;27580:42;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;27580:42:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;27580:42:8;;;27570:53;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;27570:53:8;;;;;;;;;;;;27636:12;;-1:-1:-1;;;;;27636:24:8;;;;;;;;;;27570:53;;-1:-1:-1;;;;;;27636:12:8;;;;-1:-1:-1;27636:20:8;;-1:-1:-1;27636:24:8;;;;;263:2:-1;;-1:-1;27636:24:8;;;;;;;-1:-1:-1;27636:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;36259:1201:8;36386:12;;;-1:-1:-1;;;;;36421:18:8;;;;36406:86;;;;;-1:-1:-1;;;;;36406:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36521:35;36536:4;36550;36521:14;:35::i;:::-;36499:57;;36574:40;36588:4;36594:11;36607:6;36574:13;:40::i;:::-;36562:52;;36729:76;36754:4;36760;36766:38;36781:4;36787:8;36797:6;36766:14;:38::i;:::-;36729:24;:76::i;:::-;36714:152;;;;;;;-1:-1:-1;;;;;36714:152:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36932:53;36946:4;36952:8;36962:4;36968:2;36972:6;36980:4;36932:13;:53::i;:::-;36917:127;;;;;;;-1:-1:-1;;;;;36917:127:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37108:84;37122:4;37128:8;37138:4;37144:11;37157:4;37163:28;37173:4;37179:11;37163:9;:28::i;:::-;37108:13;:84::i;:::-;37093:162;;;;;;;-1:-1:-1;;;;;37093:162:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37330:45;37346:4;37352:8;37362:4;37368:6;37330:15;:45::i;:::-;37315:122;;;;;;;-1:-1:-1;;;;;37315:122:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37451:4:8;;36259:1201;-1:-1:-1;;;;;;;;36259:1201:8:o;21583:221::-;21668:18;21694:10;21752:8;21717:44;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;26724:364:8;26815:19;26842:10;26921:18;26897:15;26865:48;;;;;;;;;;;;;-1:-1:-1;;;;;26865:48:8;-1:-1:-1;;;;;26865:48:8;-1:-1:-1;;;26865:48:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;26865:48:8;;;26855:59;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26855:59:8;;;;;;;;;;;;26942:12;;:27;;;;;;;;;;;26855:59;;-1:-1:-1;;;;;;26942:12:8;;;;-1:-1:-1;26942:23:8;;-1:-1:-1;26942:27:8;;;;;263:2:-1;;-1:-1;26942:27:8;;;;;;;-1:-1:-1;26942:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;26942:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26942:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26942:27:8;;-1:-1:-1;;;;;;26979:17:8;;;26975:109;;;27013:26;27034:4;27013:20;:26::i;:::-;27006:33;;;;26975:109;27067:10;27060:17;;26975:109;26724:364;;;;;;:::o;31066:722::-;31211:12;;31242:44;;;;;;;;;;;;-1:-1:-1;;;;;31242:44:8;;;-1:-1:-1;;;31242:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31242:44:8;;;;;;;;31232:55;;-1:-1:-1;;;;;;;;;;;;31211:12:8;;;:20;;31242:44;;;31232:55;;;;;31242:44;31232:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31232:55:8;;;;;;;;;;;;31211:77;;;-1:-1:-1;;;31211:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31211:77:8;;;;;;;-1:-1:-1;31211:77:8;-1:-1:-1;31211:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31211:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31211:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31211:77:8;31308:12;;31339:44;;;;31211:77;31339:44;;;;;;;-1:-1:-1;;;;;31339:44:8;;;-1:-1:-1;;;31339:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31339:44:8;;;;;;;;31329:55;;31211:77;;-1:-1:-1;31308:12:8;;;;:20;;31339:44;;;;;31329:55;;;;;31339:44;31329:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31329:55:8;;;;;;;;;;;;31308:77;;;-1:-1:-1;;;31308:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31308:77:8;;;;;;;-1:-1:-1;31308:77:8;-1:-1:-1;31308:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31308:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31308:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31308:77:8;31405:12;;31436:44;;;;31308:77;31436:44;;;;;;;-1:-1:-1;;;;;31436:44:8;;;-1:-1:-1;;;31436:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31436:44:8;;;;;;;;31426:55;;31308:77;;-1:-1:-1;31405:12:8;;;;:20;;31436:44;;;;;31426:55;;;;;31436:44;31426:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31426:55:8;;;;;;;;;;;;31405:77;;;-1:-1:-1;;;31405:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31405:77:8;;;;;;;-1:-1:-1;31405:77:8;-1:-1:-1;31405:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31405:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31405:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31405:77:8;31503:12;;31534:45;;;;31405:77;31534:45;;;;;;;-1:-1:-1;;;;;31534:45:8;;;-1:-1:-1;;;31534:45:8;;;;;;;26:21:-1;;;22:32;;6:49;;31534:45:8;;;;;;;;31524:56;;31405:77;;-1:-1:-1;31503:12:8;;;;:20;;31534:45;;;;;31524:56;;;;;31534:45;31524:56;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31524:56:8;;;;;;;;;;;;31503:78;;;-1:-1:-1;;;31503:78:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31503:78:8;;;;;;;-1:-1:-1;31503:78:8;-1:-1:-1;31503:78:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31503:78:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31503:78:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31503:78:8;;-1:-1:-1;31599:46:8;31503:78;31600:31;31625:5;31601:18;:6;31612;31601:18;:10;:18;:::i;:::-;31600:24;:31;:24;:31;:::i;:::-;31599:37;:46;:37;:46;:::i;:::-;31587:58;;31663:6;31656:4;:13;31652:132;;;31686:6;31679:13;;;;31652:132;31716:6;31709:4;:13;31705:79;;;31739:6;31732:13;;;;31705:79;31773:4;31766:11;;31705:79;31066:722;;;;;;;;;;:::o;20953:224::-;21045:6;21059:10;21116:15;21082:50;;;;;;;;;;;;;-1:-1:-1;;;;;21082:50:8;-1:-1:-1;;;;;21082:50:8;-1:-1:-1;;;21082:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;21082:50:8;;;21072:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;20319:225:8;20407:15;20430:10;20483:15;20453:46;;;;;;;;;;;;;-1:-1:-1;;;;;20453:46:8;-1:-1:-1;;;;;20453:46:8;-1:-1:-1;;;20453:46:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;20453:46:8;;;20443:57;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;28789:266:8;28890:12;28910:10;28967:8;28977:34;28997:4;29003:7;28977:19;:34::i;:::-;28933:79;;;;;;-1:-1:-1;;;;;;;;;;;28933:79:8;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;28933:79:8;;;;;;;-1:-1:-1;;;;;28933:79:8;-1:-1:-1;;;;;28933:79:8;-1:-1:-1;;;28933:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;28933:79:8;;;28923:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;28923:90:8;;;;;;;;;;;;29026:12;;-1:-1:-1;;;;;29026:24:8;;;;;;;;;;28923:90;;-1:-1:-1;;;;;;29026:12:8;;;;-1:-1:-1;29026:20:8;;-1:-1:-1;29026:24:8;;;;;263:2:-1;;-1:-1;29026:24:8;;;;;;;-1:-1:-1;29026:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;29026:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29026:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29026:24:8;;28789:266;-1:-1:-1;;;;;28789:266:8:o;34221:922::-;34330:12;;;-1:-1:-1;;;;;34358:18:8;;;;34350:67;;;;;-1:-1:-1;;;;;34350:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34440:1;34431:10;;34423:64;;;;;-1:-1:-1;;;;;34423:64:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34516:35;34531:4;34545;34516:14;:35::i;:::-;34494:57;;34569:40;34583:4;34589:11;34602:6;34569:13;:40::i;:::-;34557:52;;34631:82;34656:4;34662:10;34674:38;34689:4;34695:8;34705:6;34674:14;:38::i;34631:82::-;34616:157;;;;;;;-1:-1:-1;;;;;34616:157:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34795:59;34809:4;34815:8;34825:10;34837:2;34841:6;34849:4;34795:13;:59::i;:::-;34780:128;;;;;;;-1:-1:-1;;;;;34780:128:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34972:90;34986:4;34992:8;35002:10;35014:11;35027:4;35033:28;35043:4;35049:11;35033:9;:28::i;34972:90::-;34957:163;;;;;;;-1:-1:-1;;;;;34957:163:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22194:215;22280:11;22299:10;22350:15;22322:44;;;;;;;;;;;;;-1:-1:-1;;;;;22322:44:8;-1:-1:-1;;;;;22322:44:8;-1:-1:-1;;;22322:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22322:44:8;;;22312:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;22789:215:8;22875:11;22894:10;22945:15;22917:44;;;;;;;;;;;;;-1:-1:-1;;;;;22917:44:8;-1:-1:-1;;;;;22917:44:8;-1:-1:-1;;;22917:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22917:44:8;;;22907:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23384:215:8;23470:11;23489:10;23540:15;23512:44;;;;;;;;;;;;;-1:-1:-1;;;;;23512:44:8;-1:-1:-1;;;;;23512:44:8;-1:-1:-1;;;23512:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;23512:44:8;;;23502:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23974:218:8;24061:12;24081:10;24133:15;24104:45;;;;;;;;;;;;;-1:-1:-1;;;;;24104:45:8;-1:-1:-1;;;;;24104:45:8;-1:-1:-1;;;24104:45:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24104:45:8;;;24094:56;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;24580:217:8;24666:12;24686:10;24737:15;24709:44;;;;;;;;;;;;;-1:-1:-1;;;;;24709:44:8;-1:-1:-1;;;;;24709:44:8;-1:-1:-1;;;24709:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24709:44:8;;;24699:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;24699:55:8;;;;;;;;;;;;24767:12;;:25;;;;;;;;;;;24699:55;;-1:-1:-1;;;;;;24767:12:8;;;;-1:-1:-1;24767:21:8;;-1:-1:-1;24767:25:8;;;;;-1:-1:-1;;;24767:25:8;;;;;;-1:-1:-1;24767:12:8;:25;;;5:2:-1;;;;30:1;27;20:12;28056:325:8;28176:14;28198:10;28257:8;28267:34;28287:4;28293:7;28267:19;:34::i;:::-;28303;28323:4;28329:7;28303:19;:34::i;:::-;28221:117;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;28221:117:8;;;;;;;-1:-1:-1;;;;;28221:117:8;-1:-1:-1;;;;;28221:117:8;-1:-1:-1;;;28221:117:8;;;;;;-1:-1:-1;;;;;28221:117:8;-1:-1:-1;;;;;28221:117:8;-1:-1:-1;;;28221:117:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;28221:117:8;;;28211:128;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;28211:128:8;;;;;;;;;;;;28352:12;;-1:-1:-1;;;;;28352:24:8;;;;;;;;;;28211:128;;-1:-1:-1;;;;;;28352:12:8;;;;-1:-1:-1;28352:20:8;;-1:-1:-1;28352:24:8;;;;;263:2:-1;;-1:-1;28352:24:8;;;;;;;-1:-1:-1;28352:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;28352:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;28352:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;28352:24:8;;28056:325;-1:-1:-1;;;;;;28056:325:8:o;2463:366::-;2583:45;;;;;;;;;;;;-1:-1:-1;;;2622:4:8;2583:45;;;;;;;22:32:-1;26:21;;;22:32;6:49;;2583:45:8;;;;;;;;2573:56;;2540:12;;;;2583:45;;;;;2573:56;;;;2583:45;2573:56;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;2573:56:8;;;;;;;;;;;;2650:12;;:37;;;;;;;;;;;;;;;;;;;;;;;2573:56;;-1:-1:-1;;;;;;2650:12:8;;;;-1:-1:-1;2650:22:8;;-1:-1:-1;2573:56:8;;2650:37;;-1:-1:-1;2650:37:8;;;;;;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2650:37:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2650:37:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2650:37:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2650:37:8;2635:172;;;;;;;-1:-1:-1;;;;;2635:172:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2635:172:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3234:374;3358:47;;;;;;;;;;;;-1:-1:-1;;;3399:4:8;3358:47;;;;;;;26:21:-1;;;22:32;;6:49;;3358:47:8;;;;;;;3348:58;;3315:12;;;;3358:47;;;;;3348:58;;;;3358:47;3348:58;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;4031:362:8;4149:44;;;;;;;;;;;;-1:-1:-1;;;4187:4:8;4149:44;;;;;;;22:32:-1;26:21;;;22:32;6:49;;4149:44:8;;;;;;;;4139:55;;4106:12;;;;4149:44;;;;;4139:55;;;;4149:44;4139:55;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;4845:378:8;4971:48;;;;;;;;;;;;-1:-1:-1;;;5013:4:8;4971:48;;;;;;;22:32:-1;26:21;;;22:32;6:49;;4971:48:8;;;;;;;;4961:59;;4928:12;;;;4971:48;;;;;4961:59;;;;4971:48;4961:59;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;5937:390:8;6037:12;6057:10;6115:8;6080:44;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;6080:44:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;6080:44:8;;;6070:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;6070:55:8;;;;;;;;;;;;6146:12;;-1:-1:-1;;;;;6146:39:8;;;;;;;;;;;;;;;;6070:55;;-1:-1:-1;;;;;;6146:12:8;;;;-1:-1:-1;6146:20:8;;-1:-1:-1;6146:39:8;;;;;263:2:-1;;-1:-1;6146:39:8;;;;;;;-1:-1:-1;6146:12:8;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;6146:39:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6146:39:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6146:39:8;6131:174;;;;;;;-1:-1:-1;;;;;6131:174:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6131:174:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6318:4:8;;5937:390;-1:-1:-1;;;;5937:390:8:o;11025:375::-;11150:46;;;;;;;;;;;;-1:-1:-1;;;11190:4:8;11150:46;;;;;;;22:32:-1;26:21;;;22:32;6:49;;11150:46:8;;;;;;;;11140:57;;11107:12;;;;11150:46;;;;;11140:57;;;;11150:46;11140:57;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;11140:57:8;;;;;;;;;;;;11218:12;;:40;;;;;;;;;-1:-1:-1;;;;;11218:40:8;;;;;;;;;11140:57;;-1:-1:-1;11218:12:8;;;;;-1:-1:-1;11218:23:8;;-1:-1:-1;11218:40:8;;;;;263:2:-1;;-1:-1;11218:40:8;;;;;;;-1:-1:-1;11218:12:8;:40;;;5:2:-1;;;;30:1;27;20:12;63254:314:8;63347:12;63367:10;63422:8;63390:41;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;63390:41:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;63390:41:8;;;63380:52;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;63380:52:8;;;;;;;;;;;;63453:12;;-1:-1:-1;;;;;63453:33:8;;;;;;;;;;;;;;;;63380:52;;-1:-1:-1;;;;;;63453:12:8;;;;-1:-1:-1;63453:20:8;;-1:-1:-1;63453:33:8;;;;;263:2:-1;;-1:-1;63453:33:8;;;;;;;-1:-1:-1;63453:12:8;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;63453:33:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;63453:33:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;63453:33:8;63438:107;;;;;;;-1:-1:-1;;;;;63438:107:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55227:457;55320:12;;-1:-1:-1;;;;;55348:22:8;;;;55340:82;;;;;-1:-1:-1;;;;;55340:82:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55452:48;;;;;;;;;;;;-1:-1:-1;;;;;;;;55452:48:8;;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;55452:48:8;;;;;;;;55442:59;;55452:48;;;;;55442:59;;;;55452:48;55442:59;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;55442:59:8;;;;;;;;;;;;55516:12;;:30;;;;;;;;;274:1:-1;55516:30:8;;;;;;55442:59;;-1:-1:-1;;;;;;55516:12:8;;;;-1:-1:-1;55516:20:8;;-1:-1:-1;55516:30:8;;;;;263:2:-1;;-1:-1;55516:30:8;;;;;;;-1:-1:-1;55516:12:8;:30;;;5:2:-1;;;;30:1;27;20:12;16400:357:8;16488:25;16521:10;16594:23;16579:7;16544:43;;;;;;;;;;;;;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;16544:43:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16544:43:8;;;16534:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16534:54:8;;;;;;;;;;;;16620:12;;:27;;;;;;;;;;;16534:54;;-1:-1:-1;;;;;;16620:12:8;;;;-1:-1:-1;16620:23:8;;-1:-1:-1;16620:27:8;;;;;263:2:-1;;-1:-1;16620:27:8;;;;;;;-1:-1:-1;16620:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16620:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16620:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16620:27:8;;-1:-1:-1;;;;;;16657:22:8;;;16653:100;;16696:15;16689:22;;;;16653:100;16739:7;16732:14;;;;29483:277;29590:18;29616:10;29672:8;29682:34;29702:4;29708:7;29682:19;:34::i;:::-;29639:78;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;64445:441:8;64543:11;64562:16;64617:15;64741:14;64581:30;64598:4;64581:30;;;;;;;;;;;;;;;;;;:16;:30::i;:::-;64562:49;;64635:32;64652:4;64658:8;64635:16;:32::i;:::-;64617:50;;64758:101;64848:10;64844:2;:14;64759:79;64826:11;64822:2;:15;64760:56;64810:5;64760:45;64773:31;64789:4;64795:8;64773:15;:31::i;:::-;64760:8;;:45;:12;:45;:::i;:56::-;64759:62;:79;:62;:79;:::i;64758:101::-;64741:118;64445:441;-1:-1:-1;;;;;;;64445:441:8:o;59595:1002::-;59696:12;59924:18;60289:10;59816:42;59844:4;59850:7;59816:27;:42::i;:::-;59808:109;;;;;;;-1:-1:-1;;;;;59808:109:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59945:51;59989:6;59945:39;59970:4;59976:7;59945:24;:39::i;:51::-;59924:72;;60144:13;60102:38;60126:4;60132:7;60102:23;:38::i;:::-;:55;;60087:132;;;;;-1:-1:-1;;;;;60087:132:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60356:7;60365:39;60390:4;60396:7;60365:24;:39::i;:::-;60312:93;;;;;;;;;;;;;-1:-1:-1;;;;;60312:93:8;-1:-1:-1;;;;;60312:93:8;-1:-1:-1;;;60312:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;60312:93:8;;;60302:104;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;60302:104:8;;;;;;;;;;;;60420:12;;-1:-1:-1;;;;;60420:39:8;;;;;;;;;;;;;;;;60302:104;;-1:-1:-1;;;;;;60420:12:8;;;;-1:-1:-1;60420:20:8;;-1:-1:-1;60420:39:8;;;;;263:2:-1;;-1:-1;60420:39:8;;;;;;;-1:-1:-1;60420:12:8;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;60420:39:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;60420:39:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;60420:39:8;60412:162;;;;;;;-1:-1:-1;;;;;60412:162:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;60412:162:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;60588:4:8;;59595:1002;-1:-1:-1;;;;;59595:1002:8:o;38207:943::-;38335:12;;;-1:-1:-1;;;;;38370:18:8;;;;38355:86;;;;;-1:-1:-1;;;;;38355:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38507:8;38517:31;38537:4;38543;38517:19;:31::i;:::-;38473:76;;;;;;-1:-1:-1;;;;;;;;;;;38473:76:8;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38473:76:8;;;;;;;-1:-1:-1;;;;;38473:76:8;-1:-1:-1;;;;;38473:76:8;-1:-1:-1;;;38473:76:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38473:76:8;;;38463:87;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38463:87:8;;;;;;;;;;;;;;;;38448:102;;38615:8;38625:29;38645:4;38651:2;38625:19;:29::i;:::-;38581:74;;;;;;-1:-1:-1;;;;;;;;;;;38581:74:8;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38581:74:8;;;;;;;-1:-1:-1;;;;;38581:74:8;-1:-1:-1;;;;;38581:74:8;-1:-1:-1;;;38581:74:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38581:74:8;;;38571:85;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;38571:85:8;;;;;;;;;;;;38678:12;;-1:-1:-1;;;;;38705:26:8;;;;;;;;;;38571:85;;-1:-1:-1;;;;;;38678:12:8;;;;-1:-1:-1;38678:20:8;;-1:-1:-1;38705:26:8;;:38;;-1:-1:-1;38736:6:8;;38678:12;;38705:20;;:26;;;;;;;;;;-1:-1:-1;38678:12:8;38705:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38705:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38705:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38705:26:8;;:38;:30;:38;:::i;:::-;38678:66;;;;;-1:-1:-1;;;38678:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38678:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38678:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38678:66:8;38663:202;;;;;;;-1:-1:-1;;;;;38663:202:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;38663:202:8;;;;-1:-1:-1;;;;;;;;;;;38663:202:8;;;;-1:-1:-1;;;;;;;;;;;38663:202:8;;;;-1:-1:-1;;;;;;;;;;;38663:202:8;;;;;;;;;;;;;;;38886:12;;38913:26;;;-1:-1:-1;;;;;38913:26:8;;;;;;;;;;-1:-1:-1;;;;;38886:12:8;;;;:20;;38907:4;;38913:38;;38944:6;;38886:12;;38913:20;;:26;;;;;;;;;;;;;;38886:12;;38913:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38913:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38913:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38913:26:8;;:38;:30;:38;:::i;:::-;38886:66;;;;;-1:-1:-1;;;38886:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38886:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38886:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38886:66:8;38871:202;;;;;;;-1:-1:-1;;;;;38871:202:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;38871:202:8;;;;-1:-1:-1;;;;;;;;;;;38871:202:8;;;;-1:-1:-1;;;;;;;;;;;38871:202:8;;;;-1:-1:-1;;;;;;;;;;;38871:202:8;;;;;;;;;;;;;;;39110:2;-1:-1:-1;;;;;39085:42:8;39104:4;-1:-1:-1;;;;;39085:42:8;;39094:8;39114:6;39122:4;39085:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39085:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39085:42:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39085:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39141:4:8;;38207:943;-1:-1:-1;;;;;;;;38207:943:8:o;39704:499::-;39813:12;39833:10;39892:8;39902:34;39922:4;39928:7;39902:19;:34::i;:::-;39938:37;39958:4;39964:10;39938:19;:37::i;:::-;39856:120;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;39856:120:8;;;;;;;-1:-1:-1;;;;;39856:120:8;-1:-1:-1;;;;;39856:120:8;-1:-1:-1;;;39856:120:8;;;;;;-1:-1:-1;;;;;39856:120:8;-1:-1:-1;;;;;39856:120:8;-1:-1:-1;;;39856:120:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;39856:120:8;;;39846:131;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;39846:131:8;;;;;;;;;;;;39998:12;;-1:-1:-1;;;;;40023:24:8;;;;;;;;;;39846:131;;-1:-1:-1;;;;;;39998:12:8;;;;-1:-1:-1;39998:20:8;;-1:-1:-1;39846:131:8;;40023:36;;-1:-1:-1;40052:6:8;;39998:12;;40023:20;;:24;;;;;;;;;;-1:-1:-1;39998:12:8;40023:24;;;5:2:-1;;;;30:1;27;20:12;40023:36:8;39998:62;;;;;-1:-1:-1;;;39998:62:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;39998:62:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;39998:62:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;39998:62:8;39983:198;;;;;;;-1:-1:-1;;;;;39983:198:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;39983:198:8;;;;-1:-1:-1;;;;;;;;;;;39983:198:8;;;;-1:-1:-1;;;;;;;;;;;39983:198:8;;;;-1:-1:-1;;;;;;;;;;;39983:198:8;;;;;;;;;;;;;;25924:213;25996:25;26029:10;26052:39;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;26052:39:8;;;26042:50;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26042:50:8;;;;;;;;;;;;26105:12;;:27;;;;;;;;;;;26042:50;;-1:-1:-1;;;;;;26105:12:8;;;;-1:-1:-1;26105:23:8;;-1:-1:-1;26105:27:8;;;;;263:2:-1;;-1:-1;26105:27:8;;;;;;;-1:-1:-1;26105:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;26105:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26105:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26105:27:8;;25924:213;-1:-1:-1;;;25924:213:8:o;301:224:2:-;359:14;;385:6;;381:35;;;408:1;401:8;;;;381:35;-1:-1:-1;433:5:2;;;437:1;433;:5;452;;;;;;;;:10;444:62;;;;;-1:-1:-1;;;;;444:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;697:284;755:14;857:9;873:1;869;:5;;;;;;;;;697:284;-1:-1:-1;;;;697:284:2:o;1540:174::-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63876:211:8;63960:12;63980:10;64035:8;64003:41;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;61052:503:8;61143:12;61163;61282:13;61178:39;61203:4;61209:7;61178:24;:39::i;:::-;61163:54;;61237:3;61227:7;:13;61223:328;;;61257:4;61250:11;;;;61223:328;-1:-1:-1;61298:5:8;61354:109;61379:4;61385:7;61394:68;61406:55;61298:5;61407:39;61444:1;61407:32;61298:5;61408:16;:3;61416:7;61408:16;:7;:16;:::i;61406:55::-;61394:7;;:68;:11;:68;:::i;:::-;61354:24;:109::i;:::-;61337:187;;;;;;;-1:-1:-1;;;;;61337:187:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61540:4;61533:11;;;;61913:271;62006:11;62025:10;62092:7;62101:39;62126:4;62132:7;62101:24;:39::i;:::-;62048:93;;;;;;;;;;;;;-1:-1:-1;;;;;62048:93:8;-1:-1:-1;;;;;62048:93:8;-1:-1:-1;;;62048:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;62048:93:8;;;62038:104;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;58783:227:8;58875:10;58893;58959:7;58916:51;;;;;;;;;;;;;-1:-1:-1;;;;;58916:51:8;-1:-1:-1;;;;;58916:51:8;-1:-1:-1;;;58916:51:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;58916:51:8;;;58906:62;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;57484:228:8;57577:11;57596:10;57661:7;57619:50;;;;;;;;;;;;;-1:-1:-1;;;;;57619:50:8;-1:-1:-1;;;;;57619:50:8;-1:-1:-1;;;57619:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;57619:50:8;;;57609:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;1143:234:2;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;56626:379:8:-;56727:12;56747:10;56812:7;56770:50;;;;;;;;;;;;;-1:-1:-1;;;;;56770:50:8;-1:-1:-1;;;;;56770:50:8;-1:-1:-1;;;56770:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;56770:50:8;;;56760:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\n\n\n/*\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n@title ERC20 Compliant Smart Contract for Token, Inc.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n*/\n\n\n\ncontract TokenIOERC20 is Ownable {\n //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n * @notice Constructor method for ERC20 contract\n * @param _storageContract address of TokenIOStorage contract\n */\n constructor(address _storageContract) public {\n //// @dev Set the storage contract for the interface\n //// @dev This contract will be unable to use the storage constract until\n //// @dev contract address is authorized with the storage contract\n //// @dev Once authorized, Use the `setParams` method to set storage values\n lib.Storage = TokenIOStorage(_storageContract);\n\n //// @dev set owner to contract initiator\n owner[msg.sender] = true;\n }\n\n\n /**\n @notice Sets erc20 globals and fee paramters\n @param _name Full token name 'USD by token.io'\n @param _symbol Symbol name 'USDx'\n @param _tla Three letter abbreviation 'USD'\n @param _version Release version 'v0.0.1'\n @param _decimals Decimal precision\n @param _feeContract Address of fee contract\n @return { \"success\" : \"Returns true if successfully called from another contract\"}\n */\n function setParams(\n string _name,\n string _symbol,\n string _tla,\n string _version,\n uint _decimals,\n address _feeContract,\n uint _fxUSDBPSRate\n ) onlyOwner public returns (bool success) {\n require(lib.setTokenName(_name),\n \"Error: Unable to set token name. Please check arguments.\");\n require(lib.setTokenSymbol(_symbol),\n \"Error: Unable to set token symbol. Please check arguments.\");\n require(lib.setTokenTLA(_tla),\n \"Error: Unable to set token TLA. Please check arguments.\");\n require(lib.setTokenVersion(_version),\n \"Error: Unable to set token version. Please check arguments.\");\n require(lib.setTokenDecimals(_symbol, _decimals),\n \"Error: Unable to set token decimals. Please check arguments.\");\n require(lib.setFeeContract(_feeContract),\n \"Error: Unable to set fee contract. Please check arguments.\");\n require(lib.setFxUSDBPSRate(_symbol, _fxUSDBPSRate),\n \"Error: Unable to set fx USD basis points rate. Please check arguments.\");\n return true;\n }\n\n /**\n * @notice Gets name of token\n * @return {\"_name\" : \"Returns name of token\"}\n */\n function name() public view returns (string _name) {\n return lib.getTokenName(address(this));\n }\n\n /**\n * @notice Gets symbol of token\n * @return {\"_symbol\" : \"Returns symbol of token\"}\n */\n function symbol() public view returns (string _symbol) {\n return lib.getTokenSymbol(address(this));\n }\n\n /**\n * @notice Gets three-letter-abbreviation of token\n * @return {\"_tla\" : \"Returns three-letter-abbreviation of token\"}\n */\n function tla() public view returns (string _tla) {\n return lib.getTokenTLA(address(this));\n }\n\n /**\n * @notice Gets version of token\n * @return {\"_version\" : \"Returns version of token\"}\n */\n function version() public view returns (string _version) {\n return lib.getTokenVersion(address(this));\n }\n\n /**\n * @notice Gets decimals of token\n * @return {\"_decimals\" : \"Returns number of decimals\"}\n */\n function decimals() public view returns (uint _decimals) {\n return lib.getTokenDecimals(lib.getTokenSymbol(address(this)));\n }\n\n /**\n * @notice Gets total supply of token\n * @return {\"supply\" : \"Returns current total supply of token\"}\n */\n function totalSupply() public view returns (uint supply) {\n return lib.getTokenSupply(lib.getTokenSymbol(address(this)));\n }\n\n /**\n * @notice Gets allowance that spender has with approver\n * @param account Address of approver\n * @param spender Address of spender\n * @return {\"amount\" : \"Returns allowance of given account and spender\"}\n */\n function allowance(address account, address spender) public view returns (uint amount) {\n return lib.getTokenAllowance(lib.getTokenSymbol(address(this)), account, spender);\n }\n\n /**\n * @notice Gets balance of account\n * @param account Address for balance lookup\n * @return {\"balance\" : \"Returns balance amount\"}\n */\n function balanceOf(address account) public view returns (uint balance) {\n return lib.getTokenBalance(lib.getTokenSymbol(address(this)), account);\n }\n\n /**\n * @notice Gets fee parameters\n * @return {\n \"bps\":\"Fee amount as a mesuare of basis points\",\n \"min\":\"Minimum fee amount\",\n \"max\":\"Maximum fee amount\",\n \"flat\":\"Flat fee amount\",\n \"contract\":\"Address of fee contract\"\n }\n */\n function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) {\n address feeContract = lib.getFeeContract(address(this));\n return (\n lib.getFeeBPS(feeContract),\n lib.getFeeMin(feeContract),\n lib.getFeeMax(feeContract),\n lib.getFeeFlat(feeContract),\n lib.getFeeMsg(feeContract),\n feeContract\n );\n }\n\n /**\n * @notice Calculates fee of a given transfer amount\n * @param amount Amount to calculcate fee value\n * @return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}\n */\n function calculateFees(uint amount) public view returns (uint fees) {\n return lib.calculateFees(lib.getFeeContract(address(this)), amount);\n }\n\n /**\n * @notice transfers 'amount' from msg.sender to a receiving account 'to'\n * @param to Receiving address\n * @param amount Transfer amount\n * @return {\"success\" : \"Returns true if transfer succeeds\"}\n */\n function transfer(address to, uint amount) public notDeprecated returns (bool success) {\n /// @notice send transfer through library\n /// @dev !!! mutates storage state\n require(\n lib.transfer(lib.getTokenSymbol(address(this)), to, amount, \"0x0\"),\n \"Error: Unable to transfer funds. Please check your parameters.\"\n );\n return true;\n }\n\n /**\n * @notice spender transfers from approvers account to the reciving account\n * @param from Approver's address\n * @param to Receiving address\n * @param amount Transfer amount\n * @return {\"success\" : \"Returns true if transferFrom succeeds\"}\n */\n function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) {\n /// @notice sends transferFrom through library\n /// @dev !!! mutates storage state\n require(\n lib.transferFrom(lib.getTokenSymbol(address(this)), from, to, amount, \"0x0\"),\n \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"\n );\n return true;\n }\n\n /**\n * @notice approves spender a given amount\n * @param spender Spender's address\n * @param amount Allowance amount\n * @return {\"success\" : \"Returns true if approve succeeds\"}\n */\n function approve(address spender, uint amount) public notDeprecated returns (bool success) {\n /// @notice sends approve through library\n /// @dev !!! mtuates storage states\n require(\n lib.approveAllowance(spender, amount),\n \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"\n );\n return true;\n }\n\n /**\n * @notice gets currency status of contract\n * @return {\"deprecated\" : \"Returns true if deprecated, false otherwise\"}\n */\n function deprecateInterface() public onlyOwner returns (bool deprecated) {\n require(lib.setDeprecatedContract(address(this)),\n \"Error: Unable to deprecate contract!\");\n return true;\n }\n\n modifier notDeprecated() {\n /// @notice throws if contract is deprecated\n require(!lib.isContractDeprecated(address(this)),\n \"Error: Contract has been deprecated, cannot perform operation!\");\n _;\n }\n\n }\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOERC20.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOERC20.sol", + "exportedSymbols": { + "TokenIOERC20": [ + 1335 + ] + }, + "id": 1336, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 908, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 909, + "nodeType": "ImportDirective", + "scope": 1336, + "sourceUnit": 185, + "src": "25:23:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 910, + "nodeType": "ImportDirective", + "scope": 1336, + "sourceUnit": 5226, + "src": "49:30:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 911, + "nodeType": "ImportDirective", + "scope": 1336, + "sourceUnit": 4607, + "src": "80:26:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 912, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1085:7:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 913, + "nodeType": "InheritanceSpecifier", + "src": "1085:7:5" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1335, + "linearizedBaseContracts": [ + 1335, + 184 + ], + "name": "TokenIOERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 916, + "libraryName": { + "contractScope": null, + "id": 914, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1185:10:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1179:37:5", + "typeName": { + "contractScope": null, + "id": 915, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1200:15:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 918, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1335, + "src": "1219:19:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 917, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1219:15:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 938, + "nodeType": "Block", + "src": "1416:420:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 923, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "1708:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 925, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1708:11:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 927, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 920, + "src": "1737:16:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 926, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1722:14:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1722:32:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1708:46:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 930, + "nodeType": "ExpressionStatement", + "src": "1708:46:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 931, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1807:5:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 934, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 932, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1813:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1813:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1807:17:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1827:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1807:24:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 937, + "nodeType": "ExpressionStatement", + "src": "1807:24:5" + } + ] + }, + "documentation": "@notice Constructor method for ERC20 contract\n@param _storageContract address of TokenIOStorage contract", + "id": 939, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 920, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 939, + "src": "1383:24:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 919, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1383:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1382:26:5" + }, + "payable": false, + "returnParameters": { + "id": 922, + "nodeType": "ParameterList", + "parameters": [], + "src": "1416:0:5" + }, + "scope": 1335, + "src": "1371:465:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1020, + "nodeType": "Block", + "src": "2453:860:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 963, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2486:5:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 961, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2469:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 962, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenName", + "nodeType": "MemberAccess", + "referencedDeclaration": 1746, + "src": "2469:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:23:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e206e616d652e20506c6561736520636865636b20617267756d656e74732e", + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2502:58:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_141dfda9ec7d030d71a0272572dd425cf90676e5296d5f58002425f3caea3960", + "typeString": "literal_string \"Error: Unable to set token name. Please check arguments.\"" + }, + "value": "Error: Unable to set token name. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_141dfda9ec7d030d71a0272572dd425cf90676e5296d5f58002425f3caea3960", + "typeString": "literal_string \"Error: Unable to set token name. Please check arguments.\"" + } + ], + "id": 960, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2461:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2461:100:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 967, + "nodeType": "ExpressionStatement", + "src": "2461:100:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 971, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "2596:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 969, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2577:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1780, + "src": "2577:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2577:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e2073796d626f6c2e20506c6561736520636865636b20617267756d656e74732e", + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:60:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a4d419aaf1b7e0c1b217a216005ff121a20a3a58ed5048acbd3d22a85502af69", + "typeString": "literal_string \"Error: Unable to set token symbol. Please check arguments.\"" + }, + "value": "Error: Unable to set token symbol. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a4d419aaf1b7e0c1b217a216005ff121a20a3a58ed5048acbd3d22a85502af69", + "typeString": "literal_string \"Error: Unable to set token symbol. Please check arguments.\"" + } + ], + "id": 968, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2569:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:106:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 975, + "nodeType": "ExpressionStatement", + "src": "2569:106:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 979, + "name": "_tla", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 945, + "src": "2707:4:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 977, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2691:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 978, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenTLA", + "nodeType": "MemberAccess", + "referencedDeclaration": 1814, + "src": "2691:15:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2691:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e20544c412e20506c6561736520636865636b20617267756d656e74732e", + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2722:57:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7221954eb7ab5ca7d7e112df96ffa1ba108181fc69cf565d48f56781bc167176", + "typeString": "literal_string \"Error: Unable to set token TLA. Please check arguments.\"" + }, + "value": "Error: Unable to set token TLA. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7221954eb7ab5ca7d7e112df96ffa1ba108181fc69cf565d48f56781bc167176", + "typeString": "literal_string \"Error: Unable to set token TLA. Please check arguments.\"" + } + ], + "id": 976, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2683:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2683:97:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 983, + "nodeType": "ExpressionStatement", + "src": "2683:97:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 947, + "src": "2816:8:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 985, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2796:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenVersion", + "nodeType": "MemberAccess", + "referencedDeclaration": 1848, + "src": "2796:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2796:29:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e2076657273696f6e2e20506c6561736520636865636b20617267756d656e74732e", + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:61:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0e049f6dc7ca1210cdbb63f5bd5546abce5203f36e68544787d7650cbf630ddb", + "typeString": "literal_string \"Error: Unable to set token version. Please check arguments.\"" + }, + "value": "Error: Unable to set token version. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0e049f6dc7ca1210cdbb63f5bd5546abce5203f36e68544787d7650cbf630ddb", + "typeString": "literal_string \"Error: Unable to set token version. Please check arguments.\"" + } + ], + "id": 984, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2788:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2788:109:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 991, + "nodeType": "ExpressionStatement", + "src": "2788:109:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 995, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "2934:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 996, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 949, + "src": "2943:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 993, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2913:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 994, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenDecimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1882, + "src": "2913:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2913:40:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e20646563696d616c732e20506c6561736520636865636b20617267756d656e74732e", + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2963:62:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_984353017a3e5d4b2995ed8ec56faa3d144c96f6e7a16298eed064720b2a0901", + "typeString": "literal_string \"Error: Unable to set token decimals. Please check arguments.\"" + }, + "value": "Error: Unable to set token decimals. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_984353017a3e5d4b2995ed8ec56faa3d144c96f6e7a16298eed064720b2a0901", + "typeString": "literal_string \"Error: Unable to set token decimals. Please check arguments.\"" + } + ], + "id": 992, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2905:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:121:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1000, + "nodeType": "ExpressionStatement", + "src": "2905:121:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1004, + "name": "_feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 951, + "src": "3061:12:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1002, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3042:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1003, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2086, + "src": "3042:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3042:32:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742e20506c6561736520636865636b20617267756d656e74732e", + "id": 1006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3084:60:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d56731c6af5d7a18359bcc1d0d4d9e58ed62ffcb6e170e5fa9cb217035b6bedf", + "typeString": "literal_string \"Error: Unable to set fee contract. Please check arguments.\"" + }, + "value": "Error: Unable to set fee contract. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d56731c6af5d7a18359bcc1d0d4d9e58ed62ffcb6e170e5fa9cb217035b6bedf", + "typeString": "literal_string \"Error: Unable to set fee contract. Please check arguments.\"" + } + ], + "id": 1001, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "3034:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3034:111:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1008, + "nodeType": "ExpressionStatement", + "src": "3034:111:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1012, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "3181:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1013, + "name": "_fxUSDBPSRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 953, + "src": "3190:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1010, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3161:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1011, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFxUSDBPSRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4526, + "src": "3161:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3161:43:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066782055534420626173697320706f696e747320726174652e20506c6561736520636865636b20617267756d656e74732e", + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3214:72:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_089d75b9656e8f27becbd3baa3fa44d6933e03b685d6a5a6a71eef402959560e", + "typeString": "literal_string \"Error: Unable to set fx USD basis points rate. Please check arguments.\"" + }, + "value": "Error: Unable to set fx USD basis points rate. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_089d75b9656e8f27becbd3baa3fa44d6933e03b685d6a5a6a71eef402959560e", + "typeString": "literal_string \"Error: Unable to set fx USD basis points rate. Please check arguments.\"" + } + ], + "id": 1009, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "3153:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3153:134:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1017, + "nodeType": "ExpressionStatement", + "src": "3153:134:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1018, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3302:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 959, + "id": 1019, + "nodeType": "Return", + "src": "3295:11:5" + } + ] + }, + "documentation": "@notice Sets erc20 globals and fee paramters\n@param _name Full token name 'USD by token.io'\n@param _symbol Symbol name 'USDx'\n@param _tla Three letter abbreviation 'USD'\n@param _version Release version 'v0.0.1'\n@param _decimals Decimal precision\n@param _feeContract Address of fee contract\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1021, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 956, + "modifierName": { + "argumentTypes": null, + "id": 955, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2413:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2413:9:5" + } + ], + "name": "setParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 954, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 941, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2266:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 940, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2266:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 943, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2284:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 942, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2284:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 945, + "name": "_tla", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2304:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 944, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2304:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 947, + "name": "_version", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2321:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 946, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2321:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 949, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2342:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 948, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2342:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 951, + "name": "_feeContract", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2362:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 950, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2362:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 953, + "name": "_fxUSDBPSRate", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2388:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 952, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2388:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2260:152:5" + }, + "payable": false, + "returnParameters": { + "id": 959, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 958, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2439:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 957, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2439:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2438:14:5" + }, + "scope": 1335, + "src": "2242:1071:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1033, + "nodeType": "Block", + "src": "3468:53:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1029, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "3508:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3500:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3500:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1026, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3483:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenName", + "nodeType": "MemberAccess", + "referencedDeclaration": 2392, + "src": "3483:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3483:31:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1025, + "id": 1032, + "nodeType": "Return", + "src": "3476:38:5" + } + ] + }, + "documentation": "@notice Gets name of token\n@return {\"_name\" : \"Returns name of token\"}", + "id": 1034, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1022, + "nodeType": "ParameterList", + "parameters": [], + "src": "3430:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1025, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1024, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 1034, + "src": "3454:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1023, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3454:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3453:14:5" + }, + "scope": 1335, + "src": "3417:104:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1046, + "nodeType": "Block", + "src": "3686:55:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1042, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "3728:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3720:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3720:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1039, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3701:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "3701:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3701:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1038, + "id": 1045, + "nodeType": "Return", + "src": "3694:40:5" + } + ] + }, + "documentation": "@notice Gets symbol of token\n@return {\"_symbol\" : \"Returns symbol of token\"}", + "id": 1047, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1035, + "nodeType": "ParameterList", + "parameters": [], + "src": "3646:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1037, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 1047, + "src": "3670:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3670:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3669:16:5" + }, + "scope": 1335, + "src": "3631:110:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1059, + "nodeType": "Block", + "src": "3935:52:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1055, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "3974:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3966:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3966:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1052, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3950:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1053, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenTLA", + "nodeType": "MemberAccess", + "referencedDeclaration": 2444, + "src": "3950:15:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3950:30:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1051, + "id": 1058, + "nodeType": "Return", + "src": "3943:37:5" + } + ] + }, + "documentation": "@notice Gets three-letter-abbreviation of token\n@return {\"_tla\" : \"Returns three-letter-abbreviation of token\"}", + "id": 1060, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "tla", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1048, + "nodeType": "ParameterList", + "parameters": [], + "src": "3898:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1050, + "name": "_tla", + "nodeType": "VariableDeclaration", + "scope": 1060, + "src": "3922:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1049, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3922:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3921:13:5" + }, + "scope": 1335, + "src": "3886:101:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1072, + "nodeType": "Block", + "src": "4157:56:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1068, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "4200:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4192:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4192:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1065, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4172:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenVersion", + "nodeType": "MemberAccess", + "referencedDeclaration": 2470, + "src": "4172:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4172:34:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1064, + "id": 1071, + "nodeType": "Return", + "src": "4165:41:5" + } + ] + }, + "documentation": "@notice Gets version of token\n@return {\"_version\" : \"Returns version of token\"}", + "id": 1073, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "version", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1061, + "nodeType": "ParameterList", + "parameters": [], + "src": "4116:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1063, + "name": "_version", + "nodeType": "VariableDeclaration", + "scope": 1073, + "src": "4140:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1062, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4140:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4139:17:5" + }, + "scope": 1335, + "src": "4100:113:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1088, + "nodeType": "Block", + "src": "4387:77:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1083, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "4450:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4442:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4442:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1080, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4423:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1081, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "4423:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4423:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1078, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4402:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenDecimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 2496, + "src": "4402:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4402:55:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1077, + "id": 1087, + "nodeType": "Return", + "src": "4395:62:5" + } + ] + }, + "documentation": "@notice Gets decimals of token\n@return {\"_decimals\" : \"Returns number of decimals\"}", + "id": 1089, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1074, + "nodeType": "ParameterList", + "parameters": [], + "src": "4347:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1076, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "4371:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1075, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4371:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4370:16:5" + }, + "scope": 1335, + "src": "4330:134:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1104, + "nodeType": "Block", + "src": "4650:75:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1099, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "4711:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4703:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4703:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1096, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4684:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "4684:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4684:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1094, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4665:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1095, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 2746, + "src": "4665:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4665:53:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1093, + "id": 1103, + "nodeType": "Return", + "src": "4658:60:5" + } + ] + }, + "documentation": "@notice Gets total supply of token\n@return {\"supply\" : \"Returns current total supply of token\"}", + "id": 1105, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1090, + "nodeType": "ParameterList", + "parameters": [], + "src": "4613:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 1105, + "src": "4637:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4637:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4636:13:5" + }, + "scope": 1335, + "src": "4593:132:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1126, + "nodeType": "Block", + "src": "5050:96:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1119, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "5114:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5106:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5106:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1116, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5087:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "5087:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1122, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "5122:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1123, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "5131:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1114, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5065:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1115, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2784, + "src": "5065:21:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address) view returns (uint256)" + } + }, + "id": 1124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5065:74:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1113, + "id": 1125, + "nodeType": "Return", + "src": "5058:81:5" + } + ] + }, + "documentation": "@notice Gets allowance that spender has with approver\n@param account Address of approver\n@param spender Address of spender\n@return {\"amount\" : \"Returns allowance of given account and spender\"}", + "id": 1127, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1107, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1127, + "src": "4982:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1106, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4982:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1109, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1127, + "src": "4999:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1108, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4999:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4981:34:5" + }, + "payable": false, + "returnParameters": { + "id": 1113, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1112, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1127, + "src": "5037:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1111, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5037:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5036:13:5" + }, + "scope": 1335, + "src": "4963:183:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1145, + "nodeType": "Block", + "src": "5377:85:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1139, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "5439:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5431:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5431:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5412:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "5412:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5412:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1142, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1129, + "src": "5447:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1134, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5392:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2816, + "src": "5392:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5392:63:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1133, + "id": 1144, + "nodeType": "Return", + "src": "5385:70:5" + } + ] + }, + "documentation": "@notice Gets balance of account\n@param account Address for balance lookup\n@return {\"balance\" : \"Returns balance amount\"}", + "id": 1146, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1129, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "5325:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5325:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5324:17:5" + }, + "payable": false, + "returnParameters": { + "id": 1133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1132, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "5363:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1131, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5363:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5362:14:5" + }, + "scope": 1335, + "src": "5306:156:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1193, + "nodeType": "Block", + "src": "5859:295:5", + "statements": [ + { + "assignments": [ + 1162 + ], + "declarations": [ + { + "constant": false, + "id": 1162, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5867:19:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5867:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1169, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1166, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "5916:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5908:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5908:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1163, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5889:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "5889:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 1168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5889:33:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5867:55:5" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1172, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "5961:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1170, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5947:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1171, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2522, + "src": "5947:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5947:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1176, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "5997:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1174, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5983:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2548, + "src": "5983:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5983:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1180, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "6033:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1178, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6019:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1179, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "6019:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6019:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1184, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "6070:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1182, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6055:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1183, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2600, + "src": "6055:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:27:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "6106:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6092:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "6092:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6092:26:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 1190, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "6128:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1191, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5937:210:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 1160, + "id": 1192, + "nodeType": "Return", + "src": "5930:217:5" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Fee amount as a mesuare of basis points\",\n\"min\":\"Minimum fee amount\",\n\"max\":\"Maximum fee amount\",\n\"flat\":\"Flat fee amount\",\n\"contract\":\"Address of fee contract\"\n}", + "id": 1194, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1147, + "nodeType": "ParameterList", + "parameters": [], + "src": "5760:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1160, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1149, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5784:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1148, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5784:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1151, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5794:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1150, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5794:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1153, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5804:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5804:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1155, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5814:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1154, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5814:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1157, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5825:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1156, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5825:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1159, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5839:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1158, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5839:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5783:75:5" + }, + "scope": 1335, + "src": "5739:415:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1212, + "nodeType": "Block", + "src": "6453:82:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1206, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "6513:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6505:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6505:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1203, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6486:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1204, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "6486:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 1208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6486:33:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1209, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1196, + "src": "6521:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1201, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6468:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 2988, + "src": "6468:17:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6468:60:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1200, + "id": 1211, + "nodeType": "Return", + "src": "6461:67:5" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount Amount to calculcate fee value\n@return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}", + "id": 1213, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1197, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1196, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1213, + "src": "6408:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6408:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6407:13:5" + }, + "payable": false, + "returnParameters": { + "id": 1200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1199, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 1213, + "src": "6442:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6442:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6441:11:5" + }, + "scope": 1335, + "src": "6385:150:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1242, + "nodeType": "Block", + "src": "6854:288:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1230, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "7008:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7000:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7000:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1227, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6981:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1228, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "6981:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6981:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1233, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1215, + "src": "7016:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1234, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1217, + "src": "7020:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7028:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 1225, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6968:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3140, + "src": "6968:12:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6968:66:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d65746572732e", + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7044:64:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7b56f975cae833aef0f2ad6bba848437a58a03519ddd4635658465a8db99bc8b", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters.\"" + }, + "value": "Error: Unable to transfer funds. Please check your parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7b56f975cae833aef0f2ad6bba848437a58a03519ddd4635658465a8db99bc8b", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters.\"" + } + ], + "id": 1224, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6951:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6951:165:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1239, + "nodeType": "ExpressionStatement", + "src": "6951:165:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7131:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1223, + "id": 1241, + "nodeType": "Return", + "src": "7124:11:5" + } + ] + }, + "documentation": "@notice transfers 'amount' from msg.sender to a receiving account 'to'\n@param to Receiving address\n@param amount Transfer amount\n@return {\"success\" : \"Returns true if transfer succeeds\"}", + "id": 1243, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1220, + "modifierName": { + "argumentTypes": null, + "id": 1219, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1334, + "src": "6817:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6817:13:5" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1215, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6785:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1214, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6785:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1217, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6797:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1216, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6797:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6784:25:5" + }, + "payable": false, + "returnParameters": { + "id": 1223, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1222, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6840:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1221, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6840:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6839:14:5" + }, + "scope": 1335, + "src": "6767:375:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1275, + "nodeType": "Block", + "src": "7522:371:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1262, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "7685:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7677:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7677:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1259, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "7658:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "7658:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7658:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1265, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1245, + "src": "7693:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1266, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1247, + "src": "7699:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1267, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1249, + "src": "7703:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 1268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7711:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 1257, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "7641:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1258, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3236, + "src": "7641:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7641:76:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d657465727320616e6420656e7375726520746865207370656e646572206861732074686520617070726f76656420616d6f756e74206f662066756e647320746f207472616e736665722e", + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7727:132:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_90b3ee7dad40e5e7ebb3851f6571fdf83a7fec9d6544d7d132d092fa849919cf", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"" + }, + "value": "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_90b3ee7dad40e5e7ebb3851f6571fdf83a7fec9d6544d7d132d092fa849919cf", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"" + } + ], + "id": 1256, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "7624:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7624:243:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1272, + "nodeType": "ExpressionStatement", + "src": "7624:243:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7882:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1255, + "id": 1274, + "nodeType": "Return", + "src": "7875:11:5" + } + ] + }, + "documentation": "@notice spender transfers from approvers account to the reciving account\n@param from Approver's address\n@param to Receiving address\n@param amount Transfer amount\n@return {\"success\" : \"Returns true if transferFrom succeeds\"}", + "id": 1276, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1252, + "modifierName": { + "argumentTypes": null, + "id": 1251, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1334, + "src": "7485:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7485:13:5" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1250, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "7439:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7439:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "7453:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1246, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7453:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1249, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "7465:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1248, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7465:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7438:39:5" + }, + "payable": false, + "returnParameters": { + "id": 1255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "7508:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1253, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7508:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7507:14:5" + }, + "scope": 1335, + "src": "7417:476:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1298, + "nodeType": "Block", + "src": "8190:315:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1290, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1278, + "src": "8326:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1291, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1280, + "src": "8335:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "8305:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1289, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "approveAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 3508, + "src": "8305:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 1292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8305:37:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f766520616c6c6f77616e636520666f72207370656e6465722e20506c6561736520656e73757265207370656e646572206973206e6f74206e756c6c20616e6420646f6573206e6f74206861766520612066726f7a656e2062616c616e63652e", + "id": 1293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8352:119:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_10872a80d40cd7a7ea8407e27ca3b5f442e099403eb78ad6b966b1054a4f032f", + "typeString": "literal_string \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"" + }, + "value": "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_10872a80d40cd7a7ea8407e27ca3b5f442e099403eb78ad6b966b1054a4f032f", + "typeString": "literal_string \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"" + } + ], + "id": 1287, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8288:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8288:191:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1295, + "nodeType": "ExpressionStatement", + "src": "8288:191:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8494:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1286, + "id": 1297, + "nodeType": "Return", + "src": "8487:11:5" + } + ] + }, + "documentation": "@notice approves spender a given amount\n@param spender Spender's address\n@param amount Allowance amount\n@return {\"success\" : \"Returns true if approve succeeds\"}", + "id": 1299, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1283, + "modifierName": { + "argumentTypes": null, + "id": 1282, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1334, + "src": "8153:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8153:13:5" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1278, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1299, + "src": "8116:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1277, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8116:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1280, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1299, + "src": "8133:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1279, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8133:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8115:30:5" + }, + "payable": false, + "returnParameters": { + "id": 1286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1285, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1299, + "src": "8176:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1284, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8176:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8175:14:5" + }, + "scope": 1335, + "src": "8099:406:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1318, + "nodeType": "Block", + "src": "8723:131:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1310, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "8773:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8765:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8765:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1307, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "8739:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setDeprecatedContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 4172, + "src": "8739:25:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 1312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8739:40:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2064657072656361746520636f6e747261637421", + "id": 1313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8789:38:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f549c81276a394c8d1eccc4a6bca4eec7c9bb1e25bd84511bd278b767e7ca4e8", + "typeString": "literal_string \"Error: Unable to deprecate contract!\"" + }, + "value": "Error: Unable to deprecate contract!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f549c81276a394c8d1eccc4a6bca4eec7c9bb1e25bd84511bd278b767e7ca4e8", + "typeString": "literal_string \"Error: Unable to deprecate contract!\"" + } + ], + "id": 1306, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8731:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8731:97:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1315, + "nodeType": "ExpressionStatement", + "src": "8731:97:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8843:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1305, + "id": 1317, + "nodeType": "Return", + "src": "8836:11:5" + } + ] + }, + "documentation": "@notice gets currency status of contract\n@return {\"deprecated\" : \"Returns true if deprecated, false otherwise\"}", + "id": 1319, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1302, + "modifierName": { + "argumentTypes": null, + "id": 1301, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "8687:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8687:9:5" + } + ], + "name": "deprecateInterface", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1300, + "nodeType": "ParameterList", + "parameters": [], + "src": "8677:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1305, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1304, + "name": "deprecated", + "nodeType": "VariableDeclaration", + "scope": 1319, + "src": "8706:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1303, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8706:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8705:17:5" + }, + "scope": 1335, + "src": "8650:204:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1333, + "nodeType": "Block", + "src": "8885:198:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8952:40:5", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1325, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "8986:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8978:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8978:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1322, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "8953:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1323, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isContractDeprecated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4198, + "src": "8953:24:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 1327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8953:39:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20436f6e747261637420686173206265656e20646570726563617465642c2063616e6e6f7420706572666f726d206f7065726174696f6e21", + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9002:64:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a6979b55ecdc4b5fbdddeea2b203ef30bc5c99bf716d9b4a8c9faef6ad0dbbcc", + "typeString": "literal_string \"Error: Contract has been deprecated, cannot perform operation!\"" + }, + "value": "Error: Contract has been deprecated, cannot perform operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a6979b55ecdc4b5fbdddeea2b203ef30bc5c99bf716d9b4a8c9faef6ad0dbbcc", + "typeString": "literal_string \"Error: Contract has been deprecated, cannot perform operation!\"" + } + ], + "id": 1321, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8944:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:123:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1331, + "nodeType": "ExpressionStatement", + "src": "8944:123:5" + }, + { + "id": 1332, + "nodeType": "PlaceholderStatement", + "src": "9075:1:5" + } + ] + }, + "documentation": null, + "id": 1334, + "name": "notDeprecated", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1320, + "nodeType": "ParameterList", + "parameters": [], + "src": "8882:2:5" + }, + "src": "8860:223:5", + "visibility": "internal" + } + ], + "scope": 1336, + "src": "1060:8028:5" + } + ], + "src": "0:9089:5" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOERC20.sol", + "exportedSymbols": { + "TokenIOERC20": [ + 1335 + ] + }, + "id": 1336, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 908, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 909, + "nodeType": "ImportDirective", + "scope": 1336, + "sourceUnit": 185, + "src": "25:23:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 910, + "nodeType": "ImportDirective", + "scope": 1336, + "sourceUnit": 5226, + "src": "49:30:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 911, + "nodeType": "ImportDirective", + "scope": 1336, + "sourceUnit": 4607, + "src": "80:26:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 912, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1085:7:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 913, + "nodeType": "InheritanceSpecifier", + "src": "1085:7:5" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1335, + "linearizedBaseContracts": [ + 1335, + 184 + ], + "name": "TokenIOERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 916, + "libraryName": { + "contractScope": null, + "id": 914, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1185:10:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1179:37:5", + "typeName": { + "contractScope": null, + "id": 915, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1200:15:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 918, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1335, + "src": "1219:19:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 917, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1219:15:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 938, + "nodeType": "Block", + "src": "1416:420:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 923, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "1708:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 925, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1708:11:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 927, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 920, + "src": "1737:16:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 926, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1722:14:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1722:32:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1708:46:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 930, + "nodeType": "ExpressionStatement", + "src": "1708:46:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 931, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1807:5:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 934, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 932, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1813:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1813:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1807:17:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1827:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1807:24:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 937, + "nodeType": "ExpressionStatement", + "src": "1807:24:5" + } + ] + }, + "documentation": "@notice Constructor method for ERC20 contract\n@param _storageContract address of TokenIOStorage contract", + "id": 939, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 920, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 939, + "src": "1383:24:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 919, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1383:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1382:26:5" + }, + "payable": false, + "returnParameters": { + "id": 922, + "nodeType": "ParameterList", + "parameters": [], + "src": "1416:0:5" + }, + "scope": 1335, + "src": "1371:465:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1020, + "nodeType": "Block", + "src": "2453:860:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 963, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2486:5:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 961, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2469:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 962, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenName", + "nodeType": "MemberAccess", + "referencedDeclaration": 1746, + "src": "2469:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:23:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e206e616d652e20506c6561736520636865636b20617267756d656e74732e", + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2502:58:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_141dfda9ec7d030d71a0272572dd425cf90676e5296d5f58002425f3caea3960", + "typeString": "literal_string \"Error: Unable to set token name. Please check arguments.\"" + }, + "value": "Error: Unable to set token name. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_141dfda9ec7d030d71a0272572dd425cf90676e5296d5f58002425f3caea3960", + "typeString": "literal_string \"Error: Unable to set token name. Please check arguments.\"" + } + ], + "id": 960, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2461:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2461:100:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 967, + "nodeType": "ExpressionStatement", + "src": "2461:100:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 971, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "2596:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 969, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2577:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1780, + "src": "2577:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2577:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e2073796d626f6c2e20506c6561736520636865636b20617267756d656e74732e", + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:60:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a4d419aaf1b7e0c1b217a216005ff121a20a3a58ed5048acbd3d22a85502af69", + "typeString": "literal_string \"Error: Unable to set token symbol. Please check arguments.\"" + }, + "value": "Error: Unable to set token symbol. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a4d419aaf1b7e0c1b217a216005ff121a20a3a58ed5048acbd3d22a85502af69", + "typeString": "literal_string \"Error: Unable to set token symbol. Please check arguments.\"" + } + ], + "id": 968, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2569:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:106:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 975, + "nodeType": "ExpressionStatement", + "src": "2569:106:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 979, + "name": "_tla", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 945, + "src": "2707:4:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 977, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2691:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 978, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenTLA", + "nodeType": "MemberAccess", + "referencedDeclaration": 1814, + "src": "2691:15:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2691:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e20544c412e20506c6561736520636865636b20617267756d656e74732e", + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2722:57:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7221954eb7ab5ca7d7e112df96ffa1ba108181fc69cf565d48f56781bc167176", + "typeString": "literal_string \"Error: Unable to set token TLA. Please check arguments.\"" + }, + "value": "Error: Unable to set token TLA. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7221954eb7ab5ca7d7e112df96ffa1ba108181fc69cf565d48f56781bc167176", + "typeString": "literal_string \"Error: Unable to set token TLA. Please check arguments.\"" + } + ], + "id": 976, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2683:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2683:97:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 983, + "nodeType": "ExpressionStatement", + "src": "2683:97:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 947, + "src": "2816:8:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 985, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2796:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenVersion", + "nodeType": "MemberAccess", + "referencedDeclaration": 1848, + "src": "2796:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) returns (bool)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2796:29:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e2076657273696f6e2e20506c6561736520636865636b20617267756d656e74732e", + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:61:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0e049f6dc7ca1210cdbb63f5bd5546abce5203f36e68544787d7650cbf630ddb", + "typeString": "literal_string \"Error: Unable to set token version. Please check arguments.\"" + }, + "value": "Error: Unable to set token version. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0e049f6dc7ca1210cdbb63f5bd5546abce5203f36e68544787d7650cbf630ddb", + "typeString": "literal_string \"Error: Unable to set token version. Please check arguments.\"" + } + ], + "id": 984, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2788:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2788:109:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 991, + "nodeType": "ExpressionStatement", + "src": "2788:109:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 995, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "2934:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 996, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 949, + "src": "2943:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 993, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "2913:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 994, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setTokenDecimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1882, + "src": "2913:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2913:40:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2073657420746f6b656e20646563696d616c732e20506c6561736520636865636b20617267756d656e74732e", + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2963:62:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_984353017a3e5d4b2995ed8ec56faa3d144c96f6e7a16298eed064720b2a0901", + "typeString": "literal_string \"Error: Unable to set token decimals. Please check arguments.\"" + }, + "value": "Error: Unable to set token decimals. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_984353017a3e5d4b2995ed8ec56faa3d144c96f6e7a16298eed064720b2a0901", + "typeString": "literal_string \"Error: Unable to set token decimals. Please check arguments.\"" + } + ], + "id": 992, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2905:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:121:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1000, + "nodeType": "ExpressionStatement", + "src": "2905:121:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1004, + "name": "_feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 951, + "src": "3061:12:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1002, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3042:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1003, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2086, + "src": "3042:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3042:32:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742e20506c6561736520636865636b20617267756d656e74732e", + "id": 1006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3084:60:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d56731c6af5d7a18359bcc1d0d4d9e58ed62ffcb6e170e5fa9cb217035b6bedf", + "typeString": "literal_string \"Error: Unable to set fee contract. Please check arguments.\"" + }, + "value": "Error: Unable to set fee contract. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d56731c6af5d7a18359bcc1d0d4d9e58ed62ffcb6e170e5fa9cb217035b6bedf", + "typeString": "literal_string \"Error: Unable to set fee contract. Please check arguments.\"" + } + ], + "id": 1001, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "3034:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3034:111:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1008, + "nodeType": "ExpressionStatement", + "src": "3034:111:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1012, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "3181:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1013, + "name": "_fxUSDBPSRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 953, + "src": "3190:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1010, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3161:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1011, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFxUSDBPSRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4526, + "src": "3161:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) returns (bool)" + } + }, + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3161:43:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066782055534420626173697320706f696e747320726174652e20506c6561736520636865636b20617267756d656e74732e", + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3214:72:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_089d75b9656e8f27becbd3baa3fa44d6933e03b685d6a5a6a71eef402959560e", + "typeString": "literal_string \"Error: Unable to set fx USD basis points rate. Please check arguments.\"" + }, + "value": "Error: Unable to set fx USD basis points rate. Please check arguments." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_089d75b9656e8f27becbd3baa3fa44d6933e03b685d6a5a6a71eef402959560e", + "typeString": "literal_string \"Error: Unable to set fx USD basis points rate. Please check arguments.\"" + } + ], + "id": 1009, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "3153:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3153:134:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1017, + "nodeType": "ExpressionStatement", + "src": "3153:134:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1018, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3302:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 959, + "id": 1019, + "nodeType": "Return", + "src": "3295:11:5" + } + ] + }, + "documentation": "@notice Sets erc20 globals and fee paramters\n@param _name Full token name 'USD by token.io'\n@param _symbol Symbol name 'USDx'\n@param _tla Three letter abbreviation 'USD'\n@param _version Release version 'v0.0.1'\n@param _decimals Decimal precision\n@param _feeContract Address of fee contract\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1021, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 956, + "modifierName": { + "argumentTypes": null, + "id": 955, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2413:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2413:9:5" + } + ], + "name": "setParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 954, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 941, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2266:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 940, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2266:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 943, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2284:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 942, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2284:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 945, + "name": "_tla", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2304:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 944, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2304:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 947, + "name": "_version", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2321:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 946, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2321:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 949, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2342:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 948, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2342:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 951, + "name": "_feeContract", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2362:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 950, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2362:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 953, + "name": "_fxUSDBPSRate", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2388:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 952, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2388:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2260:152:5" + }, + "payable": false, + "returnParameters": { + "id": 959, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 958, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1021, + "src": "2439:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 957, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2439:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2438:14:5" + }, + "scope": 1335, + "src": "2242:1071:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1033, + "nodeType": "Block", + "src": "3468:53:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1029, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "3508:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3500:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3500:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1026, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3483:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenName", + "nodeType": "MemberAccess", + "referencedDeclaration": 2392, + "src": "3483:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3483:31:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1025, + "id": 1032, + "nodeType": "Return", + "src": "3476:38:5" + } + ] + }, + "documentation": "@notice Gets name of token\n@return {\"_name\" : \"Returns name of token\"}", + "id": 1034, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1022, + "nodeType": "ParameterList", + "parameters": [], + "src": "3430:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1025, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1024, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 1034, + "src": "3454:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1023, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3454:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3453:14:5" + }, + "scope": 1335, + "src": "3417:104:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1046, + "nodeType": "Block", + "src": "3686:55:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1042, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "3728:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3720:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3720:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1039, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3701:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "3701:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3701:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1038, + "id": 1045, + "nodeType": "Return", + "src": "3694:40:5" + } + ] + }, + "documentation": "@notice Gets symbol of token\n@return {\"_symbol\" : \"Returns symbol of token\"}", + "id": 1047, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1035, + "nodeType": "ParameterList", + "parameters": [], + "src": "3646:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1037, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 1047, + "src": "3670:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3670:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3669:16:5" + }, + "scope": 1335, + "src": "3631:110:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1059, + "nodeType": "Block", + "src": "3935:52:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1055, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "3974:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3966:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3966:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1052, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "3950:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1053, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenTLA", + "nodeType": "MemberAccess", + "referencedDeclaration": 2444, + "src": "3950:15:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3950:30:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1051, + "id": 1058, + "nodeType": "Return", + "src": "3943:37:5" + } + ] + }, + "documentation": "@notice Gets three-letter-abbreviation of token\n@return {\"_tla\" : \"Returns three-letter-abbreviation of token\"}", + "id": 1060, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "tla", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1048, + "nodeType": "ParameterList", + "parameters": [], + "src": "3898:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1050, + "name": "_tla", + "nodeType": "VariableDeclaration", + "scope": 1060, + "src": "3922:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1049, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3922:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3921:13:5" + }, + "scope": 1335, + "src": "3886:101:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1072, + "nodeType": "Block", + "src": "4157:56:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1068, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "4200:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4192:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4192:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1065, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4172:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenVersion", + "nodeType": "MemberAccess", + "referencedDeclaration": 2470, + "src": "4172:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4172:34:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1064, + "id": 1071, + "nodeType": "Return", + "src": "4165:41:5" + } + ] + }, + "documentation": "@notice Gets version of token\n@return {\"_version\" : \"Returns version of token\"}", + "id": 1073, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "version", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1061, + "nodeType": "ParameterList", + "parameters": [], + "src": "4116:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1063, + "name": "_version", + "nodeType": "VariableDeclaration", + "scope": 1073, + "src": "4140:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1062, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4140:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4139:17:5" + }, + "scope": 1335, + "src": "4100:113:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1088, + "nodeType": "Block", + "src": "4387:77:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1083, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "4450:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4442:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4442:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1080, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4423:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1081, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "4423:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4423:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1078, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4402:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenDecimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 2496, + "src": "4402:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4402:55:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1077, + "id": 1087, + "nodeType": "Return", + "src": "4395:62:5" + } + ] + }, + "documentation": "@notice Gets decimals of token\n@return {\"_decimals\" : \"Returns number of decimals\"}", + "id": 1089, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1074, + "nodeType": "ParameterList", + "parameters": [], + "src": "4347:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1076, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "4371:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1075, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4371:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4370:16:5" + }, + "scope": 1335, + "src": "4330:134:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1104, + "nodeType": "Block", + "src": "4650:75:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1099, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "4711:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4703:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4703:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1096, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4684:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "4684:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4684:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1094, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "4665:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1095, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 2746, + "src": "4665:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4665:53:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1093, + "id": 1103, + "nodeType": "Return", + "src": "4658:60:5" + } + ] + }, + "documentation": "@notice Gets total supply of token\n@return {\"supply\" : \"Returns current total supply of token\"}", + "id": 1105, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1090, + "nodeType": "ParameterList", + "parameters": [], + "src": "4613:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 1105, + "src": "4637:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4637:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4636:13:5" + }, + "scope": 1335, + "src": "4593:132:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1126, + "nodeType": "Block", + "src": "5050:96:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1119, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "5114:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5106:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5106:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1116, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5087:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "5087:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1122, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "5122:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1123, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "5131:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1114, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5065:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1115, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2784, + "src": "5065:21:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address) view returns (uint256)" + } + }, + "id": 1124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5065:74:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1113, + "id": 1125, + "nodeType": "Return", + "src": "5058:81:5" + } + ] + }, + "documentation": "@notice Gets allowance that spender has with approver\n@param account Address of approver\n@param spender Address of spender\n@return {\"amount\" : \"Returns allowance of given account and spender\"}", + "id": 1127, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1107, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1127, + "src": "4982:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1106, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4982:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1109, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1127, + "src": "4999:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1108, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4999:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4981:34:5" + }, + "payable": false, + "returnParameters": { + "id": 1113, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1112, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1127, + "src": "5037:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1111, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5037:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5036:13:5" + }, + "scope": 1335, + "src": "4963:183:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1145, + "nodeType": "Block", + "src": "5377:85:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1139, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "5439:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5431:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5431:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5412:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "5412:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5412:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1142, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1129, + "src": "5447:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1134, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5392:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2816, + "src": "5392:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5392:63:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1133, + "id": 1144, + "nodeType": "Return", + "src": "5385:70:5" + } + ] + }, + "documentation": "@notice Gets balance of account\n@param account Address for balance lookup\n@return {\"balance\" : \"Returns balance amount\"}", + "id": 1146, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1129, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "5325:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5325:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5324:17:5" + }, + "payable": false, + "returnParameters": { + "id": 1133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1132, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "5363:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1131, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5363:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5362:14:5" + }, + "scope": 1335, + "src": "5306:156:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1193, + "nodeType": "Block", + "src": "5859:295:5", + "statements": [ + { + "assignments": [ + 1162 + ], + "declarations": [ + { + "constant": false, + "id": 1162, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5867:19:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5867:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1169, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1166, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "5916:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5908:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5908:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1163, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5889:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "5889:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 1168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5889:33:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5867:55:5" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1172, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "5961:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1170, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5947:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1171, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2522, + "src": "5947:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5947:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1176, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "5997:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1174, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "5983:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2548, + "src": "5983:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5983:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1180, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "6033:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1178, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6019:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1179, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "6019:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6019:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1184, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "6070:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1182, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6055:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1183, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2600, + "src": "6055:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:27:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "6106:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6092:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "6092:13:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6092:26:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 1190, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "6128:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1191, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5937:210:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 1160, + "id": 1192, + "nodeType": "Return", + "src": "5930:217:5" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Fee amount as a mesuare of basis points\",\n\"min\":\"Minimum fee amount\",\n\"max\":\"Maximum fee amount\",\n\"flat\":\"Flat fee amount\",\n\"contract\":\"Address of fee contract\"\n}", + "id": 1194, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1147, + "nodeType": "ParameterList", + "parameters": [], + "src": "5760:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1160, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1149, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5784:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1148, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5784:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1151, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5794:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1150, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5794:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1153, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5804:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5804:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1155, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5814:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1154, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5814:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1157, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5825:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1156, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5825:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1159, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "5839:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1158, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5839:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5783:75:5" + }, + "scope": 1335, + "src": "5739:415:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1212, + "nodeType": "Block", + "src": "6453:82:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1206, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "6513:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6505:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6505:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1203, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6486:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1204, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "6486:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 1208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6486:33:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1209, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1196, + "src": "6521:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1201, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6468:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 2988, + "src": "6468:17:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6468:60:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1200, + "id": 1211, + "nodeType": "Return", + "src": "6461:67:5" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount Amount to calculcate fee value\n@return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}", + "id": 1213, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1197, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1196, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1213, + "src": "6408:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6408:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6407:13:5" + }, + "payable": false, + "returnParameters": { + "id": 1200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1199, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 1213, + "src": "6442:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6442:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6441:11:5" + }, + "scope": 1335, + "src": "6385:150:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1242, + "nodeType": "Block", + "src": "6854:288:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1230, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "7008:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7000:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7000:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1227, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6981:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1228, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "6981:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6981:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1233, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1215, + "src": "7016:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1234, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1217, + "src": "7020:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7028:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 1225, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "6968:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3140, + "src": "6968:12:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6968:66:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d65746572732e", + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7044:64:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7b56f975cae833aef0f2ad6bba848437a58a03519ddd4635658465a8db99bc8b", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters.\"" + }, + "value": "Error: Unable to transfer funds. Please check your parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7b56f975cae833aef0f2ad6bba848437a58a03519ddd4635658465a8db99bc8b", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters.\"" + } + ], + "id": 1224, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6951:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6951:165:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1239, + "nodeType": "ExpressionStatement", + "src": "6951:165:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7131:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1223, + "id": 1241, + "nodeType": "Return", + "src": "7124:11:5" + } + ] + }, + "documentation": "@notice transfers 'amount' from msg.sender to a receiving account 'to'\n@param to Receiving address\n@param amount Transfer amount\n@return {\"success\" : \"Returns true if transfer succeeds\"}", + "id": 1243, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1220, + "modifierName": { + "argumentTypes": null, + "id": 1219, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1334, + "src": "6817:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6817:13:5" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1215, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6785:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1214, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6785:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1217, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6797:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1216, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6797:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6784:25:5" + }, + "payable": false, + "returnParameters": { + "id": 1223, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1222, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6840:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1221, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6840:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6839:14:5" + }, + "scope": 1335, + "src": "6767:375:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1275, + "nodeType": "Block", + "src": "7522:371:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1262, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "7685:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7677:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7677:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1259, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "7658:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenSymbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 2418, + "src": "7658:18:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 1264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7658:33:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1265, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1245, + "src": "7693:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1266, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1247, + "src": "7699:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1267, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1249, + "src": "7703:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 1268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7711:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 1257, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "7641:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1258, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3236, + "src": "7641:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7641:76:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e64732e20506c6561736520636865636b20796f757220706172616d657465727320616e6420656e7375726520746865207370656e646572206861732074686520617070726f76656420616d6f756e74206f662066756e647320746f207472616e736665722e", + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7727:132:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_90b3ee7dad40e5e7ebb3851f6571fdf83a7fec9d6544d7d132d092fa849919cf", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"" + }, + "value": "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_90b3ee7dad40e5e7ebb3851f6571fdf83a7fec9d6544d7d132d092fa849919cf", + "typeString": "literal_string \"Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer.\"" + } + ], + "id": 1256, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "7624:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7624:243:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1272, + "nodeType": "ExpressionStatement", + "src": "7624:243:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7882:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1255, + "id": 1274, + "nodeType": "Return", + "src": "7875:11:5" + } + ] + }, + "documentation": "@notice spender transfers from approvers account to the reciving account\n@param from Approver's address\n@param to Receiving address\n@param amount Transfer amount\n@return {\"success\" : \"Returns true if transferFrom succeeds\"}", + "id": 1276, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1252, + "modifierName": { + "argumentTypes": null, + "id": 1251, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1334, + "src": "7485:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7485:13:5" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1250, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "7439:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7439:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "7453:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1246, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7453:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1249, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "7465:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1248, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7465:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7438:39:5" + }, + "payable": false, + "returnParameters": { + "id": 1255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "7508:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1253, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7508:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7507:14:5" + }, + "scope": 1335, + "src": "7417:476:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1298, + "nodeType": "Block", + "src": "8190:315:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1290, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1278, + "src": "8326:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1291, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1280, + "src": "8335:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "8305:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1289, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "approveAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 3508, + "src": "8305:20:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 1292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8305:37:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20617070726f766520616c6c6f77616e636520666f72207370656e6465722e20506c6561736520656e73757265207370656e646572206973206e6f74206e756c6c20616e6420646f6573206e6f74206861766520612066726f7a656e2062616c616e63652e", + "id": 1293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8352:119:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_10872a80d40cd7a7ea8407e27ca3b5f442e099403eb78ad6b966b1054a4f032f", + "typeString": "literal_string \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"" + }, + "value": "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_10872a80d40cd7a7ea8407e27ca3b5f442e099403eb78ad6b966b1054a4f032f", + "typeString": "literal_string \"Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance.\"" + } + ], + "id": 1287, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8288:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8288:191:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1295, + "nodeType": "ExpressionStatement", + "src": "8288:191:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8494:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1286, + "id": 1297, + "nodeType": "Return", + "src": "8487:11:5" + } + ] + }, + "documentation": "@notice approves spender a given amount\n@param spender Spender's address\n@param amount Allowance amount\n@return {\"success\" : \"Returns true if approve succeeds\"}", + "id": 1299, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1283, + "modifierName": { + "argumentTypes": null, + "id": 1282, + "name": "notDeprecated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1334, + "src": "8153:13:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8153:13:5" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1278, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1299, + "src": "8116:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1277, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8116:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1280, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1299, + "src": "8133:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1279, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8133:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8115:30:5" + }, + "payable": false, + "returnParameters": { + "id": 1286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1285, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1299, + "src": "8176:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1284, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8176:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8175:14:5" + }, + "scope": 1335, + "src": "8099:406:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1318, + "nodeType": "Block", + "src": "8723:131:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1310, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "8773:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8765:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8765:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1307, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "8739:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setDeprecatedContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 4172, + "src": "8739:25:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 1312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8739:40:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2064657072656361746520636f6e747261637421", + "id": 1313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8789:38:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f549c81276a394c8d1eccc4a6bca4eec7c9bb1e25bd84511bd278b767e7ca4e8", + "typeString": "literal_string \"Error: Unable to deprecate contract!\"" + }, + "value": "Error: Unable to deprecate contract!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f549c81276a394c8d1eccc4a6bca4eec7c9bb1e25bd84511bd278b767e7ca4e8", + "typeString": "literal_string \"Error: Unable to deprecate contract!\"" + } + ], + "id": 1306, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8731:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8731:97:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1315, + "nodeType": "ExpressionStatement", + "src": "8731:97:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8843:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1305, + "id": 1317, + "nodeType": "Return", + "src": "8836:11:5" + } + ] + }, + "documentation": "@notice gets currency status of contract\n@return {\"deprecated\" : \"Returns true if deprecated, false otherwise\"}", + "id": 1319, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1302, + "modifierName": { + "argumentTypes": null, + "id": 1301, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "8687:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8687:9:5" + } + ], + "name": "deprecateInterface", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1300, + "nodeType": "ParameterList", + "parameters": [], + "src": "8677:2:5" + }, + "payable": false, + "returnParameters": { + "id": 1305, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1304, + "name": "deprecated", + "nodeType": "VariableDeclaration", + "scope": 1319, + "src": "8706:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1303, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8706:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8705:17:5" + }, + "scope": 1335, + "src": "8650:204:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1333, + "nodeType": "Block", + "src": "8885:198:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8952:40:5", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1325, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "8986:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOERC20_$1335", + "typeString": "contract TokenIOERC20" + } + ], + "id": 1324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8978:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8978:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1322, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "8953:3:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1323, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isContractDeprecated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4198, + "src": "8953:24:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 1327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8953:39:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20436f6e747261637420686173206265656e20646570726563617465642c2063616e6e6f7420706572666f726d206f7065726174696f6e21", + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9002:64:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a6979b55ecdc4b5fbdddeea2b203ef30bc5c99bf716d9b4a8c9faef6ad0dbbcc", + "typeString": "literal_string \"Error: Contract has been deprecated, cannot perform operation!\"" + }, + "value": "Error: Contract has been deprecated, cannot perform operation!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a6979b55ecdc4b5fbdddeea2b203ef30bc5c99bf716d9b4a8c9faef6ad0dbbcc", + "typeString": "literal_string \"Error: Contract has been deprecated, cannot perform operation!\"" + } + ], + "id": 1321, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8944:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:123:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1331, + "nodeType": "ExpressionStatement", + "src": "8944:123:5" + }, + { + "id": 1332, + "nodeType": "PlaceholderStatement", + "src": "9075:1:5" + } + ] + }, + "documentation": null, + "id": 1334, + "name": "notDeprecated", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1320, + "nodeType": "ParameterList", + "parameters": [], + "src": "8882:2:5" + }, + "src": "8860:223:5", + "visibility": "internal" + } + ], + "scope": 1336, + "src": "1060:8028:5" + } + ], + "src": "0:9089:5" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0xb8758d5dbec7202706b0420399571a65536a64c5", + "transactionHash": "0x0de5b672ffa6b410a8abba546ece92cb4b6b67c0008f552460107a17a6959a87" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0x2a504b5e7ec284aca5b6f49716611237239f0b97", + "transactionHash": "0x733d92efa84b868fdddbfdbad0983443c97e202da65903f8aa82ea080338b376" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:36:20.208Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOFX.json b/deployed/mainnet-v1.0.1/TokenIOFX.json new file mode 100644 index 0000000..f905273 --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIOFX.json @@ -0,0 +1,2198 @@ +{ + "contractName": "TokenIOFX", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "requester", + "type": "address" + }, + { + "name": "symbolA", + "type": "string" + }, + { + "name": "symbolB", + "type": "string" + }, + { + "name": "valueA", + "type": "uint256" + }, + { + "name": "valueB", + "type": "uint256" + }, + { + "name": "sigV", + "type": "uint8" + }, + { + "name": "sigR", + "type": "bytes32" + }, + { + "name": "sigS", + "type": "bytes32" + }, + { + "name": "expiration", + "type": "uint256" + } + ], + "name": "swap", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051602080611ee3833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a039094169390931783558154169091179055611e6d90819061007690396000f3006080604052600436106100535763ffffffff60e060020a6000350416634bbc142c8114610058578063666a34271461008d578063666e1b39146100ae578063987c6b9d146100cf578063f2fde38b14610194575b600080fd5b34801561006457600080fd5b50610079600160a060020a03600435166101b5565b604080519115158252519081900360200190f35b34801561009957600080fd5b50610079600160a060020a0360043516610295565b3480156100ba57600080fd5b50610079600160a060020a0360043516610372565b3480156100db57600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610079958335600160a060020a031695369560449491939091019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497505084359550505060208301359260ff60408201351692506060810135915060808101359060a00135610387565b3480156101a057600080fd5b50610079600160a060020a0360043516610454565b3360009081526020819052604081205460ff161515610244576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610324576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60006103a260018b8b8b8b8b8b8b8b8b63ffffffff6105b216565b1515610444576040805160e560020a62461bcd02815260206004820152604760248201527f4572726f723a20556e61626c6520746f20706572666f726d2061746f6d69632060448201527f63757272656e637920737761702e20506c6561736520636865636b207061726160648201527f6d65746572732e00000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b5060019998505050505050505050565b3360009081526020819052604081205460ff1615156104e3576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515610543576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b6000808a8a8a8a8a876040516020018087600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140186805190602001908083835b602083106106145780518252601f1990920191602091820191016105f5565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b6020831061065c5780518252601f19909201916020918201910161063d565b6001836020036101000a03801982511681845116808217855250505050505090500184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b602083106106d65780518252601f1990920191602091820191016106b7565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506107108c338d610c3c565b151561078c576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a204f6e6c79207665726966696564206163636f756e747320636160448201527f6e20706572666f726d2063757272656e63792073776170732e00000000000000606482015290519081900360840190fd5b6107968c82610da0565b1515610812576040805160e560020a62461bcd02815260206004820152603560248201527f4572726f723a204661696c656420746f20736574207472616e73616374696f6e60448201527f2073746174757320746f2066756c66696c6c65642e0000000000000000000000606482015290519081900360840190fd5b4283101561086a576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a205472616e73616374696f6e2068617320657870697265642100604482015290519081900360640190fd5b604080516000808252602080830180855285905260ff8a168385015260608301899052608083018890529251600160a060020a038f169360019360a0808201949293601f198101939281900390910191865af11580156108ce573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610984576040805160e560020a62461bcd02815260206004820152605660248201527f4572726f723a204164647265737320646572697665642066726f6d207472616e60448201527f73616374696f6e207369676e617475726520646f6573206e6f74206d6174636860648201527f2074686520726571756573746572206164647265737300000000000000000000608482015290519081900360a40190fd5b6109c78c8b338e8c6040805190810160405280600381526020017f307830000000000000000000000000000000000000000000000000000000000081525061105d565b1515610a43576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b610a868c8a8d338b6040805190810160405280600381526020017f307830000000000000000000000000000000000000000000000000000000000081525061105d565b1515610b02576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b7f8afc838de412aaa0858b29e225f1811126bc93a1e25da13505909c403d2097d18a8a8a8a87866040518080602001806020018781526020018681526020018581526020018460001916600019168152602001838103835289818151815260200191508051906020019080838360005b83811015610b8a578181015183820152602001610b72565b50505050905090810190601f168015610bb75780820380516001836020036101000a031916815260200191505b5083810382528851815288516020918201918a019080838360005b83811015610bea578181015183820152602001610bd2565b50505050905090810190601f168015610c175780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a15060019b9a5050505050505050505050565b6000610c488484611817565b1515610cea576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a204163636f756e74206973206e6f74207665726966696564206660448201527f6f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f60648201527f756e7420686173206265656e204b594320617070726f7665642e000000000000608482015290519081900360a40190fd5b610cf48483611817565b1515610d96576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a204163636f756e74206973206e6f74207665726966696564206660448201527f6f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f60648201527f756e7420686173206265656e204b594320617070726f7665642e000000000000608482015290519081900360a40190fd5b5060019392505050565b6000808260405160200180807f74782e737461747573000000000000000000000000000000000000000000000081525060090182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310610e225780518252601f199092019160209182019101610e03565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050610e5b848461192e565b15610efc576040805160e560020a62461bcd02815260206004820152604e60248201527f4572726f723a205472616e73616374696f6e20737461747573206d757374206260448201527f652066616c7365206265666f72652073657474696e6720746865207472616e7360648201527f616374696f6e207374617475732e000000000000000000000000000000000000608482015290519081900360a40190fd5b8354604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101849052600160248201529051600160a060020a039092169163abfdcced916044808201926020929091908290030181600087803b158015610f6957600080fd5b505af1158015610f7d573d6000803e3d6000fd5b505050506040513d6020811015610f9357600080fd5b50511515610d96576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b60008080600160a060020a03861615156110e7576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876110f28a89611a71565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061114c5780518252601f19909201916020918201910161112d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106111d75780518252601f1990920191602091820191016111b8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150876112118a88611a71565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061126b5780518252601f19909201916020918201910161124c565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106112f65780518252601f1990920191602091820191016112d7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018a90529451909750600160a060020a03909416955063e2a4853a945087936113c793508b92879263bd02d0f5926024808401938290030181600087803b15801561138f57600080fd5b505af11580156113a3573d6000803e3d6000fd5b505050506040513d60208110156113b957600080fd5b50519063ffffffff611bec16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b505050506040513d602081101561143957600080fd5b50511515611503576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8854604080517fbd02d0f5000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163e2a4853a9184916115b0918a91869163bd02d0f59160248083019260209291908290030181600087803b15801561157857600080fd5b505af115801561158c573d6000803e3d6000fd5b505050506040513d60208110156115a257600080fd5b50519063ffffffff611c7116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505050506040513d602081101561162257600080fd5b505115156116ec576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561176b578181015183820152602001611753565b50505050905090810190601f1680156117985780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156117cb5781810151838201526020016117b3565b50505050905090810190601f1680156117f85780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b60006118238383611cfb565b151561189f576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a204163636f756e7420646f6573206e6f742068617665204b594360448201527f20617070726f76616c2e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b6118a98383611d9e565b1515611925576040805160e560020a62461bcd02815260206004820152602481018290527f4572726f723a204163636f756e7420737461747573206973206066616c73656060448201527f2e204163636f756e7420737461747573206d757374206265206074727565602e606482015290519081900360840190fd5b50600192915050565b6000808260405160200180807f74782e737461747573000000000000000000000000000000000000000000000081525060090182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b602083106119b05780518252601f199092019160209182019101611991565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015611a3d57600080fd5b505af1158015611a51573d6000803e3d6000fd5b505050506040513d6020811015611a6757600080fd5b5051949350505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611b0e5780518252601f199092019160209182019101611aef565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b505050506040513d6020811015611bc557600080fd5b50519050600160a060020a03811615611be057809250611be4565b8392505b505092915050565b600082821115611c6b576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b600082820183811015611cf4576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b600080611d088484611a71565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401915050604051602081830303815290604052604051808280519060200190808383602083106119b05780518252601f199092019160209182019101611991565b600080611dab8484611a71565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401915050604051602081830303815290604052604051808280519060200190808383602083106119b05780518252601f1990920191602091820191016119915600a165627a7a7230582020a7da2a9e4b437f969c65614da8c78fb61ffa8c962ab3046da9bc4a3e204c7f0029", + "deployedBytecode": "0x6080604052600436106100535763ffffffff60e060020a6000350416634bbc142c8114610058578063666a34271461008d578063666e1b39146100ae578063987c6b9d146100cf578063f2fde38b14610194575b600080fd5b34801561006457600080fd5b50610079600160a060020a03600435166101b5565b604080519115158252519081900360200190f35b34801561009957600080fd5b50610079600160a060020a0360043516610295565b3480156100ba57600080fd5b50610079600160a060020a0360043516610372565b3480156100db57600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610079958335600160a060020a031695369560449491939091019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497505084359550505060208301359260ff60408201351692506060810135915060808101359060a00135610387565b3480156101a057600080fd5b50610079600160a060020a0360043516610454565b3360009081526020819052604081205460ff161515610244576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610324576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60006103a260018b8b8b8b8b8b8b8b8b63ffffffff6105b216565b1515610444576040805160e560020a62461bcd02815260206004820152604760248201527f4572726f723a20556e61626c6520746f20706572666f726d2061746f6d69632060448201527f63757272656e637920737761702e20506c6561736520636865636b207061726160648201527f6d65746572732e00000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b5060019998505050505050505050565b3360009081526020819052604081205460ff1615156104e3576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515610543576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b6000808a8a8a8a8a876040516020018087600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140186805190602001908083835b602083106106145780518252601f1990920191602091820191016105f5565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b6020831061065c5780518252601f19909201916020918201910161063d565b6001836020036101000a03801982511681845116808217855250505050505090500184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b602083106106d65780518252601f1990920191602091820191016106b7565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506107108c338d610c3c565b151561078c576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a204f6e6c79207665726966696564206163636f756e747320636160448201527f6e20706572666f726d2063757272656e63792073776170732e00000000000000606482015290519081900360840190fd5b6107968c82610da0565b1515610812576040805160e560020a62461bcd02815260206004820152603560248201527f4572726f723a204661696c656420746f20736574207472616e73616374696f6e60448201527f2073746174757320746f2066756c66696c6c65642e0000000000000000000000606482015290519081900360840190fd5b4283101561086a576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a205472616e73616374696f6e2068617320657870697265642100604482015290519081900360640190fd5b604080516000808252602080830180855285905260ff8a168385015260608301899052608083018890529251600160a060020a038f169360019360a0808201949293601f198101939281900390910191865af11580156108ce573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610984576040805160e560020a62461bcd02815260206004820152605660248201527f4572726f723a204164647265737320646572697665642066726f6d207472616e60448201527f73616374696f6e207369676e617475726520646f6573206e6f74206d6174636860648201527f2074686520726571756573746572206164647265737300000000000000000000608482015290519081900360a40190fd5b6109c78c8b338e8c6040805190810160405280600381526020017f307830000000000000000000000000000000000000000000000000000000000081525061105d565b1515610a43576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b610a868c8a8d338b6040805190810160405280600381526020017f307830000000000000000000000000000000000000000000000000000000000081525061105d565b1515610b02576040805160e560020a62461bcd02815260206004820152602b60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e742e000000000000000000000000000000000000000000606482015290519081900360840190fd5b7f8afc838de412aaa0858b29e225f1811126bc93a1e25da13505909c403d2097d18a8a8a8a87866040518080602001806020018781526020018681526020018581526020018460001916600019168152602001838103835289818151815260200191508051906020019080838360005b83811015610b8a578181015183820152602001610b72565b50505050905090810190601f168015610bb75780820380516001836020036101000a031916815260200191505b5083810382528851815288516020918201918a019080838360005b83811015610bea578181015183820152602001610bd2565b50505050905090810190601f168015610c175780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a15060019b9a5050505050505050505050565b6000610c488484611817565b1515610cea576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a204163636f756e74206973206e6f74207665726966696564206660448201527f6f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f60648201527f756e7420686173206265656e204b594320617070726f7665642e000000000000608482015290519081900360a40190fd5b610cf48483611817565b1515610d96576040805160e560020a62461bcd02815260206004820152605a60248201527f4572726f723a204163636f756e74206973206e6f74207665726966696564206660448201527f6f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f60648201527f756e7420686173206265656e204b594320617070726f7665642e000000000000608482015290519081900360a40190fd5b5060019392505050565b6000808260405160200180807f74782e737461747573000000000000000000000000000000000000000000000081525060090182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310610e225780518252601f199092019160209182019101610e03565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050610e5b848461192e565b15610efc576040805160e560020a62461bcd02815260206004820152604e60248201527f4572726f723a205472616e73616374696f6e20737461747573206d757374206260448201527f652066616c7365206265666f72652073657474696e6720746865207472616e7360648201527f616374696f6e207374617475732e000000000000000000000000000000000000608482015290519081900360a40190fd5b8354604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101849052600160248201529051600160a060020a039092169163abfdcced916044808201926020929091908290030181600087803b158015610f6957600080fd5b505af1158015610f7d573d6000803e3d6000fd5b505050506040513d6020811015610f9357600080fd5b50511515610d96576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b60008080600160a060020a03861615156110e7576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876110f28a89611a71565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061114c5780518252601f19909201916020918201910161112d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106111d75780518252601f1990920191602091820191016111b8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150876112118a88611a71565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061126b5780518252601f19909201916020918201910161124c565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106112f65780518252601f1990920191602091820191016112d7565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018a90529451909750600160a060020a03909416955063e2a4853a945087936113c793508b92879263bd02d0f5926024808401938290030181600087803b15801561138f57600080fd5b505af11580156113a3573d6000803e3d6000fd5b505050506040513d60208110156113b957600080fd5b50519063ffffffff611bec16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b505050506040513d602081101561143957600080fd5b50511515611503576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8854604080517fbd02d0f5000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163e2a4853a9184916115b0918a91869163bd02d0f59160248083019260209291908290030181600087803b15801561157857600080fd5b505af115801561158c573d6000803e3d6000fd5b505050506040513d60208110156115a257600080fd5b50519063ffffffff611c7116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505050506040513d602081101561162257600080fd5b505115156116ec576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561176b578181015183820152602001611753565b50505050905090810190601f1680156117985780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156117cb5781810151838201526020016117b3565b50505050905090810190601f1680156117f85780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b60006118238383611cfb565b151561189f576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a204163636f756e7420646f6573206e6f742068617665204b594360448201527f20617070726f76616c2e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b6118a98383611d9e565b1515611925576040805160e560020a62461bcd02815260206004820152602481018290527f4572726f723a204163636f756e7420737461747573206973206066616c73656060448201527f2e204163636f756e7420737461747573206d757374206265206074727565602e606482015290519081900360840190fd5b50600192915050565b6000808260405160200180807f74782e737461747573000000000000000000000000000000000000000000000081525060090182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b602083106119b05780518252601f199092019160209182019101611991565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f7ae1cfca000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a039094169550637ae1cfca945060248083019491935090918290030181600087803b158015611a3d57600080fd5b505af1158015611a51573d6000803e3d6000fd5b505050506040513d6020811015611a6757600080fd5b5051949350505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611b0e5780518252601f199092019160209182019101611aef565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b505050506040513d6020811015611bc557600080fd5b50519050600160a060020a03811615611be057809250611be4565b8392505b505092915050565b600082821115611c6b576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b600082820183811015611cf4576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b600080611d088484611a71565b60405160200180807f6163636f756e742e6b7963000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401915050604051602081830303815290604052604051808280519060200190808383602083106119b05780518252601f199092019160209182019101611991565b600080611dab8484611a71565b60405160200180807f6163636f756e742e616c6c6f7765640000000000000000000000000000000000815250600f0182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401915050604051602081830303815290604052604051808280519060200190808383602083106119b05780518252601f1990920191602091820191016119915600a165627a7a7230582020a7da2a9e4b437f969c65614da8c78fb61ffa8c962ab3046da9bc4a3e204c7f0029", + "sourceMap": "1069:2138:6:-;;;1374:458;8:9:-1;5:2;;;30:1;27;20:12;5:2;1374:458:6;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1374:458:6;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1708:46:6;;-1:-1:-1;;;;;;1708:46:6;-1:-1:-1;;;;;1708:46:6;;;;;;;;;1804:24;;;;;;;;1069:2138;;;;;;;;", + "deployedSourceMap": "1069:2138:6:-;;;;;;;;;-1:-1:-1;;;1069:2138:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;;;;;;;;;;;;;;;;;;;2571:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;2769:435:6;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2769:435:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2769:435:6;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2769:435:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2769:435:6;;;;-1:-1:-1;2769:435:6;-1:-1:-1;2769:435:6;;-1:-1:-1;2769:435:6;;;;;;;;-1:-1:-1;2769:435:6;;-1:-1:-1;;2769:435:6;;;-1:-1:-1;;;2769:435:6;;;;;;;;;;;;-1:-1:-1;2769:435:6;;;;;-1:-1:-1;2769:435:6;;;;;;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2127:185;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;2571:188::-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;2769:435:6:-;2973:12;3008:87;:3;3021:9;3032:7;3041;3050:6;3058;3066:4;3072;3078;3084:10;3008:87;:12;:87;:::i;:::-;2993:189;;;;;;;-1:-1:-1;;;;;2993:189:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3195:4:6;2769:435;;;;;;;;;;;:::o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;53098:1683:8:-;53331:12;53352:16;53398:9;53409:7;53418;53427:6;53435;53443:10;53381:73;;;;;;-1:-1:-1;;;;;53381:73:8;-1:-1:-1;;;;;53381:73:8;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;53381:73:8;;;;;;;;;;-1:-1:-1;53381:73:8;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;53381:73:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;53381:73:8;;;53371:84;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;53371:84:8;;;;;;;;;;;;;;;;53352:103;;53613:43;53628:4;53634:10;53646:9;53613:14;:43::i;:::-;53598:126;;;;;;;-1:-1:-1;;;;;53598:126:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53836:27;53848:4;53854:8;53836:11;:27::i;:::-;53821:106;;;;;;;-1:-1:-1;;;;;53821:106:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54006:3;53992:17;;;53984:61;;;;;-1:-1:-1;;;;;53984:61:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;54195:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;54195:50:8;;;:37;;;;;;;;;-1:-1:-1;;54195:37:8;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;54195:37:8;;;;;;;;-1:-1:-1;;;;;54195:50:8;;54180:162;;;;;;;-1:-1:-1;;;;;54180:162:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54422:66;54436:4;54442:7;54451:10;54463:9;54474:6;54422:66;;;;;;;;;;;;;;;;;;:13;:66::i;:::-;54407:135;;;;;;;-1:-1:-1;;;;;54407:135:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54564:66;54578:4;54584:7;54593:9;54604:10;54616:6;54564:66;;;;;;;;;;;;;;;;;;:13;:66::i;:::-;54549:135;;;;;;;-1:-1:-1;;;;;54549:135:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54696:62;54703:7;54712;54721:6;54729;54737:10;54749:8;54696:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;54696:62:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;54696:62:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;54696:62:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;54772:4:8;;53098:1683;-1:-1:-1;;;;;;;;;;;53098:1683:8:o;32271:451::-;32373:13;32409:29;32423:4;32429:8;32409:13;:29::i;:::-;32394:150;;;;;;;-1:-1:-1;;;;;32394:150:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32565:29;32579:4;32585:8;32565:13;:29::i;:::-;32550:150;;;;;;;-1:-1:-1;;;;;32550:150:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32713:4:8;32271:451;;;;;:::o;51451:574::-;51525:12;51545:10;51598:6;51568:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;51568:37:8;;;51558:48;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;51558:48:8;;;;;;;;;;;;;;;;51545:61;;51676:25;51688:4;51694:6;51676:11;:25::i;:::-;51675:26;51667:123;;;;;-1:-1:-1;;;;;51667:123:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51856:12;;:30;;;;;;;;;;;;:12;:30;;;;;;-1:-1:-1;;;;;51856:12:8;;;;:20;;:30;;;;;;;;;;;;;;;:12;;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;51856:30:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51856:30:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;51856:30:8;51848:154;;;;;;;-1:-1:-1;;;;;51848:154:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38207:943;38335:12;;;-1:-1:-1;;;;;38370:18:8;;;;38355:86;;;;;-1:-1:-1;;;;;38355:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38507:8;38517:31;38537:4;38543;38517:19;:31::i;:::-;38473:76;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38473:76:8;;;;;;;-1:-1:-1;;;;;38473:76:8;-1:-1:-1;;;;;38473:76:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38473:76:8;;;38463:87;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38463:87:8;;;;;;;;;;;;;;;;38448:102;;38615:8;38625:29;38645:4;38651:2;38625:19;:29::i;:::-;38581:74;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38581:74:8;;;;;;;-1:-1:-1;;;;;38581:74:8;-1:-1:-1;;;;;38581:74:8;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38581:74:8;;;38571:85;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;38571:85:8;;;;;;;;;;;;38678:12;;38705:26;;;;;;;;;;;38571:85;;-1:-1:-1;;;;;;38678:12:8;;;;-1:-1:-1;38678:20:8;;-1:-1:-1;38705:26:8;;:38;;-1:-1:-1;38736:6:8;;38678:12;;38705:20;;:26;;;;;;;;;;-1:-1:-1;38678:12:8;38705:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38705:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38705:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38705:26:8;;:38;:30;:38;:::i;:::-;38678:66;;;;;-1:-1:-1;;;38678:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38678:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38678:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38678:66:8;38663:202;;;;;;;-1:-1:-1;;;;;38663:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38886:12;;38913:26;;;;;;;;;;;;;;-1:-1:-1;;;;;38886:12:8;;;;:20;;38907:4;;38913:38;;38944:6;;38886:12;;38913:20;;:26;;;;;;;;;;;;;;38886:12;;38913:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38913:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38913:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38913:26:8;;:38;:30;:38;:::i;:::-;38886:66;;;;;-1:-1:-1;;;38886:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38886:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38886:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38886:66:8;38871:202;;;;;;;-1:-1:-1;;;;;38871:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39110:2;-1:-1:-1;;;;;39085:42:8;39104:4;-1:-1:-1;;;;;39085:42:8;;39094:8;39114:6;39122:4;39085:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39085:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39085:42:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39085:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39141:4:8;;38207:943;-1:-1:-1;;;;;;;;38207:943:8:o;33115:359::-;33197:13;33233:29;33248:4;33254:7;33233:14;:29::i;:::-;33218:102;;;;;;;-1:-1:-1;;;;;33218:102:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33341:31;33358:4;33364:7;33341:16;:31::i;:::-;33326:126;;;;;;;-1:-1:-1;;;;;33326:126:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33465:4:8;33115:359;;;;:::o;50927:203::-;51006:13;51027:10;51080:6;51050:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;51050:37:8;;;51040:48;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;51040:48:8;;;;;;;;;;;;51101:12;;:24;;;;;;;;;;;51040:48;;-1:-1:-1;;;;;;51101:12:8;;;;-1:-1:-1;51101:20:8;;-1:-1:-1;51101:24:8;;;;;263:2:-1;;-1:-1;51101:24:8;;;;;;;-1:-1:-1;51101:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;51101:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51101:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;51101:24:8;;50927:203;-1:-1:-1;;;;50927:203:8:o;16400:357::-;16488:25;16521:10;16594:23;16579:7;16544:43;;;;;;;;;;;;;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;;;16544:43:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16544:43:8;;;16534:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16534:54:8;;;;;;;;;;;;16620:12;;:27;;;;;;;;;;;16534:54;;-1:-1:-1;;;;;;16620:12:8;;;;-1:-1:-1;16620:23:8;;-1:-1:-1;16620:27:8;;;;;263:2:-1;;-1:-1;16620:27:8;;;;;;;-1:-1:-1;16620:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16620:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16620:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16620:27:8;;-1:-1:-1;;;;;;16657:22:8;;;16653:100;;16696:15;16689:22;;;;16653:100;16739:7;16732:14;;16653:100;16400:357;;;;;;:::o;1143:234:2:-;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;1540:174::-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1708:1;1540:174;-1:-1:-1;;;1540:174:2:o;17160:239:8:-;17243:11;17264:10;17319:34;17339:4;17345:7;17319:19;:34::i;:::-;17287:67;;;;;;;;;;;;;-1:-1:-1;;;;;17287:67:8;-1:-1:-1;;;;;17287:67:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;17287:67:8;;;17277:78;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;17808:241:8;17893:11;17912:10;17971:34;17991:4;17997:7;17971:19;:34::i;:::-;17935:71;;;;;;;;;;;;;-1:-1:-1;;;;;17935:71:8;-1:-1:-1;;;;;17935:71:8;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;17935:71:8;;;17925:82;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOLib.sol\";\nimport \"./TokenIOStorage.sol\";\n\n\n/**\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title Currency FX Contract for Token, Inc. Smart Money System\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n\n*/\n\ncontract TokenIOFX is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n\n /**\n\t* @notice Constructor method for TokenIOFX contract\n\t* @param _storageContract Address of TokenIOStorage contract\n\t*/\n\tconstructor(address _storageContract) public {\n\t\t\t/// @dev Set the storage contract for the interface\n\t\t\t/// @dev NOTE: This contract will be unable to use the storage constract until\n\t\t\t/// @dev contract address is authorized with the storage contract\n\t\t\t/// @dev Once authorized, Use the `setParams` method to set storage values\n\t\t\tlib.Storage = TokenIOStorage(_storageContract);\n\n\t\t\t/// @dev set owner to contract initiator\n\t\t\towner[msg.sender] = true;\n\t}\n\n\n /**\n * @notice Accepts a signed fx request to swap currency pairs at a given amount;\n * @dev This method can be called directly between peers.\n * @param requester address Requester is the orginator of the offer and must\n * match the signature of the payload submitted by the fulfiller\n * @param symbolA Symbol of the currency desired\n * @param symbolB Symbol of the currency offered\n * @param valueA Amount of the currency desired\n * @param valueB Amount of the currency offered\n * @param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n * @param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n * @param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n * @param expiration Expiration of the offer; Offer is good until expired\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function swap(\n address requester,\n string symbolA,\n string symbolB,\n uint valueA,\n uint valueB,\n uint8 sigV,\n bytes32 sigR,\n bytes32 sigS,\n uint expiration\n ) public returns (bool success) {\n require(\n lib.execSwap(requester, symbolA, symbolB, valueA, valueB, sigV, sigR, sigS, expiration),\n \"Error: Unable to perform atomic currency swap. Please check parameters.\"\n );\n return true;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFX.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFX.sol", + "exportedSymbols": { + "TokenIOFX": [ + 1411 + ] + }, + "id": 1412, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1337, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 1338, + "nodeType": "ImportDirective", + "scope": 1412, + "sourceUnit": 185, + "src": "25:23:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 1339, + "nodeType": "ImportDirective", + "scope": 1412, + "sourceUnit": 4607, + "src": "49:26:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1340, + "nodeType": "ImportDirective", + "scope": 1412, + "sourceUnit": 5226, + "src": "76:30:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1341, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1091:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 1342, + "nodeType": "InheritanceSpecifier", + "src": "1091:7:6" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title Currency FX Contract for Token, Inc. Smart Money System\n@author Ryan Tate , Sean Pollock \n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.", + "fullyImplemented": true, + "id": 1411, + "linearizedBaseContracts": [ + 1411, + 184 + ], + "name": "TokenIOFX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1345, + "libraryName": { + "contractScope": null, + "id": 1343, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1191:10:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1185:37:6", + "typeName": { + "contractScope": null, + "id": 1344, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1206:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 1347, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1411, + "src": "1225:19:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1346, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1225:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1367, + "nodeType": "Block", + "src": "1419:413:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1352, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "1708:3:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1354, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1708:11:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1356, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1349, + "src": "1737:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1355, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1722:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 1357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1722:32:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1708:46:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1359, + "nodeType": "ExpressionStatement", + "src": "1708:46:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1360, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1804:5:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1363, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1361, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1810:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1810:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1804:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1824:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1804:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1366, + "nodeType": "ExpressionStatement", + "src": "1804:24:6" + } + ] + }, + "documentation": "@notice Constructor method for TokenIOFX contract\n@param _storageContract Address of TokenIOStorage contract", + "id": 1368, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1349, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "1386:24:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1348, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1385:26:6" + }, + "payable": false, + "returnParameters": { + "id": 1351, + "nodeType": "ParameterList", + "parameters": [], + "src": "1419:0:6" + }, + "scope": 1411, + "src": "1374:458:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1409, + "nodeType": "Block", + "src": "2987:217:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1394, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1370, + "src": "3021:9:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1395, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "3032:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1396, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3041:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1397, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "3050:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1398, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1378, + "src": "3058:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1399, + "name": "sigV", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1380, + "src": "3066:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 1400, + "name": "sigR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1382, + "src": "3072:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1401, + "name": "sigS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "3078:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1402, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1386, + "src": "3084:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1392, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "3008:3:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1393, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "execSwap", + "nodeType": "MemberAccess", + "referencedDeclaration": 4133, + "src": "3008:12:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,string memory,string memory,uint256,uint256,uint8,bytes32,bytes32,uint256) returns (bool)" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3008:87:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20706572666f726d2061746f6d69632063757272656e637920737761702e20506c6561736520636865636b20706172616d65746572732e", + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3103:73:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6ca463b35e5e08da21998ab6b3d6ced7b8f7a272da9305fde927b3e1999f0037", + "typeString": "literal_string \"Error: Unable to perform atomic currency swap. Please check parameters.\"" + }, + "value": "Error: Unable to perform atomic currency swap. Please check parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6ca463b35e5e08da21998ab6b3d6ced7b8f7a272da9305fde927b3e1999f0037", + "typeString": "literal_string \"Error: Unable to perform atomic currency swap. Please check parameters.\"" + } + ], + "id": 1391, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2993:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2993:189:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1406, + "nodeType": "ExpressionStatement", + "src": "2993:189:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1390, + "id": 1408, + "nodeType": "Return", + "src": "3188:11:6" + } + ] + }, + "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev This method can be called directly between peers.\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1410, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "swap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1370, + "name": "requester", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2788:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2788:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1372, + "name": "symbolA", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2811:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1371, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2811:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1374, + "name": "symbolB", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2831:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1373, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2831:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1376, + "name": "valueA", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2851:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1375, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2851:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1378, + "name": "valueB", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2868:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1377, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2868:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1380, + "name": "sigV", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2885:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1379, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2885:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1382, + "name": "sigR", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2901:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1381, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1384, + "name": "sigS", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2919:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1383, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2919:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1386, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2937:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1385, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2937:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2782:174:6" + }, + "payable": false, + "returnParameters": { + "id": 1390, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1389, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2973:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1388, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2973:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2972:14:6" + }, + "scope": 1411, + "src": "2769:435:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1412, + "src": "1069:2138:6" + } + ], + "src": "0:3208:6" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFX.sol", + "exportedSymbols": { + "TokenIOFX": [ + 1411 + ] + }, + "id": 1412, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1337, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 1338, + "nodeType": "ImportDirective", + "scope": 1412, + "sourceUnit": 185, + "src": "25:23:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 1339, + "nodeType": "ImportDirective", + "scope": 1412, + "sourceUnit": 4607, + "src": "49:26:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1340, + "nodeType": "ImportDirective", + "scope": 1412, + "sourceUnit": 5226, + "src": "76:30:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1341, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1091:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 1342, + "nodeType": "InheritanceSpecifier", + "src": "1091:7:6" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title Currency FX Contract for Token, Inc. Smart Money System\n@author Ryan Tate , Sean Pollock \n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.", + "fullyImplemented": true, + "id": 1411, + "linearizedBaseContracts": [ + 1411, + 184 + ], + "name": "TokenIOFX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1345, + "libraryName": { + "contractScope": null, + "id": 1343, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1191:10:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1185:37:6", + "typeName": { + "contractScope": null, + "id": 1344, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1206:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 1347, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1411, + "src": "1225:19:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1346, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1225:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1367, + "nodeType": "Block", + "src": "1419:413:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1352, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "1708:3:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1354, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1708:11:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1356, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1349, + "src": "1737:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1355, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1722:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 1357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1722:32:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1708:46:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1359, + "nodeType": "ExpressionStatement", + "src": "1708:46:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1360, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1804:5:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1363, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1361, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1810:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1810:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1804:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1824:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1804:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1366, + "nodeType": "ExpressionStatement", + "src": "1804:24:6" + } + ] + }, + "documentation": "@notice Constructor method for TokenIOFX contract\n@param _storageContract Address of TokenIOStorage contract", + "id": 1368, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1349, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "1386:24:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1348, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1385:26:6" + }, + "payable": false, + "returnParameters": { + "id": 1351, + "nodeType": "ParameterList", + "parameters": [], + "src": "1419:0:6" + }, + "scope": 1411, + "src": "1374:458:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1409, + "nodeType": "Block", + "src": "2987:217:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1394, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1370, + "src": "3021:9:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1395, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "3032:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1396, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3041:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 1397, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "3050:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1398, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1378, + "src": "3058:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1399, + "name": "sigV", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1380, + "src": "3066:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 1400, + "name": "sigR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1382, + "src": "3072:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1401, + "name": "sigS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "3078:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1402, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1386, + "src": "3084:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1392, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "3008:3:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1393, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "execSwap", + "nodeType": "MemberAccess", + "referencedDeclaration": 4133, + "src": "3008:12:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,string memory,string memory,uint256,uint256,uint8,bytes32,bytes32,uint256) returns (bool)" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3008:87:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20706572666f726d2061746f6d69632063757272656e637920737761702e20506c6561736520636865636b20706172616d65746572732e", + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3103:73:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6ca463b35e5e08da21998ab6b3d6ced7b8f7a272da9305fde927b3e1999f0037", + "typeString": "literal_string \"Error: Unable to perform atomic currency swap. Please check parameters.\"" + }, + "value": "Error: Unable to perform atomic currency swap. Please check parameters." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6ca463b35e5e08da21998ab6b3d6ced7b8f7a272da9305fde927b3e1999f0037", + "typeString": "literal_string \"Error: Unable to perform atomic currency swap. Please check parameters.\"" + } + ], + "id": 1391, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2993:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2993:189:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1406, + "nodeType": "ExpressionStatement", + "src": "2993:189:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1390, + "id": 1408, + "nodeType": "Return", + "src": "3188:11:6" + } + ] + }, + "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev This method can be called directly between peers.\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1410, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "swap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1370, + "name": "requester", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2788:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2788:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1372, + "name": "symbolA", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2811:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1371, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2811:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1374, + "name": "symbolB", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2831:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1373, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2831:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1376, + "name": "valueA", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2851:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1375, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2851:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1378, + "name": "valueB", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2868:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1377, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2868:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1380, + "name": "sigV", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2885:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1379, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2885:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1382, + "name": "sigR", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2901:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1381, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1384, + "name": "sigS", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2919:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1383, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2919:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1386, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2937:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1385, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2937:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2782:174:6" + }, + "payable": false, + "returnParameters": { + "id": 1390, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1389, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1410, + "src": "2973:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1388, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2973:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2972:14:6" + }, + "scope": 1411, + "src": "2769:435:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1412, + "src": "1069:2138:6" + } + ], + "src": "0:3208:6" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0xb48141a94392502c92f9d29a2a75f129d98a416b", + "transactionHash": "0xee86421ca8e7684ea6744002a8057431b95a3aa8e02df785e81ded080dcdaaa0" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0xf328c11c4df88d18fcbd30ad38d8b4714f4b33bf", + "transactionHash": "0xd471ba1732926c8e460ea9acced4183b9acda6fe2ecb96644d0239a461f13254" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:41:08.923Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOFeeContract.json b/deployed/mainnet-v1.0.1/TokenIOFeeContract.json new file mode 100644 index 0000000..67e50fa --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIOFeeContract.json @@ -0,0 +1,6211 @@ +{ + "contractName": "TokenIOFeeContract", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "feeBps", + "type": "uint256" + }, + { + "name": "feeMin", + "type": "uint256" + }, + { + "name": "feeMax", + "type": "uint256" + }, + { + "name": "feeFlat", + "type": "uint256" + }, + { + "name": "feeMsg", + "type": "bytes" + } + ], + "name": "setFeeParams", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getFeeParams", + "outputs": [ + { + "name": "bps", + "type": "uint256" + }, + { + "name": "min", + "type": "uint256" + }, + { + "name": "max", + "type": "uint256" + }, + { + "name": "flat", + "type": "uint256" + }, + { + "name": "feeMsg", + "type": "bytes" + }, + { + "name": "feeContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + } + ], + "name": "getTokenBalance", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateFees", + "outputs": [ + { + "name": "fees", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "transferCollectedFees", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506040516020806126a4833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a03909416939093178355815416909117905561262e90819061007690396000f30060806040526004361061007f5763ffffffff60e060020a600035041663025abd58811461008457806313b4312f146100ef5780634bbc142c146101b057806352238fdd146101d1578063666a3427146101e9578063666e1b391461020a578063aa08dfd31461022b578063be6fc18114610296578063f2fde38b14610358575b600080fd5b34801561009057600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100dd9436949293602493928401919081908401838280828437509497506103799650505050505050565b60408051918252519081900360200190f35b3480156100fb57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019c94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a919990985060609091019650919450908101925081908401838280828437509497506103939650505050505050565b604080519115158252519081900360200190f35b3480156101bc57600080fd5b5061019c600160a060020a036004351661049a565b3480156101dd57600080fd5b506100dd600435610556565b3480156101f557600080fd5b5061019c600160a060020a036004351661056a565b34801561021657600080fd5b5061019c600160a060020a0360043516610623565b34801561023757600080fd5b50604080516020601f60843560048181013592830184900484028501840190955281845261019c948035946024803595604435956064359536959460a49490939101919081908401838280828437509497506106389650505050505050565b3480156102a257600080fd5b506102ab610916565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b83811015610318578181015183820152602001610300565b50505050905090810190601f1680156103455780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34801561036457600080fd5b5061019c600160a060020a0360043516610987565b600061038d6001833063ffffffff610ac116565b92915050565b3360009081526020819052604081205460ff1615156103fe576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b6104136001863087878763ffffffff610c5716565b151561048f576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a20756e61626c6520746f207472616e736665722066656573207460448201527f6f206163636f756e742e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b506001949350505050565b3360009081526020819052604081205460ff161515610505576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600061038d6001308463ffffffff6113d316565b3360009081526020819052604081205460ff1615156105d5576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff1615156106a3576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b6106b460018763ffffffff6118c416565b151561071e576040805160e560020a62461bcd02815260206004820152602f60248201526000805160206125c383398151915260448201527f7420626173697320706f696e74732e0000000000000000000000000000000000606482015290519081900360840190fd5b61072f60018663ffffffff611ad716565b1515610799576040805160e560020a62461bcd02815260206004820152602e60248201526000805160206125c383398151915260448201527f74206d696e696d756d206665652e000000000000000000000000000000000000606482015290519081900360840190fd5b6107aa60018563ffffffff611b5516565b1515610814576040805160e560020a62461bcd02815260206004820152602e60248201526000805160206125c383398151915260448201527f74206d6178696d756d206665652e000000000000000000000000000000000000606482015290519081900360840190fd5b61082560018463ffffffff611bd316565b151561088f576040805160e560020a62461bcd02815260206004820152602b60248201526000805160206125c383398151915260448201527f7420666c6174206665652e000000000000000000000000000000000000000000606482015290519081900360840190fd5b6108a060018363ffffffff611c5116565b151561090a576040805160e560020a62461bcd02815260206004820152603260248201526000805160206125c383398151915260448201527f742064656661756c74206d6573736167652e0000000000000000000000000000606482015290519081900360840190fd5b50600195945050505050565b600080808060608161092f60013063ffffffff611dc816565b61094060013063ffffffff611f0516565b61095160013063ffffffff611f9616565b61096260013063ffffffff61202716565b61097360013063ffffffff6120b816565b939a92995090975095509093503092509050565b3360009081526020819052604081205460ff1615156109f2576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a0382161515610a52576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b60008083610acf868561226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610b295780518252601f199092019160209182019101610b0a565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610bab5780518252601f199092019160209182019101610b8c565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015610c2257600080fd5b505af1158015610c36573d6000803e3d6000fd5b505050506040513d6020811015610c4c57600080fd5b505195945050505050565b60008080600160a060020a0386161515610ce1576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b87610cec8a8961226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610d465780518252601f199092019160209182019101610d27565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610dc85780518252601f199092019160209182019101610da9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020915087610e028a8861226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610e5c5780518252601f199092019160209182019101610e3d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610ede5780518252601f199092019160209182019101610ebf565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063e2a4853a94508793610f9993508b92879263bd02d0f5926024808401938290030181600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b505050506040513d6020811015610f8b57600080fd5b50519063ffffffff6123dd16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015610fe157600080fd5b505af1158015610ff5573d6000803e3d6000fd5b505050506040513d602081101561100b57600080fd5b505115156110d5576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a91849161116c918a91869163bd02d0f59160248083019260209291908290030181600087803b15801561113457600080fd5b505af1158015611148573d6000803e3d6000fd5b505050506040513d602081101561115e57600080fd5b50519063ffffffff61246216565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156111b457600080fd5b505af11580156111c8573d6000803e3d6000fd5b505050506040513d60208110156111de57600080fd5b505115156112a8576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561132757818101518382015260200161130f565b50505050905090810190601f1680156113545780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561138757818101518382015260200161136f565b50505050905090810190601f1680156113b45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b6020831061146e5780518252601f19909201916020918201910161144f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156114cf57600080fd5b505af11580156114e3573d6000803e3d6000fd5b505050506040513d60208110156114f957600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b6020831061158f5780518252601f199092019160209182019101611570565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156115f057600080fd5b505af1158015611604573d6000803e3d6000fd5b505050506040513d602081101561161a57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106116b05780518252601f199092019160209182019101611691565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561171157600080fd5b505af1158015611725573d6000803e3d6000fd5b505050506040513d602081101561173b57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106117d15780518252601f1990920191602091820191016117b2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561183257600080fd5b505af1158015611846573d6000803e3d6000fd5b505050506040513d602081101561185c57600080fd5b505191506118928261188661271061187a8b8863ffffffff6124ec16565b9063ffffffff61258b16565b9063ffffffff61246216565b9050848111156118a4578495506118b8565b838110156118b4578395506118b8565b8095505b50505050509392505050565b604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b909201928390528151600093849392909182918401908083835b602083106119435780518252601f199092019160209182019101611924565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b1580156119d757600080fd5b505af11580156119eb573d6000803e3d6000fd5b505050506040513d6020811015611a0157600080fd5b50511515611acb576040805160e560020a62461bcd02815260206004820152606860248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b600191505b5092915050565b604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152606060020a300260288301528251601c818403018152603c90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e6d736700000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b909201928390528151600093849392909182918401908083835b60208310611cd05780518252601f199092019160209182019101611cb1565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f2e28d08400000000000000000000000000000000000000000000000000000000845260048401828152602485019687528b5160448601528b51929950600160a060020a039091169750632e28d084965088958b9550909390926064909101919085019080838360005b83811015611d7b578181015183820152602001611d63565b50505050905090810190601f168015611da85780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156119d757600080fd5b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611e5a5780518252601f199092019160209182019101611e3b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015611ed157600080fd5b505af1158015611ee5573d6000803e3d6000fd5b505050506040513d6020811015611efb57600080fd5b5051949350505050565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061214b5780518252601f19909201916020918201910161212c565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b1580156121db57600080fd5b505af11580156121ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561221857600080fd5b81019080805164010000000081111561223057600080fd5b8201602081018481111561224357600080fd5b815164010000000081118282018710171561225d57600080fd5b509098975050505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122ff5780518252601f1990920191602091820191016122e0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561238c57600080fd5b505af11580156123a0573d6000803e3d6000fd5b505050506040513d60208110156123b657600080fd5b50519050600160a060020a038116156123d1578092506123d5565b8392505b505092915050565b60008282111561245c576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000828201838110156124e5576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b6000808315156124ff5760009150611ad0565b5082820282848281151561250f57fe5b04146124e5576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600080828481151561259957fe5b04949350505050560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742066656520636f6e747261634572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820215aae74e74e53e62457eae102d94e8ca00bc9ad6f55716da8455533040c8f5f0029", + "deployedBytecode": "0x60806040526004361061007f5763ffffffff60e060020a600035041663025abd58811461008457806313b4312f146100ef5780634bbc142c146101b057806352238fdd146101d1578063666a3427146101e9578063666e1b391461020a578063aa08dfd31461022b578063be6fc18114610296578063f2fde38b14610358575b600080fd5b34801561009057600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100dd9436949293602493928401919081908401838280828437509497506103799650505050505050565b60408051918252519081900360200190f35b3480156100fb57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019c94369492936024939284019190819084018382808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a919990985060609091019650919450908101925081908401838280828437509497506103939650505050505050565b604080519115158252519081900360200190f35b3480156101bc57600080fd5b5061019c600160a060020a036004351661049a565b3480156101dd57600080fd5b506100dd600435610556565b3480156101f557600080fd5b5061019c600160a060020a036004351661056a565b34801561021657600080fd5b5061019c600160a060020a0360043516610623565b34801561023757600080fd5b50604080516020601f60843560048181013592830184900484028501840190955281845261019c948035946024803595604435956064359536959460a49490939101919081908401838280828437509497506106389650505050505050565b3480156102a257600080fd5b506102ab610916565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b83811015610318578181015183820152602001610300565b50505050905090810190601f1680156103455780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34801561036457600080fd5b5061019c600160a060020a0360043516610987565b600061038d6001833063ffffffff610ac116565b92915050565b3360009081526020819052604081205460ff1615156103fe576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b6104136001863087878763ffffffff610c5716565b151561048f576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a20756e61626c6520746f207472616e736665722066656573207460448201527f6f206163636f756e742e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b506001949350505050565b3360009081526020819052604081205460ff161515610505576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b600061038d6001308463ffffffff6113d316565b3360009081526020819052604081205460ff1615156105d5576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff1615156106a3576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b6106b460018763ffffffff6118c416565b151561071e576040805160e560020a62461bcd02815260206004820152602f60248201526000805160206125c383398151915260448201527f7420626173697320706f696e74732e0000000000000000000000000000000000606482015290519081900360840190fd5b61072f60018663ffffffff611ad716565b1515610799576040805160e560020a62461bcd02815260206004820152602e60248201526000805160206125c383398151915260448201527f74206d696e696d756d206665652e000000000000000000000000000000000000606482015290519081900360840190fd5b6107aa60018563ffffffff611b5516565b1515610814576040805160e560020a62461bcd02815260206004820152602e60248201526000805160206125c383398151915260448201527f74206d6178696d756d206665652e000000000000000000000000000000000000606482015290519081900360840190fd5b61082560018463ffffffff611bd316565b151561088f576040805160e560020a62461bcd02815260206004820152602b60248201526000805160206125c383398151915260448201527f7420666c6174206665652e000000000000000000000000000000000000000000606482015290519081900360840190fd5b6108a060018363ffffffff611c5116565b151561090a576040805160e560020a62461bcd02815260206004820152603260248201526000805160206125c383398151915260448201527f742064656661756c74206d6573736167652e0000000000000000000000000000606482015290519081900360840190fd5b50600195945050505050565b600080808060608161092f60013063ffffffff611dc816565b61094060013063ffffffff611f0516565b61095160013063ffffffff611f9616565b61096260013063ffffffff61202716565b61097360013063ffffffff6120b816565b939a92995090975095509093503092509050565b3360009081526020819052604081205460ff1615156109f2576040805160e560020a62461bcd02815260206004820152603960248201526000805160206125e383398151915260448201526000805160206125a3833981519152606482015290519081900360840190fd5b600160a060020a0382161515610a52576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b60008083610acf868561226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610b295780518252601f199092019160209182019101610b0a565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610bab5780518252601f199092019160209182019101610b8c565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015610c2257600080fd5b505af1158015610c36573d6000803e3d6000fd5b505050506040513d6020811015610c4c57600080fd5b505195945050505050565b60008080600160a060020a0386161515610ce1576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b87610cec8a8961226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610d465780518252601f199092019160209182019101610d27565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610dc85780518252601f199092019160209182019101610da9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020915087610e028a8861226b565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b60208310610e5c5780518252601f199092019160209182019101610e3d565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610ede5780518252601f199092019160209182019101610ebf565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f5460e060020a63bd02d0f5028452600484018a90529451909750600160a060020a03909416955063e2a4853a94508793610f9993508b92879263bd02d0f5926024808401938290030181600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b505050506040513d6020811015610f8b57600080fd5b50519063ffffffff6123dd16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015610fe157600080fd5b505af1158015610ff5573d6000803e3d6000fd5b505050506040513d602081101561100b57600080fd5b505115156110d5576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b88546040805160e060020a63bd02d0f5028152600481018490529051600160a060020a039092169163e2a4853a91849161116c918a91869163bd02d0f59160248083019260209291908290030181600087803b15801561113457600080fd5b505af1158015611148573d6000803e3d6000fd5b505050506040513d602081101561115e57600080fd5b50519063ffffffff61246216565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b1580156111b457600080fd5b505af11580156111c8573d6000803e3d6000fd5b505050506040513d60208110156111de57600080fd5b505115156112a8576040805160e560020a62461bcd02815260206004820152606960248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b8381101561132757818101518382015260200161130f565b50505050905090810190601f1680156113545780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561138757818101518382015260200161136f565b50505050905090810190601f1680156113b45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b6020831061146e5780518252601f19909201916020918201910161144f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156114cf57600080fd5b505af11580156114e3573d6000803e3d6000fd5b505050506040513d60208110156114f957600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b6020831061158f5780518252601f199092019160209182019101611570565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156115f057600080fd5b505af1158015611604573d6000803e3d6000fd5b505050506040513d602081101561161a57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106116b05780518252601f199092019160209182019101611691565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561171157600080fd5b505af1158015611725573d6000803e3d6000fd5b505050506040513d602081101561173b57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106117d15780518252601f1990920191602091820191016117b2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561183257600080fd5b505af1158015611846573d6000803e3d6000fd5b505050506040513d602081101561185c57600080fd5b505191506118928261188661271061187a8b8863ffffffff6124ec16565b9063ffffffff61258b16565b9063ffffffff61246216565b9050848111156118a4578495506118b8565b838110156118b4578395506118b8565b8095505b50505050509392505050565b604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b909201928390528151600093849392909182918401908083835b602083106119435780518252601f199092019160209182019101611924565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b1580156119d757600080fd5b505af11580156119eb573d6000803e3d6000fd5b505050506040513d6020811015611a0157600080fd5b50511515611acb576040805160e560020a62461bcd02815260206004820152606860248201527f4572726f723a20556e61626c6520746f207365742073746f726167652076616c60448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b600191505b5092915050565b604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152606060020a300260288301528251601c818403018152603c90920192839052815160009384939290918291840190808383602083106119435780518252601f199092019160209182019101611924565b604080517f6665652e6d736700000000000000000000000000000000000000000000000000602080830191909152606060020a300260278301528251601b818403018152603b909201928390528151600093849392909182918401908083835b60208310611cd05780518252601f199092019160209182019101611cb1565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f2e28d08400000000000000000000000000000000000000000000000000000000845260048401828152602485019687528b5160448601528b51929950600160a060020a039091169750632e28d084965088958b9550909390926064909101919085019080838360005b83811015611d7b578181015183820152602001611d63565b50505050905090810190601f168015611da85780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156119d757600080fd5b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611e5a5780518252601f199092019160209182019101611e3b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a5460e060020a63bd02d0f5028452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b158015611ed157600080fd5b505af1158015611ee5573d6000803e3d6000fd5b505050506040513d6020811015611efb57600080fd5b5051949350505050565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a02815260140191505060405160208183030381529060405260405180828051906020019080838360208310611e5a5780518252601f199092019160209182019101611e3b565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061214b5780518252601f19909201916020918201910161212c565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b1580156121db57600080fd5b505af11580156121ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561221857600080fd5b81019080805164010000000081111561223057600080fd5b8201602081018481111561224357600080fd5b815164010000000081118282018710171561225d57600080fd5b509098975050505050505050565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122ff5780518252601f1990920191602091820191016122e0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561238c57600080fd5b505af11580156123a0573d6000803e3d6000fd5b505050506040513d60208110156123b657600080fd5b50519050600160a060020a038116156123d1578092506123d5565b8392505b505092915050565b60008282111561245c576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000828201838110156124e5576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b6000808315156124ff5760009150611ad0565b5082820282848281151561250f57fe5b04146124e5576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600080828481151561259957fe5b04949350505050560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742066656520636f6e747261634572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820215aae74e74e53e62457eae102d94e8ca00bc9ad6f55716da8455533040c8f5f0029", + "sourceMap": "1070:3794:7:-;;;1380:458;8:9:-1;5:2;;;30:1;27;20:12;5:2;1380:458:7;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1380:458:7;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1714:46:7;;-1:-1:-1;;;;;;1714:46:7;-1:-1:-1;;;;;1714:46:7;;;;;;;;;1810:24;;;;;;;;1070:3794;;;;;;;;", + "deployedSourceMap": "1070:3794:7:-;;;;;;;;;-1:-1:-1;;;1070:3794:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3729:135;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3729:135:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3729:135:7;;-1:-1:-1;3729:135:7;;-1:-1:-1;;;;;;;3729:135:7;;;;;;;;;;;;;;;;;4587:273;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4587:273:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4587:273:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4587:273:7;;;;;;;;;;;-1:-1:-1;4587:273:7;;;;;-1:-1:-1;4587:273:7;;-1:-1:-1;4587:273:7;;;;-1:-1:-1;4587:273:7;;;;;;;;;;-1:-1:-1;4587:273:7;;-1:-1:-1;4587:273:7;;-1:-1:-1;;;;;;;4587:273:7;;;;;;;;;;;;;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;4033:123:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4033:123:7;;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;2242:572:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2242:572:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2242:572:7;;-1:-1:-1;2242:572:7;;-1:-1:-1;;;;;;;2242:572:7;3159:338;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3159:338:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3159:338:7;-1:-1:-1;;;;;3159:338:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3159:338:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;3729:135:7;3791:12;3816:44;:3;3836:8;3854:4;3816:44;:19;:44;:::i;:::-;3809:51;3729:135;-1:-1:-1;;3729:135:7:o;4587:273::-;1261:10:1;4698:12:7;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;4728:60:7;:3;4746:8;4764:4;4771:2;4775:6;4783:4;4728:60;:17;:60;:::i;:::-;4716:125;;;;;;;-1:-1:-1;;;;;4716:125:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4852:4:7;4587:273;;;;;;:::o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;4033:123:7:-;4090:9;4112:40;:3;4138:4;4145:6;4112:40;:17;:40;:::i;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;2242:572:7:-;1261:10:1;2357:12:7;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;2383:21:7;:3;2397:6;2383:21;:13;:21;:::i;:::-;2375:81;;;;;;;-1:-1:-1;;;;;2375:81:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2375:81:7;;;;;;;;;;;;;;;;;;;;2468:21;:3;2482:6;2468:21;:13;:21;:::i;:::-;2460:80;;;;;;;-1:-1:-1;;;;;2460:80:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2460:80:7;;;;;;;;;;;;;;;;;;;;2552:21;:3;2566:6;2552:21;:13;:21;:::i;:::-;2544:80;;;;;;;-1:-1:-1;;;;;2544:80:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2544:80:7;;;;;;;;;;;;;;;;;;;;2636:23;:3;2651:7;2636:23;:14;:23;:::i;:::-;2628:79;;;;;;;-1:-1:-1;;;;;2628:79:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2628:79:7;;;;;;;;;;;;;;;;;;;;2719:21;:3;2733:6;2719:21;:13;:21;:::i;:::-;2711:84;;;;;;;-1:-1:-1;;;;;2711:84:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2711:84:7;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2806:4:7;2242:572;;;;;;;:::o;3159:338::-;3204:8;;;;3245:12;3204:8;3299:28;:3;3321:4;3299:28;:13;:28;:::i;:::-;3334;:3;3356:4;3334:28;:13;:28;:::i;:::-;3369;:3;3391:4;3369:28;:13;:28;:::i;:::-;3404:29;:3;3427:4;3404:29;:14;:29;:::i;:::-;3440:28;:3;3462:4;3440:28;:13;:28;:::i;:::-;3285:208;;;;-1:-1:-1;3285:208:7;;-1:-1:-1;3285:208:7;-1:-1:-1;3285:208:7;;-1:-1:-1;3483:4:7;;-1:-1:-1;3159:338:7;-1:-1:-1;3159:338:7:o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;28789:266:8:-;28890:12;28910:10;28967:8;28977:34;28997:4;29003:7;28977:19;:34::i;:::-;28933:79;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;28933:79:8;;;;;;;-1:-1:-1;;;;;28933:79:8;-1:-1:-1;;;;;28933:79:8;-1:-1:-1;;;28933:79:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;28933:79:8;;;28923:90;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;28923:90:8;;;;;;;;;;;;29026:12;;-1:-1:-1;;;;;29026:24:8;;;;;;;;;;28923:90;;-1:-1:-1;;;;;;29026:12:8;;;;-1:-1:-1;29026:20:8;;-1:-1:-1;29026:24:8;;;;;263:2:-1;;-1:-1;29026:24:8;;;;;;;-1:-1:-1;29026:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;29026:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29026:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29026:24:8;;28789:266;-1:-1:-1;;;;;28789:266:8:o;38207:943::-;38335:12;;;-1:-1:-1;;;;;38370:18:8;;;;38355:86;;;;;-1:-1:-1;;;;;38355:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38507:8;38517:31;38537:4;38543;38517:19;:31::i;:::-;38473:76;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38473:76:8;;;;;;;-1:-1:-1;;;;;38473:76:8;-1:-1:-1;;;;;38473:76:8;-1:-1:-1;;;38473:76:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38473:76:8;;;38463:87;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38463:87:8;;;;;;;;;;;;;;;;38448:102;;38615:8;38625:29;38645:4;38651:2;38625:19;:29::i;:::-;38581:74;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38581:74:8;;;;;;;-1:-1:-1;;;;;38581:74:8;-1:-1:-1;;;;;38581:74:8;-1:-1:-1;;;38581:74:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38581:74:8;;;38571:85;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;38571:85:8;;;;;;;;;;;;38678:12;;-1:-1:-1;;;;;38705:26:8;;;;;;;;;;38571:85;;-1:-1:-1;;;;;;38678:12:8;;;;-1:-1:-1;38678:20:8;;-1:-1:-1;38705:26:8;;:38;;-1:-1:-1;38736:6:8;;38678:12;;38705:20;;:26;;;;;;;;;;-1:-1:-1;38678:12:8;38705:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38705:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38705:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38705:26:8;;:38;:30;:38;:::i;:::-;38678:66;;;;;-1:-1:-1;;;38678:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38678:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38678:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38678:66:8;38663:202;;;;;;;-1:-1:-1;;;;;38663:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38886:12;;38913:26;;;-1:-1:-1;;;;;38913:26:8;;;;;;;;;;-1:-1:-1;;;;;38886:12:8;;;;:20;;38907:4;;38913:38;;38944:6;;38886:12;;38913:20;;:26;;;;;;;;;;;;;;38886:12;;38913:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38913:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38913:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38913:26:8;;:38;:30;:38;:::i;:::-;38886:66;;;;;-1:-1:-1;;;38886:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38886:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38886:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38886:66:8;38871:202;;;;;;;-1:-1:-1;;;;;38871:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39110:2;-1:-1:-1;;;;;39085:42:8;39104:4;-1:-1:-1;;;;;39085:42:8;;39094:8;39114:6;39122:4;39085:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39085:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39085:42:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39085:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39141:4:8;;38207:943;-1:-1:-1;;;;;;;;38207:943:8:o;31066:722::-;31211:12;;31242:44;;;;;;;;;;;;-1:-1:-1;;;;;31242:44:8;;;-1:-1:-1;;;31242:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31242:44:8;;;;;;;;31232:55;;-1:-1:-1;;;;;;;;;;;;31211:12:8;;;:20;;31242:44;;;31232:55;;;;;31242:44;31232:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31232:55:8;;;;;;;;;;;;31211:77;;;-1:-1:-1;;;31211:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31211:77:8;;;;;;;-1:-1:-1;31211:77:8;-1:-1:-1;31211:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31211:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31211:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31211:77:8;31308:12;;31339:44;;;;31211:77;31339:44;;;;;;;-1:-1:-1;;;;;31339:44:8;;;-1:-1:-1;;;31339:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31339:44:8;;;;;;;;31329:55;;31211:77;;-1:-1:-1;31308:12:8;;;;:20;;31339:44;;;;;31329:55;;;;;31339:44;31329:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31329:55:8;;;;;;;;;;;;31308:77;;;-1:-1:-1;;;31308:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31308:77:8;;;;;;;-1:-1:-1;31308:77:8;-1:-1:-1;31308:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31308:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31308:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31308:77:8;31405:12;;31436:44;;;;31308:77;31436:44;;;;;;;-1:-1:-1;;;;;31436:44:8;;;-1:-1:-1;;;31436:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31436:44:8;;;;;;;;31426:55;;31308:77;;-1:-1:-1;31405:12:8;;;;:20;;31436:44;;;;;31426:55;;;;;31436:44;31426:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31426:55:8;;;;;;;;;;;;31405:77;;;-1:-1:-1;;;31405:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31405:77:8;;;;;;;-1:-1:-1;31405:77:8;-1:-1:-1;31405:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31405:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31405:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31405:77:8;31503:12;;31534:45;;;;31405:77;31534:45;;;;;;;-1:-1:-1;;;;;31534:45:8;;;-1:-1:-1;;;31534:45:8;;;;;;;26:21:-1;;;22:32;;6:49;;31534:45:8;;;;;;;;31524:56;;31405:77;;-1:-1:-1;31503:12:8;;;;:20;;31534:45;;;;;31524:56;;;;;31534:45;31524:56;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31524:56:8;;;;;;;;;;;;31503:78;;;-1:-1:-1;;;31503:78:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31503:78:8;;;;;;;-1:-1:-1;31503:78:8;-1:-1:-1;31503:78:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31503:78:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31503:78:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31503:78:8;;-1:-1:-1;31599:46:8;31503:78;31600:31;31625:5;31601:18;:6;31612;31601:18;:10;:18;:::i;:::-;31600:24;:31;:24;:31;:::i;:::-;31599:37;:46;:37;:46;:::i;:::-;31587:58;;31663:6;31656:4;:13;31652:132;;;31686:6;31679:13;;;;31652:132;31716:6;31709:4;:13;31705:79;;;31739:6;31732:13;;;;31705:79;31773:4;31766:11;;31705:79;31066:722;;;;;;;;;;:::o;6804:350::-;6916:42;;;;;;;;;;;;-1:-1:-1;;;6952:4:8;6916:42;;;;;;;22:32:-1;26:21;;;22:32;6:49;;6916:42:8;;;;;;;;6906:53;;6873:12;;;;6916:42;;;;;6906:53;;;;6916:42;6906:53;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;6906:53:8;;;;;;;;;;;;6980:12;;:32;;;;;;;;;;;;;;;;;6906:53;;-1:-1:-1;;;;;;6980:12:8;;;;-1:-1:-1;6980:20:8;;-1:-1:-1;6980:32:8;;;;;263:2:-1;;-1:-1;6980:32:8;;;;;;;-1:-1:-1;6980:12:8;:32;;;5:2:-1;;;;30:1;27;20:12;5:2;6980:32:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6980:32:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6980:32:8;6965:167;;;;;;;-1:-1:-1;;;;;6965:167:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7145:4;7138:11;;6804:350;;;;;;:::o;7622:::-;7734:42;;;;;;;;;;;;-1:-1:-1;;;7770:4:8;7734:42;;;;;;;22:32:-1;26:21;;;22:32;6:49;;7734:42:8;;;;;;;;7724:53;;7691:12;;;;7734:42;;;;;7724:53;;;;7734:42;7724:53;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;8440:350:8;8552:42;;;;;;;;;;;;-1:-1:-1;;;8588:4:8;8552:42;;;;;;;22:32:-1;26:21;;;22:32;6:49;;8552:42:8;;;;;;;;8542:53;;8509:12;;;;8552:42;;;;;8542:53;;;;8552:42;8542:53;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;9253:354:8;9367:43;;;;;;;;;;;;-1:-1:-1;;;9404:4:8;9367:43;;;;;;;22:32:-1;26:21;;;22:32;6:49;;9367:43:8;;;;;;;;9357:54;;9324:12;;;;9367:43;;;;;9357:54;;;;9367:43;9357:54;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;10104:352:8;10217:42;;;;;;;;;;;;-1:-1:-1;;;10253:4:8;10217:42;;;;;;;22:32:-1;26:21;;;22:32;6:49;;10217:42:8;;;;;;;;10207:53;;10174:12;;;;10217:42;;;;;10207:53;;;;10217:42;10207:53;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;10207:53:8;;;;;;;;;;;;10281:12;;:33;;;;;;;;;;;;;;;;;;;;;;;10207:53;;-1:-1:-1;;;;;;10281:12:8;;;;-1:-1:-1;10281:21:8;;-1:-1:-1;10207:53:8;;10281:33;;-1:-1:-1;10281:33:8;;;;;;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;10281:33:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;22194:215:8;22280:11;22299:10;22350:15;22322:44;;;;;;;;;;;;;-1:-1:-1;;;;;22322:44:8;-1:-1:-1;;;;;22322:44:8;-1:-1:-1;;;22322:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22322:44:8;;;22312:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;22312:55:8;;;;;;;;;;;;22380:12;;-1:-1:-1;;;;;22380:24:8;;;;;;;;;;22312:55;;-1:-1:-1;;;;;;22380:12:8;;;;-1:-1:-1;22380:20:8;;-1:-1:-1;22380:24:8;;;;;263:2:-1;;-1:-1;22380:24:8;;;;;;;-1:-1:-1;22380:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;22380:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;22380:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22380:24:8;;22194:215;-1:-1:-1;;;;22194:215:8:o;22789:::-;22875:11;22894:10;22945:15;22917:44;;;;;;;;;;;;;-1:-1:-1;;;;;22917:44:8;-1:-1:-1;;;;;22917:44:8;-1:-1:-1;;;22917:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22917:44:8;;;22907:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23384:215:8;23470:11;23489:10;23540:15;23512:44;;;;;;;;;;;;;-1:-1:-1;;;;;23512:44:8;-1:-1:-1;;;;;23512:44:8;-1:-1:-1;;;23512:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;23512:44:8;;;23502:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23974:218:8;24061:12;24081:10;24133:15;24104:45;;;;;;;;;;;;;-1:-1:-1;;;;;24104:45:8;-1:-1:-1;;;;;24104:45:8;-1:-1:-1;;;24104:45:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24104:45:8;;;24094:56;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;24580:217:8;24666:12;24686:10;24737:15;24709:44;;;;;;;;;;;;;-1:-1:-1;;;;;24709:44:8;-1:-1:-1;;;;;24709:44:8;-1:-1:-1;;;24709:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24709:44:8;;;24699:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;24699:55:8;;;;;;;;;;;;24767:12;;:25;;;;;;;;;;;24699:55;;-1:-1:-1;;;;;;24767:12:8;;;;-1:-1:-1;24767:21:8;;-1:-1:-1;24767:25:8;;;;;-1:-1:-1;;;24767:25:8;;;;;;-1:-1:-1;24767:12:8;:25;;;5:2:-1;;;;30:1;27;20:12;5:2;24767:25:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;24767:25:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;24767:25:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;24767:25:8;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;-1:-1;24767:25:8;;24580:217;-1:-1:-1;;;;;;;;24580:217:8:o;16400:357::-;16488:25;16521:10;16594:23;16579:7;16544:43;;;;;;;;;;;;;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;16544:43:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16544:43:8;;;16534:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16534:54:8;;;;;;;;;;;;16620:12;;:27;;;;;;;;;;;16534:54;;-1:-1:-1;;;;;;16620:12:8;;;;-1:-1:-1;16620:23:8;;-1:-1:-1;16620:27:8;;;;;263:2:-1;;-1:-1;16620:27:8;;;;;;;-1:-1:-1;16620:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16620:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16620:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16620:27:8;;-1:-1:-1;;;;;;16657:22:8;;;16653:100;;16696:15;16689:22;;;;16653:100;16739:7;16732:14;;16653:100;16400:357;;;;;;:::o;1143:234:2:-;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;1540:174::-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1708:1;1540:174;-1:-1:-1;;;1540:174:2:o;301:224::-;359:14;;385:6;;381:35;;;408:1;401:8;;;;381:35;-1:-1:-1;433:5:2;;;437:1;433;:5;452;;;;;;;;:10;444:62;;;;;-1:-1:-1;;;;;444:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;697:284;755:14;857:9;873:1;869;:5;;;;;;;;;697:284;-1:-1:-1;;;;697:284:2:o", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\n\n/*\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title Standard Fee Contract for Token, Inc. Smart Money System\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n\n*/\n\n\ncontract TokenIOFeeContract is Ownable {\n\n\t/// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n\tusing TokenIOLib for TokenIOLib.Data;\n\tTokenIOLib.Data lib;\n\n\n\t/**\n\t* @notice Constructor method for ERC20 contract\n\t* @param _storageContract address of TokenIOStorage contract\n\t*/\n\tconstructor(address _storageContract) public {\n\t\t\t/// @dev Set the storage contract for the interface\n\t\t\t/// @dev NOTE: This contract will be unable to use the storage constract until\n\t\t\t/// @dev contract address is authorized with the storage contract\n\t\t\t/// @dev Once authorized, Use the `setParams` method to set storage values\n\t\t\tlib.Storage = TokenIOStorage(_storageContract);\n\n\t\t\t/// @dev set owner to contract initiator\n\t\t\towner[msg.sender] = true;\n\t}\n\n\t/**\n\t * @notice Set Fee Parameters for Fee Contract\n\t * @dev The min, max, flat transaction fees should be relative to decimal precision\n\t * @param feeBps Basis points transaction fee\n\t * @param feeMin Minimum transaction fees\n\t * @param feeMax Maximum transaction fee\n\t * @param feeFlat Flat transaction fee\n\t * returns {\"success\" : \"Returns true if successfully called from another contract\"}\n\t */\n\tfunction setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes feeMsg) public onlyOwner returns (bool success) {\n\t\trequire(lib.setFeeBPS(feeBps), \"Error: Unable to set fee contract basis points.\");\n\t\trequire(lib.setFeeMin(feeMin), \"Error: Unable to set fee contract minimum fee.\");\n\t\trequire(lib.setFeeMax(feeMax), \"Error: Unable to set fee contract maximum fee.\");\n\t\trequire(lib.setFeeFlat(feeFlat), \"Error: Unable to set fee contract flat fee.\");\n\t\trequire(lib.setFeeMsg(feeMsg), \"Error: Unable to set fee contract default message.\");\n\t\treturn true;\n\t}\n\n\t/**\n\t \t* @notice Gets fee parameters\n\t\t* @return {\n\t\t\"bps\":\"Returns the basis points fee of the TokenIOFeeContract\",\n\t\t\"min\":\"Returns the min fee of the TokenIOFeeContract\",\n\t\t\"max\":\"Returns the max fee of the TokenIOFeeContract\",\n\t\t\"flat\":\"Returns the flat fee of the TokenIOFeeContract\",\n\t\t\"feeContract\": \"Address of this contract\"\n\t}\n\t*/\n\tfunction getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeContract) {\n\t\t\treturn (\n\t\t\t\t\tlib.getFeeBPS(address(this)),\n\t\t\t\t\tlib.getFeeMin(address(this)),\n\t\t\t\t\tlib.getFeeMax(address(this)),\n\t\t\t\t\tlib.getFeeFlat(address(this)),\n\t\t\t\t\tlib.getFeeMsg(address(this)),\n\t\t\t\t\taddress(this)\n\t\t\t);\n\t}\n\n\t/**\n\t * @notice Returns balance of this contract associated with currency symbol.\n\t * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n\t * @return {\"balance\": \"Balance of TokenIO TSM currency account\"}\n\t */\n\tfunction getTokenBalance(string currency) public view returns(uint balance) {\n\t\treturn lib.getTokenBalance(currency, address(this));\n\t}\n\n\t/** @notice Calculates fee of a given transfer amount\n\t * @param amount transfer amount\n\t * @return { \"fees\": \"Returns the fees associated with this contract\"}\n\t */\n\tfunction calculateFees(uint amount) public view returns (uint fees) {\n\t\treturn lib.calculateFees(address(this), amount);\n\t}\n\n\n\t/**\n\t * @notice Transfer collected fees to another account; onlyOwner\n\t * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n\t * @param to \t\t\tEthereum address of account to send token amount to\n\t * @param amount\t Amount of tokens to transfer\n\t * @param data\t\t Arbitrary bytes data message to include in transfer\n\t * @return {\"success\": \"Returns ture if successfully called from another contract\"}\n\t */\n\tfunction transferCollectedFees(string currency, address to, uint amount, bytes data) public onlyOwner returns (bool success) {\n\t\trequire(\n\t\t\tlib.forceTransfer(currency, address(this), to, amount, data),\n\t\t\t\"Error: unable to transfer fees to account.\"\n\t\t);\n\t\treturn true;\n\t}\n\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFeeContract.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFeeContract.sol", + "exportedSymbols": { + "TokenIOFeeContract": [ + 1620 + ] + }, + "id": 1621, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1413, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 1414, + "nodeType": "ImportDirective", + "scope": 1621, + "sourceUnit": 185, + "src": "25:23:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1415, + "nodeType": "ImportDirective", + "scope": 1621, + "sourceUnit": 5226, + "src": "49:30:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 1416, + "nodeType": "ImportDirective", + "scope": 1621, + "sourceUnit": 4607, + "src": "80:26:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1417, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1101:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 1418, + "nodeType": "InheritanceSpecifier", + "src": "1101:7:7" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1620, + "linearizedBaseContracts": [ + 1620, + 184 + ], + "name": "TokenIOFeeContract", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1421, + "libraryName": { + "contractScope": null, + "id": 1419, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1199:10:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1193:37:7", + "typeName": { + "contractScope": null, + "id": 1420, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1214:15:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 1423, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1620, + "src": "1232:19:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1422, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1232:15:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1443, + "nodeType": "Block", + "src": "1425:413:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1428, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "1714:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1430, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1714:11:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1432, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1425, + "src": "1743:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1431, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1728:14:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:32:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1714:46:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1435, + "nodeType": "ExpressionStatement", + "src": "1714:46:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1436, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1810:5:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1439, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1437, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1816:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1816:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1810:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1830:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1810:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1442, + "nodeType": "ExpressionStatement", + "src": "1810:24:7" + } + ] + }, + "documentation": "@notice Constructor method for ERC20 contract\n@param _storageContract address of TokenIOStorage contract", + "id": 1444, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1425, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 1444, + "src": "1392:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1424, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1391:26:7" + }, + "payable": false, + "returnParameters": { + "id": 1427, + "nodeType": "ParameterList", + "parameters": [], + "src": "1425:0:7" + }, + "scope": 1620, + "src": "1380:458:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1503, + "nodeType": "Block", + "src": "2371:443:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1464, + "name": "feeBps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1446, + "src": "2397:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1462, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2383:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1463, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 1916, + "src": "2383:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2383:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e747261637420626173697320706f696e74732e", + "id": 1466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2406:49:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fabd5d1fd4f46cccda6663dddcde851f014c68fb6b477db4d11f0ae282983893", + "typeString": "literal_string \"Error: Unable to set fee contract basis points.\"" + }, + "value": "Error: Unable to set fee contract basis points." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fabd5d1fd4f46cccda6663dddcde851f014c68fb6b477db4d11f0ae282983893", + "typeString": "literal_string \"Error: Unable to set fee contract basis points.\"" + } + ], + "id": 1461, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2375:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2375:81:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1468, + "nodeType": "ExpressionStatement", + "src": "2375:81:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1472, + "name": "feeMin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "2482:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1470, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2468:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1471, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 1950, + "src": "2468:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2468:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e7472616374206d696e696d756d206665652e", + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2491:48:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d061faaf87dcb8cd3753e1f1579fa198544ef425a6a0fa7431375fb437439d3", + "typeString": "literal_string \"Error: Unable to set fee contract minimum fee.\"" + }, + "value": "Error: Unable to set fee contract minimum fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d061faaf87dcb8cd3753e1f1579fa198544ef425a6a0fa7431375fb437439d3", + "typeString": "literal_string \"Error: Unable to set fee contract minimum fee.\"" + } + ], + "id": 1469, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2460:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:80:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1476, + "nodeType": "ExpressionStatement", + "src": "2460:80:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1480, + "name": "feeMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1450, + "src": "2566:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1478, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2552:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 1984, + "src": "2552:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2552:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e7472616374206d6178696d756d206665652e", + "id": 1482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2575:48:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_169ffce6c52c466e162efa9907d18f3ba172d8306517a48ca6d1e404adce90b4", + "typeString": "literal_string \"Error: Unable to set fee contract maximum fee.\"" + }, + "value": "Error: Unable to set fee contract maximum fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_169ffce6c52c466e162efa9907d18f3ba172d8306517a48ca6d1e404adce90b4", + "typeString": "literal_string \"Error: Unable to set fee contract maximum fee.\"" + } + ], + "id": 1477, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2544:80:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1484, + "nodeType": "ExpressionStatement", + "src": "2544:80:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1488, + "name": "feeFlat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1452, + "src": "2651:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1486, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2636:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1487, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2018, + "src": "2636:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2636:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e747261637420666c6174206665652e", + "id": 1490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2661:45:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ee0d3dfb62386e6a3c97e5024bd5d251b38044fd1dc8082b8b6b030fd34e14cf", + "typeString": "literal_string \"Error: Unable to set fee contract flat fee.\"" + }, + "value": "Error: Unable to set fee contract flat fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ee0d3dfb62386e6a3c97e5024bd5d251b38044fd1dc8082b8b6b030fd34e14cf", + "typeString": "literal_string \"Error: Unable to set fee contract flat fee.\"" + } + ], + "id": 1485, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2628:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2628:79:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1492, + "nodeType": "ExpressionStatement", + "src": "2628:79:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1496, + "name": "feeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1454, + "src": "2733:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1494, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2719:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2052, + "src": "2719:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes memory) returns (bool)" + } + }, + "id": 1497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2719:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742064656661756c74206d6573736167652e", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2742:52:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4dd72252a38b4e1a2efba252c9ae574b50710ebb7f2ad4764fe84352ca2d020f", + "typeString": "literal_string \"Error: Unable to set fee contract default message.\"" + }, + "value": "Error: Unable to set fee contract default message." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4dd72252a38b4e1a2efba252c9ae574b50710ebb7f2ad4764fe84352ca2d020f", + "typeString": "literal_string \"Error: Unable to set fee contract default message.\"" + } + ], + "id": 1493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2711:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2711:84:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "2711:84:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2806:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1460, + "id": 1502, + "nodeType": "Return", + "src": "2799:11:7" + } + ] + }, + "documentation": "@notice Set Fee Parameters for Fee Contract\n@dev The min, max, flat transaction fees should be relative to decimal precision\n@param feeBps Basis points transaction fee\n@param feeMin Minimum transaction fees\n@param feeMax Maximum transaction fee\n@param feeFlat Flat transaction fee\nreturns {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1504, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1457, + "modifierName": { + "argumentTypes": null, + "id": 1456, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2338:9:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2338:9:7" + } + ], + "name": "setFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1455, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1446, + "name": "feeBps", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2264:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1445, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2264:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1448, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2277:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2277:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1450, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2290:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1449, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2290:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1452, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2303:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1451, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2303:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1454, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2317:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1453, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2317:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2263:67:7" + }, + "payable": false, + "returnParameters": { + "id": 1460, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1459, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2357:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1458, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2357:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2356:14:7" + }, + "scope": 1620, + "src": "2242:572:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1554, + "nodeType": "Block", + "src": "3280:217:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1522, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3321:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3313:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1519, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3299:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2522, + "src": "3299:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3299:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1528, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3356:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3348:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3348:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1525, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3334:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2548, + "src": "3334:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3334:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1534, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3391:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3383:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1531, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3369:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1532, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "3369:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3369:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1540, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3427:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1537, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3404:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2600, + "src": "3404:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3404:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1546, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3462:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3454:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3454:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1543, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3440:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1544, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "3440:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3440:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1550, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3483:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3475:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3475:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1552, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3292:201:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 1518, + "id": 1553, + "nodeType": "Return", + "src": "3285:208:7" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Returns the basis points fee of the TokenIOFeeContract\",\n\"min\":\"Returns the min fee of the TokenIOFeeContract\",\n\"max\":\"Returns the max fee of the TokenIOFeeContract\",\n\"flat\":\"Returns the flat fee of the TokenIOFeeContract\",\n\"feeContract\": \"Address of this contract\"\n}", + "id": 1555, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1505, + "nodeType": "ParameterList", + "parameters": [], + "src": "3180:2:7" + }, + "payable": false, + "returnParameters": { + "id": 1518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1507, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3204:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1506, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3204:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1509, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3214:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1508, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3214:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1511, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3224:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1510, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3224:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1513, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3234:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1512, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3234:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1515, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3245:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1514, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3245:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1517, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3259:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1516, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3259:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3203:76:7" + }, + "scope": 1620, + "src": "3159:338:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1570, + "nodeType": "Block", + "src": "3805:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1564, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1557, + "src": "3836:8:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1566, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3854:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3846:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3846:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1562, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3816:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2816, + "src": "3816:19:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 1568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3816:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1561, + "id": 1569, + "nodeType": "Return", + "src": "3809:51:7" + } + ] + }, + "documentation": "@notice Returns balance of this contract associated with currency symbol.\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"balance\": \"Balance of TokenIO TSM currency account\"}", + "id": 1571, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1557, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3754:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1556, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3754:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3753:17:7" + }, + "payable": false, + "returnParameters": { + "id": 1561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1560, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3791:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1559, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3791:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3790:14:7" + }, + "scope": 1620, + "src": "3729:135:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1586, + "nodeType": "Block", + "src": "4101:55:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1581, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "4138:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1580, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4130:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4130:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1583, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1573, + "src": "4145:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1578, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "4112:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1579, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 2988, + "src": "4112:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4112:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1577, + "id": 1585, + "nodeType": "Return", + "src": "4105:47:7" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount transfer amount\n@return { \"fees\": \"Returns the fees associated with this contract\"}", + "id": 1587, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1573, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "4056:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1572, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4056:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4055:13:7" + }, + "payable": false, + "returnParameters": { + "id": 1577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1576, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "4090:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1575, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4090:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4089:11:7" + }, + "scope": 1620, + "src": "4033:123:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1618, + "nodeType": "Block", + "src": "4712:148:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1605, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "4746:8:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1607, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "4764:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4756:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4756:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1609, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "4771:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1610, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "4775:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1611, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "4783:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1603, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "4728:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1604, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3335, + "src": "4728:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4728:60:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20756e61626c6520746f207472616e73666572206665657320746f206163636f756e742e", + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4793:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1a0e1b57a2efd16cddba9f3dc60eebac17ba4db509e733796cdcf13851421b2c", + "typeString": "literal_string \"Error: unable to transfer fees to account.\"" + }, + "value": "Error: unable to transfer fees to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1a0e1b57a2efd16cddba9f3dc60eebac17ba4db509e733796cdcf13851421b2c", + "typeString": "literal_string \"Error: unable to transfer fees to account.\"" + } + ], + "id": 1602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4716:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4716:125:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1615, + "nodeType": "ExpressionStatement", + "src": "4716:125:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4852:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1601, + "id": 1617, + "nodeType": "Return", + "src": "4845:11:7" + } + ] + }, + "documentation": "@notice Transfer collected fees to another account; onlyOwner\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to \t\t\tEthereum address of account to send token amount to\n@param amount\t Amount of tokens to transfer\n@param data\t\t Arbitrary bytes data message to include in transfer\n@return {\"success\": \"Returns ture if successfully called from another contract\"}", + "id": 1619, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1598, + "modifierName": { + "argumentTypes": null, + "id": 1597, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4679:9:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4679:9:7" + } + ], + "name": "transferCollectedFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1589, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4618:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1588, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4618:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1591, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4635:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4635:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1593, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4647:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1592, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4647:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4660:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1594, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4660:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4617:54:7" + }, + "payable": false, + "returnParameters": { + "id": 1601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1600, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4698:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1599, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4698:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4697:14:7" + }, + "scope": 1620, + "src": "4587:273:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1621, + "src": "1070:3794:7" + } + ], + "src": "0:4865:7" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOFeeContract.sol", + "exportedSymbols": { + "TokenIOFeeContract": [ + 1620 + ] + }, + "id": 1621, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1413, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 1414, + "nodeType": "ImportDirective", + "scope": 1621, + "sourceUnit": 185, + "src": "25:23:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1415, + "nodeType": "ImportDirective", + "scope": 1621, + "sourceUnit": 5226, + "src": "49:30:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 1416, + "nodeType": "ImportDirective", + "scope": 1621, + "sourceUnit": 4607, + "src": "80:26:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1417, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1101:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 1418, + "nodeType": "InheritanceSpecifier", + "src": "1101:7:7" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1620, + "linearizedBaseContracts": [ + 1620, + 184 + ], + "name": "TokenIOFeeContract", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1421, + "libraryName": { + "contractScope": null, + "id": 1419, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1199:10:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1193:37:7", + "typeName": { + "contractScope": null, + "id": 1420, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1214:15:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 1423, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 1620, + "src": "1232:19:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1422, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1232:15:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1443, + "nodeType": "Block", + "src": "1425:413:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1428, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "1714:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1430, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1714:11:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1432, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1425, + "src": "1743:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1431, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1728:14:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:32:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1714:46:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1435, + "nodeType": "ExpressionStatement", + "src": "1714:46:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1436, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1810:5:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1439, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1437, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1816:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1816:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1810:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1830:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1810:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1442, + "nodeType": "ExpressionStatement", + "src": "1810:24:7" + } + ] + }, + "documentation": "@notice Constructor method for ERC20 contract\n@param _storageContract address of TokenIOStorage contract", + "id": 1444, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1425, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 1444, + "src": "1392:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1424, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1391:26:7" + }, + "payable": false, + "returnParameters": { + "id": 1427, + "nodeType": "ParameterList", + "parameters": [], + "src": "1425:0:7" + }, + "scope": 1620, + "src": "1380:458:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1503, + "nodeType": "Block", + "src": "2371:443:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1464, + "name": "feeBps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1446, + "src": "2397:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1462, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2383:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1463, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 1916, + "src": "2383:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2383:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e747261637420626173697320706f696e74732e", + "id": 1466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2406:49:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fabd5d1fd4f46cccda6663dddcde851f014c68fb6b477db4d11f0ae282983893", + "typeString": "literal_string \"Error: Unable to set fee contract basis points.\"" + }, + "value": "Error: Unable to set fee contract basis points." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fabd5d1fd4f46cccda6663dddcde851f014c68fb6b477db4d11f0ae282983893", + "typeString": "literal_string \"Error: Unable to set fee contract basis points.\"" + } + ], + "id": 1461, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2375:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2375:81:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1468, + "nodeType": "ExpressionStatement", + "src": "2375:81:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1472, + "name": "feeMin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "2482:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1470, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2468:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1471, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 1950, + "src": "2468:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2468:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e7472616374206d696e696d756d206665652e", + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2491:48:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d061faaf87dcb8cd3753e1f1579fa198544ef425a6a0fa7431375fb437439d3", + "typeString": "literal_string \"Error: Unable to set fee contract minimum fee.\"" + }, + "value": "Error: Unable to set fee contract minimum fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d061faaf87dcb8cd3753e1f1579fa198544ef425a6a0fa7431375fb437439d3", + "typeString": "literal_string \"Error: Unable to set fee contract minimum fee.\"" + } + ], + "id": 1469, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2460:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:80:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1476, + "nodeType": "ExpressionStatement", + "src": "2460:80:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1480, + "name": "feeMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1450, + "src": "2566:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1478, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2552:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 1984, + "src": "2552:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2552:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e7472616374206d6178696d756d206665652e", + "id": 1482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2575:48:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_169ffce6c52c466e162efa9907d18f3ba172d8306517a48ca6d1e404adce90b4", + "typeString": "literal_string \"Error: Unable to set fee contract maximum fee.\"" + }, + "value": "Error: Unable to set fee contract maximum fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_169ffce6c52c466e162efa9907d18f3ba172d8306517a48ca6d1e404adce90b4", + "typeString": "literal_string \"Error: Unable to set fee contract maximum fee.\"" + } + ], + "id": 1477, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2544:80:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1484, + "nodeType": "ExpressionStatement", + "src": "2544:80:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1488, + "name": "feeFlat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1452, + "src": "2651:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1486, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2636:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1487, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2018, + "src": "2636:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,uint256) returns (bool)" + } + }, + "id": 1489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2636:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e747261637420666c6174206665652e", + "id": 1490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2661:45:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ee0d3dfb62386e6a3c97e5024bd5d251b38044fd1dc8082b8b6b030fd34e14cf", + "typeString": "literal_string \"Error: Unable to set fee contract flat fee.\"" + }, + "value": "Error: Unable to set fee contract flat fee." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ee0d3dfb62386e6a3c97e5024bd5d251b38044fd1dc8082b8b6b030fd34e14cf", + "typeString": "literal_string \"Error: Unable to set fee contract flat fee.\"" + } + ], + "id": 1485, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2628:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2628:79:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1492, + "nodeType": "ExpressionStatement", + "src": "2628:79:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1496, + "name": "feeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1454, + "src": "2733:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1494, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "2719:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2052, + "src": "2719:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes memory) returns (bool)" + } + }, + "id": 1497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2719:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742064656661756c74206d6573736167652e", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2742:52:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4dd72252a38b4e1a2efba252c9ae574b50710ebb7f2ad4764fe84352ca2d020f", + "typeString": "literal_string \"Error: Unable to set fee contract default message.\"" + }, + "value": "Error: Unable to set fee contract default message." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4dd72252a38b4e1a2efba252c9ae574b50710ebb7f2ad4764fe84352ca2d020f", + "typeString": "literal_string \"Error: Unable to set fee contract default message.\"" + } + ], + "id": 1493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2711:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2711:84:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "2711:84:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2806:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1460, + "id": 1502, + "nodeType": "Return", + "src": "2799:11:7" + } + ] + }, + "documentation": "@notice Set Fee Parameters for Fee Contract\n@dev The min, max, flat transaction fees should be relative to decimal precision\n@param feeBps Basis points transaction fee\n@param feeMin Minimum transaction fees\n@param feeMax Maximum transaction fee\n@param feeFlat Flat transaction fee\nreturns {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 1504, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1457, + "modifierName": { + "argumentTypes": null, + "id": 1456, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "2338:9:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2338:9:7" + } + ], + "name": "setFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1455, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1446, + "name": "feeBps", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2264:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1445, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2264:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1448, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2277:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2277:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1450, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2290:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1449, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2290:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1452, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2303:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1451, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2303:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1454, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2317:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1453, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2317:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2263:67:7" + }, + "payable": false, + "returnParameters": { + "id": 1460, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1459, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "2357:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1458, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2357:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2356:14:7" + }, + "scope": 1620, + "src": "2242:572:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1554, + "nodeType": "Block", + "src": "3280:217:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1522, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3321:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3313:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1519, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3299:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2522, + "src": "3299:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3299:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1528, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3356:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3348:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3348:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1525, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3334:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2548, + "src": "3334:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3334:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1534, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3391:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3383:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1531, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3369:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1532, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "3369:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3369:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1540, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3427:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1537, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3404:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2600, + "src": "3404:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 1542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3404:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1546, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3462:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3454:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3454:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1543, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3440:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1544, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "3440:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3440:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1550, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3483:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3475:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3475:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1552, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3292:201:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 1518, + "id": 1553, + "nodeType": "Return", + "src": "3285:208:7" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Returns the basis points fee of the TokenIOFeeContract\",\n\"min\":\"Returns the min fee of the TokenIOFeeContract\",\n\"max\":\"Returns the max fee of the TokenIOFeeContract\",\n\"flat\":\"Returns the flat fee of the TokenIOFeeContract\",\n\"feeContract\": \"Address of this contract\"\n}", + "id": 1555, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1505, + "nodeType": "ParameterList", + "parameters": [], + "src": "3180:2:7" + }, + "payable": false, + "returnParameters": { + "id": 1518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1507, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3204:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1506, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3204:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1509, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3214:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1508, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3214:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1511, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3224:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1510, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3224:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1513, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3234:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1512, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3234:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1515, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3245:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1514, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3245:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1517, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 1555, + "src": "3259:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1516, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3259:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3203:76:7" + }, + "scope": 1620, + "src": "3159:338:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1570, + "nodeType": "Block", + "src": "3805:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1564, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1557, + "src": "3836:8:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1566, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "3854:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3846:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3846:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1562, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "3816:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 2816, + "src": "3816:19:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 1568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3816:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1561, + "id": 1569, + "nodeType": "Return", + "src": "3809:51:7" + } + ] + }, + "documentation": "@notice Returns balance of this contract associated with currency symbol.\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"balance\": \"Balance of TokenIO TSM currency account\"}", + "id": 1571, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1557, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3754:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1556, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3754:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3753:17:7" + }, + "payable": false, + "returnParameters": { + "id": 1561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1560, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "3791:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1559, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3791:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3790:14:7" + }, + "scope": 1620, + "src": "3729:135:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1586, + "nodeType": "Block", + "src": "4101:55:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1581, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "4138:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1580, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4130:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4130:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1583, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1573, + "src": "4145:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1578, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "4112:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1579, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 2988, + "src": "4112:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4112:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1577, + "id": 1585, + "nodeType": "Return", + "src": "4105:47:7" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount transfer amount\n@return { \"fees\": \"Returns the fees associated with this contract\"}", + "id": 1587, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1573, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "4056:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1572, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4056:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4055:13:7" + }, + "payable": false, + "returnParameters": { + "id": 1577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1576, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "4090:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1575, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4090:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4089:11:7" + }, + "scope": 1620, + "src": "4033:123:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1618, + "nodeType": "Block", + "src": "4712:148:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1605, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "4746:8:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1607, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5271, + "src": "4764:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOFeeContract_$1620", + "typeString": "contract TokenIOFeeContract" + } + ], + "id": 1606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4756:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4756:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1609, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "4771:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1610, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "4775:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1611, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "4783:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1603, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1423, + "src": "4728:3:7", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 1604, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3335, + "src": "4728:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4728:60:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20756e61626c6520746f207472616e73666572206665657320746f206163636f756e742e", + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4793:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1a0e1b57a2efd16cddba9f3dc60eebac17ba4db509e733796cdcf13851421b2c", + "typeString": "literal_string \"Error: unable to transfer fees to account.\"" + }, + "value": "Error: unable to transfer fees to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1a0e1b57a2efd16cddba9f3dc60eebac17ba4db509e733796cdcf13851421b2c", + "typeString": "literal_string \"Error: unable to transfer fees to account.\"" + } + ], + "id": 1602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4716:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4716:125:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1615, + "nodeType": "ExpressionStatement", + "src": "4716:125:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4852:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1601, + "id": 1617, + "nodeType": "Return", + "src": "4845:11:7" + } + ] + }, + "documentation": "@notice Transfer collected fees to another account; onlyOwner\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to \t\t\tEthereum address of account to send token amount to\n@param amount\t Amount of tokens to transfer\n@param data\t\t Arbitrary bytes data message to include in transfer\n@return {\"success\": \"Returns ture if successfully called from another contract\"}", + "id": 1619, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1598, + "modifierName": { + "argumentTypes": null, + "id": 1597, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4679:9:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4679:9:7" + } + ], + "name": "transferCollectedFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1589, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4618:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1588, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4618:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1591, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4635:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4635:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1593, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4647:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1592, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4647:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4660:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1594, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4660:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4617:54:7" + }, + "payable": false, + "returnParameters": { + "id": 1601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1600, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "4698:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1599, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4698:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4697:14:7" + }, + "scope": 1620, + "src": "4587:273:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1621, + "src": "1070:3794:7" + } + ], + "src": "0:4865:7" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x1bbaa40d9eca29b2a109cc21fe6ac9bc00198185", + "transactionHash": "0xdf92296ca60d2e91bc85f7053fdbb8eee6b18bf44b7511e0c109993b04f577a3" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0x30753e4a8aad7f8597332e813735def5dd395028", + "transactionHash": "0x5b6bcdbba94186d4778c21f60091171e7889a57e9efa7e7bdb2a445a0efbf496" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:29:03.346Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOLib.json b/deployed/mainnet-v1.0.1/TokenIOLib.json new file mode 100644 index 0000000..85f83a1 --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIOLib.json @@ -0,0 +1,87996 @@ +{ + "contractName": "TokenIOLib", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "currency", + "type": "string" + }, + { + "indexed": true, + "name": "account", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "currency", + "type": "string" + }, + { + "indexed": true, + "name": "account", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "currency", + "type": "string" + }, + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "data", + "type": "bytes" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + }, + { + "indexed": false, + "name": "status", + "type": "bool" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "KYCApproval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + }, + { + "indexed": false, + "name": "status", + "type": "bool" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "AccountStatus", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "tokenASymbol", + "type": "string" + }, + { + "indexed": false, + "name": "tokenBSymbol", + "type": "string" + }, + { + "indexed": false, + "name": "tokenAValue", + "type": "uint256" + }, + { + "indexed": false, + "name": "tokenBValue", + "type": "uint256" + }, + { + "indexed": false, + "name": "expiration", + "type": "uint256" + }, + { + "indexed": false, + "name": "transactionHash", + "type": "bytes32" + } + ], + "name": "FxSwap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "originalAccount", + "type": "address" + }, + { + "indexed": true, + "name": "forwardedAccount", + "type": "address" + } + ], + "name": "AccountForward", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "authority", + "type": "address" + }, + { + "indexed": false, + "name": "issuerFirm", + "type": "string" + } + ], + "name": "NewAuthority", + "type": "event" + } + ], + "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058203d7c9467d5596ee788b18c8a5c40e914538e3e309a4d8cc478e6d8386b70d4560029", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058203d7c9467d5596ee788b18c8a5c40e914538e3e309a4d8cc478e6d8386b70d4560029", + "sourceMap": "898:63992:8:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", + "deployedSourceMap": "898:63992:8:-;;;;;;;;", + "source": "pragma solidity 0.4.24;\n\nimport \"./SafeMath.sol\";\nimport \"./TokenIOStorage.sol\";\n\n/**\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title TokenIOLib\n\n@author Ryan Tate , Sean Pollock \n\n@notice This library proxies the TokenIOStorage contract for the interface contract,\nallowing the library and the interfaces to remain stateless, and share a universally\navailable storage contract between interfaces.\n\n\n*/\n\n\nlibrary TokenIOLib {\n\n /// @dev all math operating are using SafeMath methods to check for overflow/underflows\n using SafeMath for uint;\n\n /// @dev the Data struct uses the Storage contract for stateful setters\n struct Data {\n TokenIOStorage Storage;\n }\n\n /// @notice Not using `Log` prefix for events to be consistent with ERC20 named events;\n event Approval(address indexed owner, address indexed spender, uint amount);\n event Deposit(string currency, address indexed account, uint amount, string issuerFirm);\n event Withdraw(string currency, address indexed account, uint amount, string issuerFirm);\n event Transfer(string currency, address indexed from, address indexed to, uint amount, bytes data);\n event KYCApproval(address indexed account, bool status, string issuerFirm);\n event AccountStatus(address indexed account, bool status, string issuerFirm);\n event FxSwap(string tokenASymbol,string tokenBSymbol,uint tokenAValue,uint tokenBValue, uint expiration, bytes32 transactionHash);\n event AccountForward(address indexed originalAccount, address indexed forwardedAccount);\n event NewAuthority(address indexed authority, string issuerFirm);\n\n /**\n * @notice Set the token name for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenName Name of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenName(Data storage self, string tokenName) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.name', address(this)));\n require(\n self.Storage.setString(id, tokenName),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token symbol for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenSymbol Symbol of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenSymbol(Data storage self, string tokenSymbol) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.symbol', address(this)));\n require(\n self.Storage.setString(id, tokenSymbol),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token three letter abreviation (TLA) for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenTLA TLA of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenTLA(Data storage self, string tokenTLA) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.tla', address(this)));\n require(\n self.Storage.setString(id, tokenTLA),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token version for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenVersion(Data storage self, string tokenVersion) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.version', address(this)));\n require(\n self.Storage.setString(id, tokenVersion),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token decimals for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @dev This method is not set to the address of the contract, rather is maped to currency\n * @dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param tokenDecimals Decimal representation of the token contract unit amount\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenDecimals(Data storage self, string currency, uint tokenDecimals) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.decimals', currency));\n require(\n self.Storage.setUint(id, tokenDecimals),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set basis point fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeBPS Basis points fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeBPS(Data storage self, uint feeBPS) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.bps', address(this)));\n require(\n self.Storage.setUint(id, feeBPS),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set minimum fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMin Minimum fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMin(Data storage self, uint feeMin) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.min', address(this)));\n require(\n self.Storage.setUint(id, feeMin),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set maximum fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMax Maximum fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMax(Data storage self, uint feeMax) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.max', address(this)));\n require(\n self.Storage.setUint(id, feeMax),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set flat fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeFlat Flat fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeFlat(Data storage self, uint feeFlat) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.flat', address(this)));\n require(\n self.Storage.setUint(id, feeFlat),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set fee message for contract interface\n * @dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n * @dev Fee messages vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMsg Fee message included in a transaction with fees\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMsg(Data storage self, bytes feeMsg) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.msg', address(this)));\n require(\n self.Storage.setBytes(id, feeMsg),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set fee contract for a contract interface\n * @dev feeContract must be a TokenIOFeeContract storage approved contract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @dev | This must be called directly from the interface contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeContract Set the fee contract for `this` contract address interface\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeContract(Data storage self, address feeContract) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.account', address(this)));\n require(\n self.Storage.setAddress(id, feeContract),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n * @dev | This should only be called once from a token interface contract;\n * @dev | This method has an `internal` view\n * @dev | This method is experimental and may be deprecated/refactored\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenNameSpace(Data storage self, string currency) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.namespace', currency));\n require(\n self.Storage.setAddress(id, address(this)),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the KYC approval status (true/false) for a given account\n * @dev | This method has an `internal` view\n * @dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n * @dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param isApproved Boolean (true/false) KYC approval status for a given account\n * @param issuerFirm Firm name for issuing KYC approval\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setKYCApproval(Data storage self, address account, bool isApproved, string issuerFirm) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account)));\n require(\n self.Storage.setBool(id, isApproved),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n\n /// @dev NOTE: Issuer is logged for setting account KYC status\n emit KYCApproval(account, isApproved, issuerFirm);\n return true;\n }\n\n /**\n * @notice Set the global approval status (true/false) for a given account\n * @dev | This method has an `internal` view\n * @dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n * @dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param isAllowed Boolean (true/false) global status for a given account\n * @param issuerFirm Firm name for issuing approval\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setAccountStatus(Data storage self, address account, bool isAllowed, string issuerFirm) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account)));\n require(\n self.Storage.setBool(id, isAllowed),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n\n /// @dev NOTE: Issuer is logged for setting account status\n emit AccountStatus(account, isAllowed, issuerFirm);\n return true;\n }\n\n\n /**\n * @notice Set a forwarded address for an account.\n * @dev | This method has an `internal` view\n * @dev | Forwarded accounts must be set by an authority in case of account recovery;\n * @dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n * @dev | All transactions will be logged under the same KYC information as the original account holder;\n * @param self Internal storage proxying TokenIOStorage contract\n * @param originalAccount Original registered Ethereum address of the account holder\n * @param forwardedAccount Forwarded Ethereum address of the account holder\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setForwardedAccount(Data storage self, address originalAccount, address forwardedAccount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('master.account', forwardedAccount));\n require(\n self.Storage.setAddress(id, originalAccount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Get the original address for a forwarded account\n * @dev | This method has an `internal` view\n * @dev | Will return the registered account for the given forwarded account\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}\n */\n function getForwardedAccount(Data storage self, address account) internal view returns (address registeredAccount) {\n bytes32 id = keccak256(abi.encodePacked('master.account', account));\n address originalAccount = self.Storage.getAddress(id);\n if (originalAccount != 0x0) {\n return originalAccount;\n } else {\n return account;\n }\n }\n\n /**\n * @notice Get KYC approval status for the account holder\n * @dev | This method has an `internal` view\n * @dev | All forwarded accounts will use the original account's status\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"status\" : \"Returns the KYC approval status for an account holder\" }\n */\n function getKYCApproval(Data storage self, address account) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Get global approval status for the account holder\n * @dev | This method has an `internal` view\n * @dev | All forwarded accounts will use the original account's status\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"status\" : \"Returns the global approval status for an account holder\" }\n */\n function getAccountStatus(Data storage self, address account) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Get the contract interface address associated with token symbol\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }\n */\n function getTokenNameSpace(Data storage self, string currency) internal view returns (address contractAddress) {\n bytes32 id = keccak256(abi.encodePacked('token.namespace', currency));\n return self.Storage.getAddress(id);\n }\n\n /**\n * @notice Get the token name for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenName\" : \"Name of the token contract\"}\n */\n function getTokenName(Data storage self, address contractAddress) internal view returns (string tokenName) {\n bytes32 id = keccak256(abi.encodePacked('token.name', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token symbol for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenSymbol\" : \"Symbol of the token contract\"}\n */\n function getTokenSymbol(Data storage self, address contractAddress) internal view returns (string tokenSymbol) {\n bytes32 id = keccak256(abi.encodePacked('token.symbol', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token Three letter abbreviation (TLA) for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenTLA\" : \"TLA of the token contract\"}\n */\n function getTokenTLA(Data storage self, address contractAddress) internal view returns (string tokenTLA) {\n bytes32 id = keccak256(abi.encodePacked('token.tla', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token version for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenVersion\" : \"Semantic version of the token contract\"}\n */\n function getTokenVersion(Data storage self, address contractAddress) internal view returns (string) {\n bytes32 id = keccak256(abi.encodePacked('token.version', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token decimals for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"tokenDecimals\" : \"Decimals of the token contract\"}\n */\n function getTokenDecimals(Data storage self, string currency) internal view returns (uint tokenDecimals) {\n bytes32 id = keccak256(abi.encodePacked('token.decimals', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}\n */\n function getFeeBPS(Data storage self, address contractAddress) internal view returns (uint feeBps) {\n bytes32 id = keccak256(abi.encodePacked('fee.bps', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}\n */\n function getFeeMin(Data storage self, address contractAddress) internal view returns (uint feeMin) {\n bytes32 id = keccak256(abi.encodePacked('fee.min', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}\n */\n function getFeeMax(Data storage self, address contractAddress) internal view returns (uint feeMax) {\n bytes32 id = keccak256(abi.encodePacked('fee.max', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the flat fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}\n */\n function getFeeFlat(Data storage self, address contractAddress) internal view returns (uint feeFlat) {\n bytes32 id = keccak256(abi.encodePacked('fee.flat', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the flat message of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}\n */\n function getFeeMsg(Data storage self, address contractAddress) internal view returns (bytes feeMsg) {\n bytes32 id = keccak256(abi.encodePacked('fee.msg', contractAddress));\n return self.Storage.getBytes(id);\n }\n\n /**\n * @notice Set the master fee contract used as the default fee contract when none is provided\n * @dev | This method has an `internal` view\n * @dev | This value is set in the TokenIOAuthority contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setMasterFeeContract(Data storage self, address contractAddress) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.contract.master'));\n require(\n self.Storage.setAddress(id, contractAddress),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Get the master fee contract set via the TokenIOAuthority contract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}\n */\n function getMasterFeeContract(Data storage self) internal view returns (address masterFeeContract) {\n bytes32 id = keccak256(abi.encodePacked('fee.contract.master'));\n return self.Storage.getAddress(id);\n }\n\n /**\n * @notice Get the fee contract set for a contract interface\n * @dev | This method has an `internal` view\n * @dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n * @dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}\n */\n function getFeeContract(Data storage self, address contractAddress) internal view returns (address feeContract) {\n bytes32 id = keccak256(abi.encodePacked('fee.account', contractAddress));\n\n address feeAccount = self.Storage.getAddress(id);\n if (feeAccount == 0x0) {\n return getMasterFeeContract(self);\n } else {\n return feeAccount;\n }\n }\n\n /**\n * @notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return { \"supply\" : \"Returns the token supply of the given currency\"}\n */\n function getTokenSupply(Data storage self, string currency) internal view returns (uint supply) {\n bytes32 id = keccak256(abi.encodePacked('token.supply', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the token spender allowance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param spender Ethereum address of spender\n * @return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}\n */\n function getTokenAllowance(Data storage self, string currency, address account, address spender) internal view returns (uint allowance) {\n bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, spender)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @return { \"balance\" : \"Return the balance of a given account for a specified currency\"}\n */\n function getTokenBalance(Data storage self, string currency, address account) internal view returns (uint balance) {\n bytes32 id = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}\n */\n function getTokenFrozenBalance(Data storage self, string currency, address account) internal view returns (uint frozenBalance) {\n bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @param amount Amount of tokens to freeze for account\n * @return { \"success\" : \"Return true if successfully called from another contract\"}\n */\n function setTokenFrozenBalance(Data storage self, string currency, address account, uint amount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account)));\n require(\n self.Storage.setUint(id, amount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the fee contract\n * @param amount Transaction value\n * @return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }\n */\n function calculateFees(Data storage self, address contractAddress, uint amount) internal view returns (uint calculatedFees) {\n\n uint maxFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.max', contractAddress)));\n uint minFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.min', contractAddress)));\n uint bpsFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.bps', contractAddress)));\n uint flatFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.flat', contractAddress)));\n uint fees = ((amount.mul(bpsFee)).div(10000)).add(flatFee);\n\n if (fees > maxFee) {\n return maxFee;\n } else if (fees < minFee) {\n return minFee;\n } else {\n return fees;\n }\n }\n\n /**\n * @notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param accountA Ethereum address of first account holder to verify\n * @param accountB Ethereum address of second account holder to verify\n * @return { \"verified\" : \"Returns true if both accounts are successfully verified\" }\n */\n function verifyAccounts(Data storage self, address accountA, address accountB) internal view returns (bool verified) {\n require(\n verifyAccount(self, accountA),\n \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"\n );\n require(\n verifyAccount(self, accountB),\n \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"\n );\n return true;\n }\n\n /**\n * @notice Verified KYC and global status for a single account and return true or throw if account is not verified\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder to verify\n * @return { \"verified\" : \"Returns true if account is successfully verified\" }\n */\n function verifyAccount(Data storage self, address account) internal view returns (bool verified) {\n require(\n getKYCApproval(self, account),\n \"Error: Account does not have KYC approval.\"\n );\n require(\n getAccountStatus(self, account),\n \"Error: Account status is `false`. Account status must be `true`.\"\n );\n return true;\n }\n\n\n /**\n * @notice Transfer an amount of currency token from msg.sender account to another specified account\n * @dev This function is called by an interface that is accessible directly to the account holder\n * @dev | This method has an `internal` view\n * @dev | This method uses `forceTransfer()` low-level api\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function transfer(Data storage self, string currency, address to, uint amount, bytes data) internal returns (bool success) {\n require(address(to) != 0x0, \"Error: `to` address cannot be null.\" );\n require(amount > 0, \"Error: `amount` must be greater than zero\");\n\n address feeContract = getFeeContract(self, address(this));\n uint fees = calculateFees(self, feeContract, amount);\n\n require(\n setAccountSpendingAmount(self, msg.sender, getFxUSDAmount(self, currency, amount)),\n \"Error: Unable to set spending amount for account.\");\n\n require(\n forceTransfer(self, currency, msg.sender, to, amount, data),\n \"Error: Unable to transfer funds to account.\");\n\n // @dev transfer fees to fee contract\n require(\n forceTransfer(self, currency, msg.sender, feeContract, fees, getFeeMsg(self, feeContract)),\n \"Error: Unable to transfer fees to fee contract.\");\n\n return true;\n }\n\n /**\n * @notice Transfer an amount of currency token from account to another specified account via an approved spender account\n * @dev This function is called by an interface that is accessible directly to the account spender\n * @dev | This method has an `internal` view\n * @dev | Transactions will fail if the spending amount exceeds the daily limit\n * @dev | This method uses `forceTransfer()` low-level api\n * @dev | This method implements ERC20 transferFrom() method with approved spender behavior\n * @dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param from Ethereum address of account to send currency amount from\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) {\n require(\n address(to) != 0x0,\n \"Error: `to` address must not be null.\"\n );\n\n address feeContract = getFeeContract(self, address(this));\n uint fees = calculateFees(self, feeContract, amount);\n\n /// @dev NOTE: This transaction will fail if the spending amount exceeds the daily limit\n require(\n setAccountSpendingAmount(self, from, getFxUSDAmount(self, currency, amount)),\n \"Error: Unable to set account spending amount.\"\n );\n\n /// @dev Attempt to transfer the amount\n require(\n forceTransfer(self, currency, from, to, amount, data),\n \"Error: Unable to transfer funds to account.\"\n );\n\n // @dev transfer fees to fee contract\n require(\n forceTransfer(self, currency, from, feeContract, fees, getFeeMsg(self, feeContract)),\n \"Error: Unable to transfer fees to fee contract.\"\n );\n\n /// @dev Attempt to update the spender allowance\n require(\n updateAllowance(self, currency, from, amount),\n \"Error: Unable to update allowance for spender.\"\n );\n\n return true;\n }\n\n /**\n * @notice Low-level transfer method\n * @dev | This method has an `internal` view\n * @dev | This method does not include fees or approved allowances.\n * @dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param from Ethereum address of account to send currency amount from\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) {\n require(\n address(to) != 0x0,\n \"Error: `to` address must not be null.\"\n );\n\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, from)));\n bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, to)));\n\n require(\n self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n require(\n self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n\n emit Transfer(currency, from, to, amount, data);\n\n return true;\n }\n\n /**\n * @notice Low-level method to update spender allowance for account\n * @dev | This method is called inside the `transferFrom()` method\n * @dev | msg.sender == spender address\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @param amount Value to reduce allowance by (i.e. the amount spent)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function updateAllowance(Data storage self, string currency, address account, uint amount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, msg.sender)));\n require(\n self.Storage.setUint(id, self.Storage.getUint(id).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Low-level method to set the allowance for a spender\n * @dev | This method is called inside the `approve()` ERC20 method\n * @dev | msg.sender == account holder\n * @param self Internal storage proxying TokenIOStorage contract\n * @param spender Ethereum address of account spender\n * @param amount Value to set for spender allowance\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function approveAllowance(Data storage self, address spender, uint amount) internal returns (bool success) {\n require(spender != 0x0,\n \"Error: `spender` address cannot be null.\");\n\n string memory currency = getTokenSymbol(self, address(this));\n\n require(\n getTokenFrozenBalance(self, currency, getForwardedAccount(self, spender)) == 0,\n \"Error: Spender must not have a frozen balance directly\");\n\n bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, msg.sender), getForwardedAccount(self, spender)));\n bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, msg.sender)));\n\n require(\n self.Storage.getUint(id_a) == 0 || amount == 0,\n \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\");\n\n require(\n self.Storage.getUint(id_b) >= amount,\n \"Error: Allowance cannot exceed msg.sender token balance.\");\n\n require(\n self.Storage.setUint(id_a, amount),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Approval(msg.sender, spender, amount);\n\n return true;\n }\n\n /**\n * @notice Deposit an amount of currency into the Ethereum account holder\n * @dev | The total supply of the token increases only when new funds are deposited 1:1\n * @dev | This method should only be called by authorized issuer firms\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder to deposit funds for\n * @param amount Value of currency to deposit for account\n * @param issuerFirm Name of the issuing firm authorizing the deposit\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function deposit(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) {\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm));\n bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency));\n\n\n require(self.Storage.setUint(id_a, self.Storage.getUint(id_a).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(self.Storage.setUint(id_c, self.Storage.getUint(id_c).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Deposit(currency, account, amount, issuerFirm);\n\n return true;\n\n }\n\n /**\n * @notice Withdraw an amount of currency from the Ethereum account holder\n * @dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n * @dev | This method should only be called by authorized issuer firms\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder to deposit funds for\n * @param amount Value of currency to withdraw for account\n * @param issuerFirm Name of the issuing firm authorizing the withdraw\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function withdraw(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) {\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm)); // possible for issuer to go negative\n bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency));\n\n require(\n self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(\n self.Storage.setUint(id_b, self.Storage.getUint(id_b).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(\n self.Storage.setUint(id_c, self.Storage.getUint(id_c).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Withdraw(currency, account, amount, issuerFirm);\n\n return true;\n\n }\n\n /**\n * @notice Method for setting a registered issuer firm\n * @dev | Only Token, Inc. and other authorized institutions may set a registered firm\n * @dev | The TokenIOAuthority.sol interface wraps this method\n * @dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the firm to be registered\n * @param approved Approval status to set for the firm (true/false)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setRegisteredFirm(Data storage self, string issuerFirm, bool approved) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm));\n require(\n self.Storage.setBool(id, approved),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Method for setting a registered issuer firm authority\n * @dev | Only Token, Inc. and other approved institutions may set a registered firm\n * @dev | The TokenIOAuthority.sol interface wraps this method\n * @dev | Authority can only be set for a registered issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the firm to be registered to authority\n * @param authorityAddress Ethereum address of the firm authority to be approved\n * @param approved Approval status to set for the firm authority (true/false)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setRegisteredAuthority(Data storage self, string issuerFirm, address authorityAddress, bool approved) internal returns (bool success) {\n require(\n isRegisteredFirm(self, issuerFirm),\n \"Error: `issuerFirm` must be registered.\");\n\n bytes32 id_a = keccak256(abi.encodePacked('registered.authority', issuerFirm, authorityAddress));\n bytes32 id_b = keccak256(abi.encodePacked('registered.authority.firm', authorityAddress));\n\n require(\n self.Storage.setBool(id_a, approved),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n require(\n self.Storage.setString(id_b, issuerFirm),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n\n return true;\n }\n\n /**\n * @notice Get the issuer firm registered to the authority Ethereum address\n * @dev | Only one firm can be registered per authority\n * @param self Internal storage proxying TokenIOStorage contract\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"issuerFirm\" : \"Name of the firm registered to authority\" }\n */\n function getFirmFromAuthority(Data storage self, address authorityAddress) internal view returns (string issuerFirm) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority.firm', getForwardedAccount(self, authorityAddress)));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Return the boolean (true/false) registration status for an issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the issuer firm\n * @return { \"registered\" : \"Return if the issuer firm has been registered\" }\n */\n function isRegisteredFirm(Data storage self, string issuerFirm) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the issuer firm\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }\n */\n function isRegisteredToFirm(Data storage self, string issuerFirm, address authorityAddress) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority', issuerFirm, getForwardedAccount(self, authorityAddress)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return if an authority address is registered\n * @dev | This also checks the status of the registered issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"registered\" : \"Return if the authority is registered\" }\n */\n function isRegisteredAuthority(Data storage self, address authorityAddress) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority', getFirmFromAuthority(self, getForwardedAccount(self, authorityAddress)), getForwardedAccount(self, authorityAddress)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return boolean transaction status if the transaction has been used\n * @param self Internal storage proxying TokenIOStorage contract\n * @param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n * @return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}\n */\n function getTxStatus(Data storage self, bytes32 txHash) internal view returns (bool txStatus) {\n bytes32 id = keccak256(abi.encodePacked('tx.status', txHash));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Set transaction status if the transaction has been used\n * @param self Internal storage proxying TokenIOStorage contract\n * @param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setTxStatus(Data storage self, bytes32 txHash) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('tx.status', txHash));\n /// @dev Ensure transaction has not yet been used;\n require(!getTxStatus(self, txHash),\n \"Error: Transaction status must be false before setting the transaction status.\");\n\n /// @dev Update the status of the transaction;\n require(self.Storage.setBool(id, true),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Accepts a signed fx request to swap currency pairs at a given amount;\n * @dev | This method can be called directly between peers\n * @dev | This method does not take transaction fees from the swap\n * @param self Internal storage proxying TokenIOStorage contract\n * @param requester address Requester is the orginator of the offer and must\n * match the signature of the payload submitted by the fulfiller\n * @param symbolA Symbol of the currency desired\n * @param symbolB Symbol of the currency offered\n * @param valueA Amount of the currency desired\n * @param valueB Amount of the currency offered\n * @param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n * @param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n * @param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n * @param expiration Expiration of the offer; Offer is good until expired\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function execSwap(\n Data storage self,\n address requester,\n string symbolA,\n string symbolB,\n uint valueA,\n uint valueB,\n uint8 sigV,\n bytes32 sigR,\n bytes32 sigS,\n uint expiration\n ) internal returns (bool success) {\n\n bytes32 fxTxHash = keccak256(abi.encodePacked(requester, symbolA, symbolB, valueA, valueB, expiration));\n\n /// @notice check that sender and requester accounts are verified\n /// @notice Only verified accounts can perform currency swaps\n require(\n verifyAccounts(self, msg.sender, requester),\n \"Error: Only verified accounts can perform currency swaps.\");\n\n /// @dev Immediately set this transaction to be confirmed before updating any params;\n require(\n setTxStatus(self, fxTxHash),\n \"Error: Failed to set transaction status to fulfilled.\");\n\n /// @dev Ensure contract has not yet expired;\n require(expiration >= now, \"Error: Transaction has expired!\");\n\n /// @dev Recover the address of the signature from the hashed digest;\n /// @dev Ensure it equals the requester's address\n require(\n ecrecover(fxTxHash, sigV, sigR, sigS) == requester,\n \"Error: Address derived from transaction signature does not match the requester address\");\n\n /// @dev Transfer funds from each account to another.\n require(\n forceTransfer(self, symbolA, msg.sender, requester, valueA, \"0x0\"),\n \"Error: Unable to transfer funds to account.\");\n\n require(\n forceTransfer(self, symbolB, requester, msg.sender, valueB, \"0x0\"),\n \"Error: Unable to transfer funds to account.\");\n\n emit FxSwap(symbolA, symbolB, valueA, valueB, expiration, fxTxHash);\n\n return true;\n }\n\n /**\n * @notice Deprecate a contract interface\n * @dev | This is a low-level method to deprecate a contract interface.\n * @dev | This is useful if the interface needs to be updated or becomes out of date\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Ethereum address of the contract interface\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function setDeprecatedContract(Data storage self, address contractAddress) internal returns (bool success) {\n require(contractAddress != 0x0,\n \"Error: cannot deprecate a null address.\");\n\n bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress));\n\n require(self.Storage.setBool(id, true),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Return the deprecation status of a contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Ethereum address of the contract interface\n * @return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}\n */\n function isContractDeprecated(Data storage self, address contractAddress) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Set the Account Spending Period Limit as UNIX timestamp\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param period Unix timestamp of the spending period\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingPeriod(Data storage self, address account, uint period) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('limit.spending.period', account));\n require(self.Storage.setUint(id, period),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Get the Account Spending Period Limit as UNIX timestamp\n * @dev | Each account has it's own daily spending limit\n * @dev | If the current spending period has expired, it will be set upon next `transfer()`\n * or `transferFrom()` request\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"period\" : \"Returns Unix timestamp of the current spending period\"}\n */\n function getAccountSpendingPeriod(Data storage self, address account) internal view returns (uint period) {\n bytes32 id = keccak256(abi.encodePacked('limit.spending.period', account));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the account spending limit amount\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param limit Spending limit amount\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingLimit(Data storage self, address account, uint limit) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.limit', account));\n require(self.Storage.setUint(id, limit),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Get the account spending limit amount\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"limit\" : \"Returns the account spending limit amount\"}\n */\n function getAccountSpendingLimit(Data storage self, address account) internal view returns (uint limit) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.limit', account));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the account spending amount for the daily period\n * @dev | Each account has it's own daily spending limit\n * @dev | This transaction will throw if the new spending amount is greater than the limit\n * @dev | This method is called in the `transfer()` and `transferFrom()` methods\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param amount Set the amount spent for the daily period\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingAmount(Data storage self, address account, uint amount) internal returns (bool success) {\n\n /// @dev NOTE: Always ensure the period is current when checking the daily spend limit\n require(updateAccountSpendingPeriod(self, account),\n \"Error: Unable to update account spending period.\");\n\n uint updatedAmount = getAccountSpendingAmount(self, account).add(amount);\n\n /// @dev Ensure the spend limit is greater than the amount spend for the period\n require(\n getAccountSpendingLimit(self, account) >= updatedAmount,\n \"Error: Account cannot exceed its daily spend limit.\");\n\n /// @dev Update the spending period amount if within limit\n bytes32 id = keccak256(abi.encodePacked('account.spending.amount', account, getAccountSpendingPeriod(self, account)));\n require(self.Storage.setUint(id, updatedAmount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Low-level API to ensure the account spending period is always current\n * @dev | This method is internally called by `setAccountSpendingAmount()` to ensure\n * spending period is always the most current daily period.\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function updateAccountSpendingPeriod(Data storage self, address account) internal returns (bool success) {\n uint begDate = getAccountSpendingPeriod(self, account);\n if (begDate > now) {\n return true;\n } else {\n uint duration = 86400; // 86400 seconds in a day\n require(\n setAccountSpendingPeriod(self, account, begDate.add(((now.sub(begDate)).div(duration).add(1)).mul(duration))),\n \"Error: Unable to update account spending period.\");\n\n return true;\n }\n }\n\n /**\n * @notice Return the amount spent during the current period\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"amount\" : \"Returns the amount spent by the account during the current period\"}\n */\n function getAccountSpendingAmount(Data storage self, address account) internal view returns (uint amount) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.amount', account, getAccountSpendingPeriod(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Return the amount remaining during the current period\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}\n */\n function getAccountSpendingRemaining(Data storage self, address account) internal view returns (uint remainingLimit) {\n return getAccountSpendingLimit(self, account).sub(getAccountSpendingAmount(self, account));\n }\n\n /**\n * @notice Set the foreign currency exchange rate to USD in basis points\n * @dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param bpsRate Basis point rate of foreign currency exchange rate to USD\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function setFxUSDBPSRate(Data storage self, string currency, uint bpsRate) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency));\n require(\n self.Storage.setUint(id, bpsRate),\n \"Error: Unable to update account spending period.\");\n\n return true;\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount in basis points\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDBPSRate(Data storage self, string currency) internal view returns (uint bpsRate) {\n bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param fxAmount Amount of foreign currency to exchange into USD\n * @return {\"amount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDAmount(Data storage self, string currency, uint fxAmount) internal view returns (uint amount) {\n uint usdDecimals = getTokenDecimals(self, 'USDx');\n uint fxDecimals = getTokenDecimals(self, currency);\n /// @dev ensure decimal precision is normalized to USD decimals\n uint usdAmount = ((fxAmount.mul(getFxUSDBPSRate(self, currency)).div(10000)).mul(10**usdDecimals)).div(10**fxDecimals);\n return usdAmount;\n }\n\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "exportedSymbols": { + "TokenIOLib": [ + 4606 + ] + }, + "id": 4607, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1622, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "file": "./SafeMath.sol", + "id": 1623, + "nodeType": "ImportDirective", + "scope": 4607, + "sourceUnit": 286, + "src": "25:24:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1624, + "nodeType": "ImportDirective", + "scope": 4607, + "sourceUnit": 5226, + "src": "50:30:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title TokenIOLib\n@author Ryan Tate , Sean Pollock \n@notice This library proxies the TokenIOStorage contract for the interface contract,\nallowing the library and the interfaces to remain stateless, and share a universally\navailable storage contract between interfaces.", + "fullyImplemented": true, + "id": 4606, + "linearizedBaseContracts": [ + 4606 + ], + "name": "TokenIOLib", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1627, + "libraryName": { + "contractScope": null, + "id": 1625, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 285, + "src": "1018:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$285", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1012:24:8", + "typeName": { + "id": 1626, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1031:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "canonicalName": "TokenIOLib.Data", + "id": 1630, + "members": [ + { + "constant": false, + "id": 1629, + "name": "Storage", + "nodeType": "VariableDeclaration", + "scope": 1630, + "src": "1132:22:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + }, + "typeName": { + "contractScope": null, + "id": 1628, + "name": "TokenIOStorage", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5225, + "src": "1132:14:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Data", + "nodeType": "StructDefinition", + "scope": 4606, + "src": "1114:45:8", + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "@notice Not using `Log` prefix for events to be consistent with ERC20 named events;", + "id": 1638, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1632, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1638, + "src": "1268:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1631, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1634, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1638, + "src": "1291:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1633, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1291:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1636, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1638, + "src": "1316:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1635, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1316:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1267:61:8" + }, + "src": "1253:76:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1648, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 1647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1640, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "1346:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1639, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1346:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1642, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "1363:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1363:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1644, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "1388:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1643, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1388:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1646, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "1401:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1645, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1401:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1345:74:8" + }, + "src": "1332:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1658, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 1657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1650, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1438:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1649, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1438:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1652, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1455:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1651, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1455:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1654, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1480:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1653, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1480:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1656, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1493:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1655, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1493:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1437:74:8" + }, + "src": "1423:89:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1670, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1669, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1660, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1530:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1659, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1530:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1662, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1547:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1547:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1664, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1569:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1569:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1666, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1589:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1589:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1668, + "indexed": false, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1602:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1667, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1602:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1529:84:8" + }, + "src": "1515:99:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1678, + "name": "KYCApproval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1672, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1678, + "src": "1635:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1671, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1635:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1674, + "indexed": false, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 1678, + "src": "1660:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1673, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1660:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1676, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1678, + "src": "1673:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1675, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1673:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1634:57:8" + }, + "src": "1617:75:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1686, + "name": "AccountStatus", + "nodeType": "EventDefinition", + "parameters": { + "id": 1685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1680, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1715:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1679, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1715:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1682, + "indexed": false, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1740:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1681, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1740:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1684, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1753:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1683, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1753:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1714:57:8" + }, + "src": "1695:77:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1700, + "name": "FxSwap", + "nodeType": "EventDefinition", + "parameters": { + "id": 1699, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1688, + "indexed": false, + "name": "tokenASymbol", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1788:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1687, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1788:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1690, + "indexed": false, + "name": "tokenBSymbol", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1808:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1689, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1808:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1692, + "indexed": false, + "name": "tokenAValue", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1828:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1691, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1828:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1694, + "indexed": false, + "name": "tokenBValue", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1845:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1693, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1845:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1696, + "indexed": false, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1863:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1695, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1863:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1698, + "indexed": false, + "name": "transactionHash", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1880:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1697, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1880:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1787:117:8" + }, + "src": "1775:130:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1706, + "name": "AccountForward", + "nodeType": "EventDefinition", + "parameters": { + "id": 1705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1702, + "indexed": true, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 1706, + "src": "1929:31:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1701, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1929:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1704, + "indexed": true, + "name": "forwardedAccount", + "nodeType": "VariableDeclaration", + "scope": 1706, + "src": "1962:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1703, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1962:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1928:67:8" + }, + "src": "1908:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1712, + "name": "NewAuthority", + "nodeType": "EventDefinition", + "parameters": { + "id": 1711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1708, + "indexed": true, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 1712, + "src": "2018:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1707, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1710, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1712, + "src": "2045:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1709, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2045:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2017:46:8" + }, + "src": "1999:65:8" + }, + { + "body": { + "id": 1745, + "nodeType": "Block", + "src": "2554:275:8", + "statements": [ + { + "assignments": [ + 1722 + ], + "declarations": [ + { + "constant": false, + "id": 1722, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1746, + "src": "2560:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1721, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2560:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1732, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d65", + "id": 1726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2600:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + "value": "token.name" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1728, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2622:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2614:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2614:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1724, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "2583:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1725, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2583:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2583:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1723, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "2573:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2573:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2560:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1737, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1722, + "src": "2673:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1738, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1716, + "src": "2677:9:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1734, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "2650:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1735, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "2650:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "2650:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2650:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2695:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1733, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2635:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2635:172:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1742, + "nodeType": "ExpressionStatement", + "src": "2635:172:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2820:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1720, + "id": 1744, + "nodeType": "Return", + "src": "2813:11:8" + } + ] + }, + "documentation": "@notice Set the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenName Name of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1746, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1717, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1714, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1746, + "src": "2485:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1713, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "2485:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1716, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 1746, + "src": "2504:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1715, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2504:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2484:37:8" + }, + "payable": false, + "returnParameters": { + "id": 1720, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1719, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1746, + "src": "2540:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1718, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2540:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2539:14:8" + }, + "scope": 4606, + "src": "2463:366:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1779, + "nodeType": "Block", + "src": "3329:279:8", + "statements": [ + { + "assignments": [ + 1756 + ], + "declarations": [ + { + "constant": false, + "id": 1756, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1780, + "src": "3335:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1755, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3335:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1766, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e73796d626f6c", + "id": 1760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3375:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + "value": "token.symbol" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1762, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3399:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3391:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3391:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1758, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "3358:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3358:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3358:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1757, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "3348:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3348:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3335:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1771, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1756, + "src": "3450:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1772, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1750, + "src": "3454:11:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1768, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1748, + "src": "3427:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "3427:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "3427:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3427:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3474:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1767, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "3412:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3412:174:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1776, + "nodeType": "ExpressionStatement", + "src": "3412:174:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3599:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1754, + "id": 1778, + "nodeType": "Return", + "src": "3592:11:8" + } + ] + }, + "documentation": "@notice Set the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenSymbol Symbol of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1780, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenSymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1751, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1748, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1780, + "src": "3258:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1747, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "3258:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1750, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 1780, + "src": "3277:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1749, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3277:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3257:39:8" + }, + "payable": false, + "returnParameters": { + "id": 1754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1753, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1780, + "src": "3315:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1752, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3315:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3314:14:8" + }, + "scope": 4606, + "src": "3234:374:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1813, + "nodeType": "Block", + "src": "4120:273:8", + "statements": [ + { + "assignments": [ + 1790 + ], + "declarations": [ + { + "constant": false, + "id": 1790, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1814, + "src": "4126:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1789, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4126:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1800, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e746c61", + "id": 1794, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4166:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + "value": "token.tla" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1796, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "4187:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4179:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1792, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "4149:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4149:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4149:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1791, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "4139:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4139:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4126:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1805, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1790, + "src": "4238:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1806, + "name": "tokenTLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1784, + "src": "4242:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1802, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1782, + "src": "4215:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1803, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "4215:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "4215:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4215:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4259:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4200:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4200:171:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1810, + "nodeType": "ExpressionStatement", + "src": "4200:171:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4384:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1788, + "id": 1812, + "nodeType": "Return", + "src": "4377:11:8" + } + ] + }, + "documentation": "@notice Set the token three letter abreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenTLA TLA of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenTLA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1782, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1814, + "src": "4052:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1781, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "4052:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1784, + "name": "tokenTLA", + "nodeType": "VariableDeclaration", + "scope": 1814, + "src": "4071:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1783, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4071:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4051:36:8" + }, + "payable": false, + "returnParameters": { + "id": 1788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1787, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1814, + "src": "4106:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1786, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4106:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4105:14:8" + }, + "scope": 4606, + "src": "4031:362:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1847, + "nodeType": "Block", + "src": "4942:281:8", + "statements": [ + { + "assignments": [ + 1824 + ], + "declarations": [ + { + "constant": false, + "id": 1824, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1848, + "src": "4948:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1823, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4948:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1834, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e76657273696f6e", + "id": 1828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4988:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + "value": "token.version" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1830, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "5013:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5005:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5005:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1826, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "4971:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4971:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4971:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1825, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "4961:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4961:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4948:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1839, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1824, + "src": "5064:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1840, + "name": "tokenVersion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1818, + "src": "5068:12:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1836, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1816, + "src": "5041:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1837, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "5041:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "5041:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5041:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5089:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1835, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5026:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5026:175:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1844, + "nodeType": "ExpressionStatement", + "src": "5026:175:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5214:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1822, + "id": 1846, + "nodeType": "Return", + "src": "5207:11:8" + } + ] + }, + "documentation": "@notice Set the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1848, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenVersion", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1816, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1848, + "src": "4870:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1815, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "4870:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1818, + "name": "tokenVersion", + "nodeType": "VariableDeclaration", + "scope": 1848, + "src": "4889:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1817, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4889:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4869:40:8" + }, + "payable": false, + "returnParameters": { + "id": 1822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1821, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1848, + "src": "4928:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1820, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4928:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4927:14:8" + }, + "scope": 4606, + "src": "4845:378:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1881, + "nodeType": "Block", + "src": "6051:276:8", + "statements": [ + { + "assignments": [ + 1860 + ], + "declarations": [ + { + "constant": false, + "id": 1860, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "6057:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1859, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6057:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1868, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e646563696d616c73", + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6097:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + "value": "token.decimals" + }, + { + "argumentTypes": null, + "id": 1865, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1852, + "src": "6115:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1862, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "6080:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6080:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6080:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1861, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "6070:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6070:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6057:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1873, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1860, + "src": "6167:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1874, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1854, + "src": "6171:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1870, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1850, + "src": "6146:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "6146:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "6146:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6146:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6193:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1869, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6131:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6131:174:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1878, + "nodeType": "ExpressionStatement", + "src": "6131:174:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6318:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1858, + "id": 1880, + "nodeType": "Return", + "src": "6311:11:8" + } + ] + }, + "documentation": "@notice Set the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@dev This method is not set to the address of the contract, rather is maped to currency\n@dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param tokenDecimals Decimal representation of the token contract unit amount\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1882, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenDecimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1855, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1850, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "5963:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1849, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "5963:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1852, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "5982:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1851, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5982:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1854, + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "5999:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1853, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5999:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5962:56:8" + }, + "payable": false, + "returnParameters": { + "id": 1858, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1857, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "6037:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1856, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6037:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6036:14:8" + }, + "scope": 4606, + "src": "5937:390:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1915, + "nodeType": "Block", + "src": "6887:267:8", + "statements": [ + { + "assignments": [ + 1892 + ], + "declarations": [ + { + "constant": false, + "id": 1892, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1916, + "src": "6893:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1891, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6893:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1902, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 1896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6933:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1898, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "6952:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6944:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6944:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1894, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "6916:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6916:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6916:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1893, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "6906:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6906:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6893:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1907, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1892, + "src": "7001:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1908, + "name": "feeBPS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1886, + "src": "7005:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1904, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1884, + "src": "6980:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1905, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "6980:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "6980:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6980:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7020:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1903, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6965:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6965:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1912, + "nodeType": "ExpressionStatement", + "src": "6965:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7145:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1890, + "id": 1914, + "nodeType": "Return", + "src": "7138:11:8" + } + ] + }, + "documentation": "@notice Set basis point fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeBPS Basis points fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1916, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeBPS", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1887, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1884, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1916, + "src": "6823:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1883, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "6823:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "name": "feeBPS", + "nodeType": "VariableDeclaration", + "scope": 1916, + "src": "6842:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1885, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6842:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6822:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1889, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1916, + "src": "6873:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1888, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6873:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6872:14:8" + }, + "scope": 4606, + "src": "6804:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1949, + "nodeType": "Block", + "src": "7705:267:8", + "statements": [ + { + "assignments": [ + 1926 + ], + "declarations": [ + { + "constant": false, + "id": 1926, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1950, + "src": "7711:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1925, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7711:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1936, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 1930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7751:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1932, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "7770:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7762:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7762:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1928, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "7734:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7734:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7734:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1927, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "7724:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7724:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7711:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1941, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1926, + "src": "7819:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1942, + "name": "feeMin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1920, + "src": "7823:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1938, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1918, + "src": "7798:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1939, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "7798:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "7798:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7798:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7838:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1937, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "7783:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7783:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1946, + "nodeType": "ExpressionStatement", + "src": "7783:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7963:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1924, + "id": 1948, + "nodeType": "Return", + "src": "7956:11:8" + } + ] + }, + "documentation": "@notice Set minimum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMin Minimum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1950, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1918, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1950, + "src": "7641:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1917, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "7641:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1920, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 1950, + "src": "7660:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1919, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7660:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7640:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1924, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1923, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1950, + "src": "7691:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1922, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7691:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7690:14:8" + }, + "scope": 4606, + "src": "7622:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1983, + "nodeType": "Block", + "src": "8523:267:8", + "statements": [ + { + "assignments": [ + 1960 + ], + "declarations": [ + { + "constant": false, + "id": 1960, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1984, + "src": "8529:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1959, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8529:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1970, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 1964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8569:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1966, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "8588:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8580:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8580:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1962, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "8552:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8552:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8552:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1961, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "8542:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8542:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8529:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1975, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "8637:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1976, + "name": "feeMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1954, + "src": "8641:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1972, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1952, + "src": "8616:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "8616:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "8616:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8616:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8656:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1971, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8601:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8601:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1980, + "nodeType": "ExpressionStatement", + "src": "8601:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8781:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1958, + "id": 1982, + "nodeType": "Return", + "src": "8774:11:8" + } + ] + }, + "documentation": "@notice Set maximum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMax Maximum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1984, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMax", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1952, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1984, + "src": "8459:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1951, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "8459:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1954, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 1984, + "src": "8478:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1953, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8478:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8458:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1957, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1984, + "src": "8509:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1956, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8509:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8508:14:8" + }, + "scope": 4606, + "src": "8440:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2017, + "nodeType": "Block", + "src": "9338:269:8", + "statements": [ + { + "assignments": [ + 1994 + ], + "declarations": [ + { + "constant": false, + "id": 1994, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2018, + "src": "9344:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1993, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9344:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2004, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 1998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9384:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2000, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "9404:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9396:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9396:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1996, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "9367:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9367:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9367:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1995, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "9357:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9357:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9344:67:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2009, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1994, + "src": "9453:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2010, + "name": "feeFlat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1988, + "src": "9457:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2006, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1986, + "src": "9432:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2007, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "9432:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "9432:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 2011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9432:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9473:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2005, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "9417:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9417:168:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2014, + "nodeType": "ExpressionStatement", + "src": "9417:168:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9598:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1992, + "id": 2016, + "nodeType": "Return", + "src": "9591:11:8" + } + ] + }, + "documentation": "@notice Set flat fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeFlat Flat fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2018, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeFlat", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1986, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2018, + "src": "9273:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1985, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "9273:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1988, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 2018, + "src": "9292:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1987, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9292:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9272:33:8" + }, + "payable": false, + "returnParameters": { + "id": 1992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1991, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2018, + "src": "9324:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1990, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9324:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9323:14:8" + }, + "scope": 4606, + "src": "9253:354:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2051, + "nodeType": "Block", + "src": "10188:268:8", + "statements": [ + { + "assignments": [ + 2028 + ], + "declarations": [ + { + "constant": false, + "id": 2028, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2052, + "src": "10194:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2027, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10194:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2038, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d7367", + "id": 2032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10234:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + "value": "fee.msg" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2034, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "10253:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 2033, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10245:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10245:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2030, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "10217:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10217:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10217:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2029, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "10207:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10207:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10194:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2043, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2028, + "src": "10303:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2044, + "name": "feeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2022, + "src": "10307:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2040, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2020, + "src": "10281:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2041, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "10281:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 5010, + "src": "10281:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,bytes memory) external returns (bool)" + } + }, + "id": 2045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10281:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10322:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2039, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "10266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10266:168:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2048, + "nodeType": "ExpressionStatement", + "src": "10266:168:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10447:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2026, + "id": 2050, + "nodeType": "Return", + "src": "10440:11:8" + } + ] + }, + "documentation": "@notice Set fee message for contract interface\n@dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n@dev Fee messages vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMsg Fee message included in a transaction with fees\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2052, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMsg", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2023, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2020, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2052, + "src": "10123:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2019, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "10123:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2022, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 2052, + "src": "10142:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2021, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10142:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10122:33:8" + }, + "payable": false, + "returnParameters": { + "id": 2026, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2025, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2052, + "src": "10174:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2024, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10174:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10173:14:8" + }, + "scope": 4606, + "src": "10104:352:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2085, + "nodeType": "Block", + "src": "11121:279:8", + "statements": [ + { + "assignments": [ + 2062 + ], + "declarations": [ + { + "constant": false, + "id": 2062, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2086, + "src": "11127:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2061, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11127:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2072, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6163636f756e74", + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11167:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + "value": "fee.account" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2068, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "11190:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 2067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11182:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11182:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2064, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "11150:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11150:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11150:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2063, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "11140:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11140:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11127:70:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2077, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "11242:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2078, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2056, + "src": "11246:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2074, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2054, + "src": "11218:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2075, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "11218:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4950, + "src": "11218:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11218:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11266:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2073, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "11203:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11203:175:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2082, + "nodeType": "ExpressionStatement", + "src": "11203:175:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11391:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2060, + "id": 2084, + "nodeType": "Return", + "src": "11384:11:8" + } + ] + }, + "documentation": "@notice Set fee contract for a contract interface\n@dev feeContract must be a TokenIOFeeContract storage approved contract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@dev | This must be called directly from the interface contract\n@param self Internal storage proxying TokenIOStorage contract\n@param feeContract Set the fee contract for `this` contract address interface\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2086, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2054, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2086, + "src": "11049:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2053, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "11049:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2056, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 2086, + "src": "11068:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2055, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11068:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11048:40:8" + }, + "payable": false, + "returnParameters": { + "id": 2060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2059, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2086, + "src": "11107:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2058, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11107:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11106:14:8" + }, + "scope": 4606, + "src": "11025:375:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2119, + "nodeType": "Block", + "src": "12035:280:8", + "statements": [ + { + "assignments": [ + 2096 + ], + "declarations": [ + { + "constant": false, + "id": 2096, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2120, + "src": "12041:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2095, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12041:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2104, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d657370616365", + "id": 2100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12081:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + "value": "token.namespace" + }, + { + "argumentTypes": null, + "id": 2101, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2090, + "src": "12100:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2098, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "12064:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12064:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12064:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2097, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "12054:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12054:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12041:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2109, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2096, + "src": "12155:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2111, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "12167:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12159:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12159:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2106, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2088, + "src": "12131:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "12131:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4950, + "src": "12131:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12131:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12181:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2105, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "12116:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12116:177:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2116, + "nodeType": "ExpressionStatement", + "src": "12116:177:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12306:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2094, + "id": 2118, + "nodeType": "Return", + "src": "12299:11:8" + } + ] + }, + "documentation": "@notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n@dev | This should only be called once from a token interface contract;\n@dev | This method has an `internal` view\n@dev | This method is experimental and may be deprecated/refactored\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2120, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2091, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2088, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2120, + "src": "11967:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2087, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "11967:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2090, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2120, + "src": "11986:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2089, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11986:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11966:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2094, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2093, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2120, + "src": "12021:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2092, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12021:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12020:14:8" + }, + "scope": 4606, + "src": "11940:375:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2164, + "nodeType": "Block", + "src": "13113:435:8", + "statements": [ + { + "assignments": [ + 2134 + ], + "declarations": [ + { + "constant": false, + "id": 2134, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13121:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2133, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13121:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2145, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e6b7963", + "id": 2138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13161:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + "value": "account.kyc" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2140, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2122, + "src": "13196:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2141, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2124, + "src": "13202:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2139, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "13176:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13176:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2136, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "13144:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13144:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13144:67:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2135, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "13134:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13134:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13121:91:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2150, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "13258:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2151, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2126, + "src": "13262:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2147, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2122, + "src": "13237:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "13237:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "13237:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13237:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13283:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "13220:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13220:177:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2155, + "nodeType": "ExpressionStatement", + "src": "13220:177:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2157, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2124, + "src": "13492:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2158, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2126, + "src": "13501:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2159, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2128, + "src": "13513:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2156, + "name": "KYCApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1678, + "src": "13480:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,bool,string memory)" + } + }, + "id": 2160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13480:44:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2161, + "nodeType": "EmitStatement", + "src": "13475:49:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13539:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2132, + "id": 2163, + "nodeType": "Return", + "src": "13532:11:8" + } + ] + }, + "documentation": "@notice Set the KYC approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isApproved Boolean (true/false) KYC approval status for a given account\n@param issuerFirm Firm name for issuing KYC approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2165, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setKYCApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2122, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13009:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2121, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "13009:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2124, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13028:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13028:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2126, + "name": "isApproved", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13045:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2125, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13045:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2128, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13062:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2127, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "13062:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13008:72:8" + }, + "payable": false, + "returnParameters": { + "id": 2132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2131, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13099:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2130, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13099:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13098:14:8" + }, + "scope": 4606, + "src": "12985:563:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2209, + "nodeType": "Block", + "src": "14343:419:8", + "statements": [ + { + "assignments": [ + 2179 + ], + "declarations": [ + { + "constant": false, + "id": 2179, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14349:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2178, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "14349:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2190, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e616c6c6f776564", + "id": 2183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14389:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + "value": "account.allowed" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2185, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "14428:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2186, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2169, + "src": "14434:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2184, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "14408:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14408:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2181, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "14372:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14372:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14372:71:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2180, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "14362:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14362:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14349:95:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2195, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2179, + "src": "14486:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2196, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2171, + "src": "14490:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2192, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "14465:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "14465:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "14465:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14465:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14508:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2191, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "14450:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14450:170:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2200, + "nodeType": "ExpressionStatement", + "src": "14450:170:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2202, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2169, + "src": "14709:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2203, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2171, + "src": "14718:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2204, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2173, + "src": "14729:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2201, + "name": "AccountStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "14695:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,bool,string memory)" + } + }, + "id": 2205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14695:45:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2206, + "nodeType": "EmitStatement", + "src": "14690:50:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14753:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2177, + "id": 2208, + "nodeType": "Return", + "src": "14746:11:8" + } + ] + }, + "documentation": "@notice Set the global approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isAllowed Boolean (true/false) global status for a given account\n@param issuerFirm Firm name for issuing approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2210, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2167, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14240:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2166, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "14240:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2169, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14259:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14259:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2171, + "name": "isAllowed", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14276:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14276:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2173, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14292:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2172, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14292:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14239:71:8" + }, + "payable": false, + "returnParameters": { + "id": 2177, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2176, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14329:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2175, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14329:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14328:14:8" + }, + "scope": 4606, + "src": "14214:548:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2243, + "nodeType": "Block", + "src": "15647:289:8", + "statements": [ + { + "assignments": [ + 2222 + ], + "declarations": [ + { + "constant": false, + "id": 2222, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15653:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2221, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15653:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2230, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6d61737465722e6163636f756e74", + "id": 2226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15693:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + "value": "master.account" + }, + { + "argumentTypes": null, + "id": 2227, + "name": "forwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2216, + "src": "15711:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2224, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "15676:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15676:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15676:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2223, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "15666:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15666:63:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15653:76:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2235, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2222, + "src": "15774:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2236, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2214, + "src": "15778:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2232, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2212, + "src": "15750:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "15750:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4950, + "src": "15750:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15750:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15802:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2231, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "15735:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15735:179:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2240, + "nodeType": "ExpressionStatement", + "src": "15735:179:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15927:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2220, + "id": 2242, + "nodeType": "Return", + "src": "15920:11:8" + } + ] + }, + "documentation": "@notice Set a forwarded address for an account.\n@dev | This method has an `internal` view\n@dev | Forwarded accounts must be set by an authority in case of account recovery;\n@dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n@dev | All transactions will be logged under the same KYC information as the original account holder;\n@param self Internal storage proxying TokenIOStorage contract\n@param originalAccount Original registered Ethereum address of the account holder\n@param forwardedAccount Forwarded Ethereum address of the account holder\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2244, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2212, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15545:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2211, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "15545:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2214, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15564:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15564:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2216, + "name": "forwardedAccount", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15589:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15589:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15544:70:8" + }, + "payable": false, + "returnParameters": { + "id": 2220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15633:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15633:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15632:14:8" + }, + "scope": 4606, + "src": "15516:420:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2281, + "nodeType": "Block", + "src": "16515:242:8", + "statements": [ + { + "assignments": [ + 2254 + ], + "declarations": [ + { + "constant": false, + "id": 2254, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16521:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2253, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "16521:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2262, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6d61737465722e6163636f756e74", + "id": 2258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16561:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + "value": "master.account" + }, + { + "argumentTypes": null, + "id": 2259, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2248, + "src": "16579:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2256, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "16544:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16544:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16544:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2255, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "16534:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16534:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16521:67:8" + }, + { + "assignments": [ + 2264 + ], + "declarations": [ + { + "constant": false, + "id": 2264, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16594:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16594:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2270, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2268, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2254, + "src": "16644:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2265, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2246, + "src": "16620:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2266, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "16620:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5164, + "src": "16620:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16620:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16594:53:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2271, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "16657:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 2272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16676:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "16657:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2279, + "nodeType": "Block", + "src": "16724:29:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2277, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2248, + "src": "16739:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2252, + "id": 2278, + "nodeType": "Return", + "src": "16732:14:8" + } + ] + }, + "id": 2280, + "nodeType": "IfStatement", + "src": "16653:100:8", + "trueBody": { + "id": 2276, + "nodeType": "Block", + "src": "16681:37:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2274, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "16696:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2252, + "id": 2275, + "nodeType": "Return", + "src": "16689:22:8" + } + ] + } + } + ] + }, + "documentation": "@notice Get the original address for a forwarded account\n@dev | This method has an `internal` view\n@dev | Will return the registered account for the given forwarded account\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}", + "id": 2282, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2246, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16429:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2245, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "16429:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2248, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16448:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2247, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16448:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16428:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2252, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2251, + "name": "registeredAccount", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16488:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16488:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16487:27:8" + }, + "scope": 4606, + "src": "16400:357:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2310, + "nodeType": "Block", + "src": "17256:143:8", + "statements": [ + { + "assignments": [ + 2292 + ], + "declarations": [ + { + "constant": false, + "id": 2292, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2311, + "src": "17264:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2291, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17264:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2303, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e6b7963", + "id": 2296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17304:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + "value": "account.kyc" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2298, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2284, + "src": "17339:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2299, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2286, + "src": "17345:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2297, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "17319:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17319:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2294, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "17287:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17287:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17287:67:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2293, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "17277:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17277:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17264:91:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2307, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "17391:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2304, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2284, + "src": "17370:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2305, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "17370:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "17370:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 2308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17370:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2290, + "id": 2309, + "nodeType": "Return", + "src": "17363:31:8" + } + ] + }, + "documentation": "@notice Get KYC approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the KYC approval status for an account holder\" }", + "id": 2311, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getKYCApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2287, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2284, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2311, + "src": "17184:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2283, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "17184:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2286, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2311, + "src": "17203:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2285, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17203:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17183:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2290, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2289, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 2311, + "src": "17243:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2288, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17243:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17242:13:8" + }, + "scope": 4606, + "src": "17160:239:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2339, + "nodeType": "Block", + "src": "17906:143:8", + "statements": [ + { + "assignments": [ + 2321 + ], + "declarations": [ + { + "constant": false, + "id": 2321, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2340, + "src": "17912:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2320, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17912:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2332, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e616c6c6f776564", + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17952:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + "value": "account.allowed" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2327, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2313, + "src": "17991:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2328, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2315, + "src": "17997:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2326, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "17971:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17971:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2323, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "17935:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17935:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17935:71:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2322, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "17925:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17925:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17912:95:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2336, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2321, + "src": "18041:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2333, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2313, + "src": "18020:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "18020:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "18020:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 2337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18020:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2319, + "id": 2338, + "nodeType": "Return", + "src": "18013:31:8" + } + ] + }, + "documentation": "@notice Get global approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the global approval status for an account holder\" }", + "id": 2340, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2313, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2340, + "src": "17834:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2312, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "17834:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2315, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2340, + "src": "17853:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17853:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17833:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2318, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 2340, + "src": "17893:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2317, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17893:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17892:13:8" + }, + "scope": 4606, + "src": "17808:241:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2365, + "nodeType": "Block", + "src": "18533:120:8", + "statements": [ + { + "assignments": [ + 2350 + ], + "declarations": [ + { + "constant": false, + "id": 2350, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2366, + "src": "18539:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2349, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "18539:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2358, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d657370616365", + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18579:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + "value": "token.namespace" + }, + { + "argumentTypes": null, + "id": 2355, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2344, + "src": "18598:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2352, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "18562:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18562:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18562:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2351, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "18552:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18552:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18539:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2362, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2350, + "src": "18645:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2359, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2342, + "src": "18621:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "18621:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5164, + "src": "18621:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18621:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2348, + "id": 2364, + "nodeType": "Return", + "src": "18614:34:8" + } + ] + }, + "documentation": "@notice Get the contract interface address associated with token symbol\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }", + "id": 2366, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2345, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2342, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2366, + "src": "18449:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2341, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "18449:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2344, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2366, + "src": "18468:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2343, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "18468:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18448:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2347, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2366, + "src": "18508:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18508:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18507:25:8" + }, + "scope": 4606, + "src": "18422:231:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2391, + "nodeType": "Block", + "src": "19151:121:8", + "statements": [ + { + "assignments": [ + 2376 + ], + "declarations": [ + { + "constant": false, + "id": 2376, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2392, + "src": "19157:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2375, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19157:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2384, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d65", + "id": 2380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19197:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + "value": "token.name" + }, + { + "argumentTypes": null, + "id": 2381, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2370, + "src": "19211:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2378, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "19180:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19180:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19180:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2377, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "19170:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19170:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19157:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2388, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2376, + "src": "19264:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2385, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2368, + "src": "19241:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "19241:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "19241:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19241:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2374, + "id": 2390, + "nodeType": "Return", + "src": "19234:33:8" + } + ] + }, + "documentation": "@notice Get the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenName\" : \"Name of the token contract\"}", + "id": 2392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2368, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2392, + "src": "19066:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2367, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "19066:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2370, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2392, + "src": "19085:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19085:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19065:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2373, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 2392, + "src": "19133:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2372, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "19133:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19132:18:8" + }, + "scope": 4606, + "src": "19044:228:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2417, + "nodeType": "Block", + "src": "19780:123:8", + "statements": [ + { + "assignments": [ + 2402 + ], + "declarations": [ + { + "constant": false, + "id": 2402, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2418, + "src": "19786:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2401, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19786:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2410, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e73796d626f6c", + "id": 2406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19826:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + "value": "token.symbol" + }, + { + "argumentTypes": null, + "id": 2407, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2396, + "src": "19842:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2404, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "19809:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19809:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19809:49:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2403, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "19799:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19799:60:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19786:73:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2414, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2402, + "src": "19895:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2411, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2394, + "src": "19872:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "19872:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "19872:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19872:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2400, + "id": 2416, + "nodeType": "Return", + "src": "19865:33:8" + } + ] + }, + "documentation": "@notice Get the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenSymbol\" : \"Symbol of the token contract\"}", + "id": 2418, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2394, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2418, + "src": "19693:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2393, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "19693:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2396, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2418, + "src": "19712:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2395, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19712:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19692:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2399, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 2418, + "src": "19760:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2398, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "19760:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19759:20:8" + }, + "scope": 4606, + "src": "19669:234:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2443, + "nodeType": "Block", + "src": "20424:120:8", + "statements": [ + { + "assignments": [ + 2428 + ], + "declarations": [ + { + "constant": false, + "id": 2428, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2444, + "src": "20430:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2427, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "20430:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2436, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e746c61", + "id": 2432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20470:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + "value": "token.tla" + }, + { + "argumentTypes": null, + "id": 2433, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "20483:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2430, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "20453:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20453:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20453:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2429, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "20443:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20443:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20430:70:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2440, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2428, + "src": "20536:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2437, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2420, + "src": "20513:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2438, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "20513:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "20513:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20513:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2426, + "id": 2442, + "nodeType": "Return", + "src": "20506:33:8" + } + ] + }, + "documentation": "@notice Get the token Three letter abbreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenTLA\" : \"TLA of the token contract\"}", + "id": 2444, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenTLA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2420, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2444, + "src": "20340:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2419, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "20340:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2422, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2444, + "src": "20359:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2421, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20359:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20339:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2425, + "name": "tokenTLA", + "nodeType": "VariableDeclaration", + "scope": 2444, + "src": "20407:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2424, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20407:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20406:17:8" + }, + "scope": 4606, + "src": "20319:225:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2469, + "nodeType": "Block", + "src": "21053:124:8", + "statements": [ + { + "assignments": [ + 2454 + ], + "declarations": [ + { + "constant": false, + "id": 2454, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2470, + "src": "21059:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2453, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21059:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2462, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e76657273696f6e", + "id": 2458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21099:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + "value": "token.version" + }, + { + "argumentTypes": null, + "id": 2459, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2448, + "src": "21116:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2456, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "21082:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21082:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21082:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2455, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "21072:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21072:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21059:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2466, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2454, + "src": "21169:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2463, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2446, + "src": "21146:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2464, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "21146:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "21146:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21146:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2452, + "id": 2468, + "nodeType": "Return", + "src": "21139:33:8" + } + ] + }, + "documentation": "@notice Get the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenVersion\" : \"Semantic version of the token contract\"}", + "id": 2470, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenVersion", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2446, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2470, + "src": "20978:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2445, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "20978:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2448, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2470, + "src": "20997:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20997:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20977:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2451, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2470, + "src": "21045:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2450, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "21045:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21044:8:8" + }, + "scope": 4606, + "src": "20953:224:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2495, + "nodeType": "Block", + "src": "21688:116:8", + "statements": [ + { + "assignments": [ + 2480 + ], + "declarations": [ + { + "constant": false, + "id": 2480, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2496, + "src": "21694:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2479, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21694:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2488, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e646563696d616c73", + "id": 2484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21734:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + "value": "token.decimals" + }, + { + "argumentTypes": null, + "id": 2485, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2474, + "src": "21752:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2482, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "21717:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21717:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21717:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2481, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "21707:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21707:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21694:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2492, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2480, + "src": "21796:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2489, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2472, + "src": "21775:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2490, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "21775:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "21775:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21775:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2478, + "id": 2494, + "nodeType": "Return", + "src": "21768:31:8" + } + ] + }, + "documentation": "@notice Get the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"tokenDecimals\" : \"Decimals of the token contract\"}", + "id": 2496, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenDecimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2475, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2472, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2496, + "src": "21609:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2471, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "21609:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2474, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2496, + "src": "21628:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2473, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "21628:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21608:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2477, + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "scope": 2496, + "src": "21668:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "21668:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21667:20:8" + }, + "scope": 4606, + "src": "21583:221:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2521, + "nodeType": "Block", + "src": "22293:116:8", + "statements": [ + { + "assignments": [ + 2506 + ], + "declarations": [ + { + "constant": false, + "id": 2506, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2522, + "src": "22299:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2505, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "22299:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2514, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 2510, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22339:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "id": 2511, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2500, + "src": "22350:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2508, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "22322:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22322:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22322:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2507, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "22312:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22312:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22299:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2518, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "22401:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2515, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2498, + "src": "22380:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2516, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "22380:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "22380:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22380:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2504, + "id": 2520, + "nodeType": "Return", + "src": "22373:31:8" + } + ] + }, + "documentation": "@notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}", + "id": 2522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeBPS", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2501, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2498, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2522, + "src": "22213:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2497, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "22213:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2500, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2522, + "src": "22232:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2499, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22232:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22212:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2503, + "name": "feeBps", + "nodeType": "VariableDeclaration", + "scope": 2522, + "src": "22280:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2502, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22280:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22279:13:8" + }, + "scope": 4606, + "src": "22194:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2547, + "nodeType": "Block", + "src": "22888:116:8", + "statements": [ + { + "assignments": [ + 2532 + ], + "declarations": [ + { + "constant": false, + "id": 2532, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "22894:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2531, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "22894:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2540, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 2536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22934:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "id": 2537, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2526, + "src": "22945:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2534, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "22917:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22917:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22917:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2533, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "22907:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22907:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22894:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2544, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2532, + "src": "22996:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2541, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2524, + "src": "22975:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2542, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "22975:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "22975:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22975:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2530, + "id": 2546, + "nodeType": "Return", + "src": "22968:31:8" + } + ] + }, + "documentation": "@notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}", + "id": 2548, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2527, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2524, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "22808:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2523, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "22808:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2526, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "22827:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2525, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22827:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22807:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2530, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2529, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "22875:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2528, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22875:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22874:13:8" + }, + "scope": 4606, + "src": "22789:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2573, + "nodeType": "Block", + "src": "23483:116:8", + "statements": [ + { + "assignments": [ + 2558 + ], + "declarations": [ + { + "constant": false, + "id": 2558, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2574, + "src": "23489:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2557, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "23489:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2566, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 2562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23529:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "id": 2563, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2552, + "src": "23540:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2560, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "23512:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23512:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23512:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2559, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "23502:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23502:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23489:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2570, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2558, + "src": "23591:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2567, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2550, + "src": "23570:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2568, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "23570:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "23570:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23570:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2556, + "id": 2572, + "nodeType": "Return", + "src": "23563:31:8" + } + ] + }, + "documentation": "@notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}", + "id": 2574, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMax", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2550, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2574, + "src": "23403:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2549, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "23403:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2552, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2574, + "src": "23422:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2551, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23422:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23402:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2555, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 2574, + "src": "23470:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2554, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "23470:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23469:13:8" + }, + "scope": 4606, + "src": "23384:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2599, + "nodeType": "Block", + "src": "24075:117:8", + "statements": [ + { + "assignments": [ + 2584 + ], + "declarations": [ + { + "constant": false, + "id": 2584, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2600, + "src": "24081:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2583, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "24081:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2592, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24121:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "id": 2589, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2578, + "src": "24133:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2586, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "24104:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2587, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24104:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24104:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2585, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "24094:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24094:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24081:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2596, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "24184:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2593, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2576, + "src": "24163:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "24163:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "24163:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24163:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2582, + "id": 2598, + "nodeType": "Return", + "src": "24156:31:8" + } + ] + }, + "documentation": "@notice Get the flat fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}", + "id": 2600, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeFlat", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2579, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2576, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2600, + "src": "23994:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2575, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "23994:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2578, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2600, + "src": "24013:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24013:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23993:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2581, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 2600, + "src": "24061:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2580, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "24061:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24060:14:8" + }, + "scope": 4606, + "src": "23974:218:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2625, + "nodeType": "Block", + "src": "24680:117:8", + "statements": [ + { + "assignments": [ + 2610 + ], + "declarations": [ + { + "constant": false, + "id": 2610, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2626, + "src": "24686:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2609, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "24686:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2618, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d7367", + "id": 2614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24726:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + "value": "fee.msg" + }, + { + "argumentTypes": null, + "id": 2615, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "24737:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2612, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "24709:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24709:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24709:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2611, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "24699:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24699:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24686:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2622, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2610, + "src": "24789:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2619, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "24767:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2620, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "24767:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 5200, + "src": "24767:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes32) view external returns (bytes memory)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24767:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 2608, + "id": 2624, + "nodeType": "Return", + "src": "24760:32:8" + } + ] + }, + "documentation": "@notice Get the flat message of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}", + "id": 2626, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMsg", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2605, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2602, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2626, + "src": "24599:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2601, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "24599:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2604, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2626, + "src": "24618:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2603, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24618:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24598:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2608, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2607, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 2626, + "src": "24666:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2606, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "24666:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24665:14:8" + }, + "scope": 4606, + "src": "24580:217:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2656, + "nodeType": "Block", + "src": "25354:276:8", + "statements": [ + { + "assignments": [ + 2636 + ], + "declarations": [ + { + "constant": false, + "id": 2636, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2657, + "src": "25360:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2635, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "25360:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2643, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e636f6e74726163742e6d6173746572", + "id": 2640, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25400:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + }, + "value": "fee.contract.master" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 2638, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "25383:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25383:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25383:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2637, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "25373:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25373:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25360:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2648, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2636, + "src": "25468:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2649, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2630, + "src": "25472:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2645, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2628, + "src": "25444:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "25444:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4950, + "src": "25444:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25444:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25496:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2644, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "25429:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25429:179:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2653, + "nodeType": "ExpressionStatement", + "src": "25429:179:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25621:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2634, + "id": 2655, + "nodeType": "Return", + "src": "25614:11:8" + } + ] + }, + "documentation": "@notice Set the master fee contract used as the default fee contract when none is provided\n@dev | This method has an `internal` view\n@dev | This value is set in the TokenIOAuthority contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2657, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2628, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2657, + "src": "25278:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2627, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "25278:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2630, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2657, + "src": "25297:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2629, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25297:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25277:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2634, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2633, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2657, + "src": "25340:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2632, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "25340:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25339:14:8" + }, + "scope": 4606, + "src": "25248:382:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2679, + "nodeType": "Block", + "src": "26023:114:8", + "statements": [ + { + "assignments": [ + 2665 + ], + "declarations": [ + { + "constant": false, + "id": 2665, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2680, + "src": "26029:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2664, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "26029:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2672, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e636f6e74726163742e6d6173746572", + "id": 2669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26069:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + }, + "value": "fee.contract.master" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 2667, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "26052:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26052:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26052:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2666, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "26042:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26042:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26029:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2676, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2665, + "src": "26129:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2673, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2659, + "src": "26105:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "26105:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5164, + "src": "26105:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26105:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2663, + "id": 2678, + "nodeType": "Return", + "src": "26098:34:8" + } + ] + }, + "documentation": "@notice Get the master fee contract set via the TokenIOAuthority contract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}", + "id": 2680, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2659, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2680, + "src": "25954:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2658, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "25954:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25953:19:8" + }, + "payable": false, + "returnParameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2662, + "name": "masterFeeContract", + "nodeType": "VariableDeclaration", + "scope": 2680, + "src": "25996:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25996:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25995:27:8" + }, + "scope": 4606, + "src": "25924:213:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2719, + "nodeType": "Block", + "src": "26836:252:8", + "statements": [ + { + "assignments": [ + 2690 + ], + "declarations": [ + { + "constant": false, + "id": 2690, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26842:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2689, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "26842:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2698, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6163636f756e74", + "id": 2694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26882:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + "value": "fee.account" + }, + { + "argumentTypes": null, + "id": 2695, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2684, + "src": "26897:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2692, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "26865:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26865:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26865:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2691, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "26855:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26855:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26842:72:8" + }, + { + "assignments": [ + 2700 + ], + "declarations": [ + { + "constant": false, + "id": 2700, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26921:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26921:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2706, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2704, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2690, + "src": "26966:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2701, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2682, + "src": "26942:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2702, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "26942:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5164, + "src": "26942:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26942:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26921:48:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2707, + "name": "feeAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2700, + "src": "26979:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26993:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "26979:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2717, + "nodeType": "Block", + "src": "27052:32:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2715, + "name": "feeAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2700, + "src": "27067:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2688, + "id": 2716, + "nodeType": "Return", + "src": "27060:17:8" + } + ] + }, + "id": 2718, + "nodeType": "IfStatement", + "src": "26975:109:8", + "trueBody": { + "id": 2714, + "nodeType": "Block", + "src": "26998:48:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2711, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2682, + "src": "27034:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + ], + "id": 2710, + "name": "getMasterFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2680, + "src": "27013:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer) view returns (address)" + } + }, + "id": 2712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27013:26:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2688, + "id": 2713, + "nodeType": "Return", + "src": "27006:33:8" + } + ] + } + } + ] + }, + "documentation": "@notice Get the fee contract set for a contract interface\n@dev | This method has an `internal` view\n@dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n@dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}", + "id": 2720, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2682, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26748:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2681, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "26748:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2684, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26767:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2683, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26767:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26747:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2688, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2687, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26815:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2686, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26815:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26814:21:8" + }, + "scope": 4606, + "src": "26724:364:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2745, + "nodeType": "Block", + "src": "27551:114:8", + "statements": [ + { + "assignments": [ + 2730 + ], + "declarations": [ + { + "constant": false, + "id": 2730, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2746, + "src": "27557:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2729, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "27557:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2738, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 2734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27597:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 2735, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2724, + "src": "27613:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2732, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "27580:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27580:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27580:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2731, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "27570:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27570:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27557:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2742, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2730, + "src": "27657:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2739, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2722, + "src": "27636:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "27636:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "27636:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27636:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2728, + "id": 2744, + "nodeType": "Return", + "src": "27629:31:8" + } + ] + }, + "documentation": "@notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"supply\" : \"Returns the token supply of the given currency\"}", + "id": 2746, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2725, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2722, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2746, + "src": "27479:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2721, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "27479:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2724, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2746, + "src": "27498:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2723, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "27498:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27478:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2727, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 2746, + "src": "27538:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2726, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "27538:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27537:13:8" + }, + "scope": 4606, + "src": "27455:210:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "28192:189:8", + "statements": [ + { + "assignments": [ + 2760 + ], + "declarations": [ + { + "constant": false, + "id": 2760, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28198:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2759, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "28198:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2776, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28238:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 2765, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2750, + "src": "28257:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2767, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2748, + "src": "28287:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2768, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2752, + "src": "28293:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2766, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "28267:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28267:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2771, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2748, + "src": "28323:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2772, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2754, + "src": "28329:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2770, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "28303:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28303:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2762, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "28221:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28221:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28221:117:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2761, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "28211:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28211:128:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28198:141:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2780, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2760, + "src": "28373:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2777, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2748, + "src": "28352:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2778, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "28352:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "28352:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28352:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2758, + "id": 2782, + "nodeType": "Return", + "src": "28345:31:8" + } + ] + }, + "documentation": "@notice Get the token spender allowance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param spender Ethereum address of spender\n@return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}", + "id": 2784, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2755, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2748, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28083:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2747, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "28083:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2750, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28102:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2749, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28102:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2752, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28119:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2751, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28119:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2754, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28136:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2753, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28136:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28082:70:8" + }, + "payable": false, + "returnParameters": { + "id": 2758, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2757, + "name": "allowance", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28176:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2756, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "28176:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28175:16:8" + }, + "scope": 4606, + "src": "28056:325:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2815, + "nodeType": "Block", + "src": "28904:151:8", + "statements": [ + { + "assignments": [ + 2796 + ], + "declarations": [ + { + "constant": false, + "id": 2796, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28910:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "28910:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2808, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 2800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28950:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 2801, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "28967:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2803, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2786, + "src": "28997:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2804, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2790, + "src": "29003:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2802, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "28977:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28977:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2798, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "28933:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28933:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28933:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2797, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "28923:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28923:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28910:103:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2812, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2796, + "src": "29047:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2809, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2786, + "src": "29026:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "29026:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "29026:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29026:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2794, + "id": 2814, + "nodeType": "Return", + "src": "29019:31:8" + } + ] + }, + "documentation": "@notice Get the token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"balance\" : \"Return the balance of a given account for a specified currency\"}", + "id": 2816, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2791, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2786, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28814:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2785, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "28814:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2788, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28833:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2787, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28833:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2790, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28850:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28850:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28813:53:8" + }, + "payable": false, + "returnParameters": { + "id": 2794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2793, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28890:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2792, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "28890:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28889:14:8" + }, + "scope": 4606, + "src": "28789:266:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2847, + "nodeType": "Block", + "src": "29610:150:8", + "statements": [ + { + "assignments": [ + 2828 + ], + "declarations": [ + { + "constant": false, + "id": 2828, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29616:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2827, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "29616:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2840, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e66726f7a656e", + "id": 2832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29656:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + "value": "token.frozen" + }, + { + "argumentTypes": null, + "id": 2833, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2820, + "src": "29672:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2835, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "29702:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2836, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2822, + "src": "29708:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2834, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "29682:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29682:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2830, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "29639:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29639:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29639:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2829, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "29629:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29629:89:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "29616:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2844, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2828, + "src": "29752:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2841, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "29731:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2842, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "29731:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "29731:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29731:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2826, + "id": 2846, + "nodeType": "Return", + "src": "29724:31:8" + } + ] + }, + "documentation": "@notice Get the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}", + "id": 2848, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenFrozenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2823, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2818, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29514:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2817, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "29514:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2820, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29533:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2819, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29533:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2822, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29550:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2821, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29550:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29513:53:8" + }, + "payable": false, + "returnParameters": { + "id": 2826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2825, + "name": "frozenBalance", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29590:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2824, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "29590:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29589:20:8" + }, + "scope": 4606, + "src": "29483:277:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2887, + "nodeType": "Block", + "src": "30356:303:8", + "statements": [ + { + "assignments": [ + 2862 + ], + "declarations": [ + { + "constant": false, + "id": 2862, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30362:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2861, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "30362:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2874, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e66726f7a656e", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30402:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + "value": "token.frozen" + }, + { + "argumentTypes": null, + "id": 2867, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2852, + "src": "30418:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2869, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2850, + "src": "30448:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2870, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2854, + "src": "30454:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2868, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "30428:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30428:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2864, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "30385:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30385:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30385:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2863, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "30375:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30375:89:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30362:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2879, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "30506:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2880, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2856, + "src": "30510:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2876, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2850, + "src": "30485:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "30485:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "30485:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 2881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30485:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30525:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2875, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "30470:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30470:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2884, + "nodeType": "ExpressionStatement", + "src": "30470:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30650:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2860, + "id": 2886, + "nodeType": "Return", + "src": "30643:11:8" + } + ] + }, + "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Amount of tokens to freeze for account\n@return { \"success\" : \"Return true if successfully called from another contract\"}", + "id": 2888, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenFrozenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2857, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2850, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30258:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2849, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "30258:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2852, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30277:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2851, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "30277:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2854, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30294:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2853, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30294:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2856, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30311:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2855, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "30311:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30257:66:8" + }, + "payable": false, + "returnParameters": { + "id": 2860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2859, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30342:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2858, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30342:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30341:14:8" + }, + "scope": 4606, + "src": "30227:432:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2987, + "nodeType": "Block", + "src": "31190:598:8", + "statements": [ + { + "assignments": [ + 2900 + ], + "declarations": [ + { + "constant": false, + "id": 2900, + "name": "maxFee", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31197:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2899, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31197:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2912, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31259:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "id": 2908, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "31270:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2905, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "31242:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31242:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31242:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2904, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "31232:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31232:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2901, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2890, + "src": "31211:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2902, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "31211:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "31211:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31211:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31197:91:8" + }, + { + "assignments": [ + 2914 + ], + "declarations": [ + { + "constant": false, + "id": 2914, + "name": "minFee", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31294:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2913, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31294:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2926, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31356:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "id": 2922, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "31367:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2919, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "31339:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2920, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31339:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31339:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2918, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "31329:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31329:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2915, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2890, + "src": "31308:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2916, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "31308:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "31308:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31308:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31294:91:8" + }, + { + "assignments": [ + 2928 + ], + "declarations": [ + { + "constant": false, + "id": 2928, + "name": "bpsFee", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31391:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2927, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31391:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2940, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 2935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31453:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "id": 2936, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "31464:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2933, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "31436:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31436:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31436:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2932, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "31426:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31426:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2929, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2890, + "src": "31405:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "31405:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "31405:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31405:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31391:91:8" + }, + { + "assignments": [ + 2942 + ], + "declarations": [ + { + "constant": false, + "id": 2942, + "name": "flatFee", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31488:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2941, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31488:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2954, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31551:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "id": 2950, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "31563:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2947, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "31534:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31534:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31534:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2946, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "31524:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31524:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2943, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2890, + "src": "31503:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2944, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "31503:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "31503:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31503:78:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31488:93:8" + }, + { + "assignments": [ + 2956 + ], + "declarations": [ + { + "constant": false, + "id": 2956, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31587:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2955, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31587:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2969, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2967, + "name": "flatFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2942, + "src": "31637:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 2963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31625:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2959, + "name": "bpsFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2928, + "src": "31612:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2957, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2894, + "src": "31601:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "31601:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31601:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2961, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31600:20:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "31600:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31600:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2965, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31599:33:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "31599:37:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31599:46:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31587:58:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2970, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2956, + "src": "31656:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 2971, + "name": "maxFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2900, + "src": "31663:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31656:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2976, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2956, + "src": "31709:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2977, + "name": "minFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2914, + "src": "31716:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31709:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2984, + "nodeType": "Block", + "src": "31758:26:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2982, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2956, + "src": "31773:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2898, + "id": 2983, + "nodeType": "Return", + "src": "31766:11:8" + } + ] + }, + "id": 2985, + "nodeType": "IfStatement", + "src": "31705:79:8", + "trueBody": { + "id": 2981, + "nodeType": "Block", + "src": "31724:28:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2979, + "name": "minFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2914, + "src": "31739:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2898, + "id": 2980, + "nodeType": "Return", + "src": "31732:13:8" + } + ] + } + }, + "id": 2986, + "nodeType": "IfStatement", + "src": "31652:132:8", + "trueBody": { + "id": 2975, + "nodeType": "Block", + "src": "31671:28:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2973, + "name": "maxFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2900, + "src": "31686:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2898, + "id": 2974, + "nodeType": "Return", + "src": "31679:13:8" + } + ] + } + } + ] + }, + "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the fee contract\n@param amount Transaction value\n@return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }", + "id": 2988, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2890, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31089:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2889, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "31089:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2892, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31108:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2891, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31108:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2894, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31133:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2893, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31133:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31088:57:8" + }, + "payable": false, + "returnParameters": { + "id": 2898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2897, + "name": "calculatedFees", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31169:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2896, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31169:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31168:21:8" + }, + "scope": 4606, + "src": "31066:722:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3017, + "nodeType": "Block", + "src": "32388:334:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3001, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "32423:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3002, + "name": "accountA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2992, + "src": "32429:8:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3000, + "name": "verifyAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3046, + "src": "32409:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32409:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", + "id": 3004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32446:92:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + }, + "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + } + ], + "id": 2999, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "32394:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32394:150:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3006, + "nodeType": "ExpressionStatement", + "src": "32394:150:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3009, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "32579:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3010, + "name": "accountB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2994, + "src": "32585:8:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3008, + "name": "verifyAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3046, + "src": "32565:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32565:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", + "id": 3012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32602:92:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + }, + "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + } + ], + "id": 3007, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "32550:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32550:150:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3014, + "nodeType": "ExpressionStatement", + "src": "32550:150:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32713:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2998, + "id": 3016, + "nodeType": "Return", + "src": "32706:11:8" + } + ] + }, + "documentation": "@notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param accountA Ethereum address of first account holder to verify\n@param accountB Ethereum address of second account holder to verify\n@return { \"verified\" : \"Returns true if both accounts are successfully verified\" }", + "id": 3018, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "verifyAccounts", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2990, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "32295:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2989, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "32295:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2992, + "name": "accountA", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "32314:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2991, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32314:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2994, + "name": "accountB", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "32332:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2993, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32332:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32294:55:8" + }, + "payable": false, + "returnParameters": { + "id": 2998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2997, + "name": "verified", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "32373:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2996, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "32373:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32372:15:8" + }, + "scope": 4606, + "src": "32271:451:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3045, + "nodeType": "Block", + "src": "33212:262:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3029, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3020, + "src": "33248:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3030, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3022, + "src": "33254:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3028, + "name": "getKYCApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2311, + "src": "33233:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33233:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e7420646f6573206e6f742068617665204b594320617070726f76616c2e", + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33270:44:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", + "typeString": "literal_string \"Error: Account does not have KYC approval.\"" + }, + "value": "Error: Account does not have KYC approval." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", + "typeString": "literal_string \"Error: Account does not have KYC approval.\"" + } + ], + "id": 3027, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "33218:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33218:102:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3034, + "nodeType": "ExpressionStatement", + "src": "33218:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3037, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3020, + "src": "33358:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3038, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3022, + "src": "33364:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3036, + "name": "getAccountStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2340, + "src": "33341:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33341:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e7420737461747573206973206066616c7365602e204163636f756e7420737461747573206d757374206265206074727565602e", + "id": 3040, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33380:66:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", + "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" + }, + "value": "Error: Account status is `false`. Account status must be `true`." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", + "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" + } + ], + "id": 3035, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "33326:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33326:126:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3042, + "nodeType": "ExpressionStatement", + "src": "33326:126:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3043, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33465:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3026, + "id": 3044, + "nodeType": "Return", + "src": "33458:11:8" + } + ] + }, + "documentation": "@notice Verified KYC and global status for a single account and return true or throw if account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder to verify\n@return { \"verified\" : \"Returns true if account is successfully verified\" }", + "id": 3046, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "verifyAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3023, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3020, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3046, + "src": "33138:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3019, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "33138:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3022, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3046, + "src": "33157:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3021, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33157:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33137:36:8" + }, + "payable": false, + "returnParameters": { + "id": 3026, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3025, + "name": "verified", + "nodeType": "VariableDeclaration", + "scope": 3046, + "src": "33197:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3024, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33197:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33196:15:8" + }, + "scope": 4606, + "src": "33115:359:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3139, + "nodeType": "Block", + "src": "34344:799:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3063, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3052, + "src": "34366:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34358:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34358:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34373:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "34358:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f6020616464726573732063616e6e6f74206265206e756c6c2e", + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34378:37:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", + "typeString": "literal_string \"Error: `to` address cannot be null.\"" + }, + "value": "Error: `to` address cannot be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", + "typeString": "literal_string \"Error: `to` address cannot be null.\"" + } + ], + "id": 3061, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34350:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34350:67:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3069, + "nodeType": "ExpressionStatement", + "src": "34350:67:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3071, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3054, + "src": "34431:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34440:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "34431:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060616d6f756e7460206d7573742062652067726561746572207468616e207a65726f", + "id": 3074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34443:43:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", + "typeString": "literal_string \"Error: `amount` must be greater than zero\"" + }, + "value": "Error: `amount` must be greater than zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", + "typeString": "literal_string \"Error: `amount` must be greater than zero\"" + } + ], + "id": 3070, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34423:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34423:64:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3076, + "nodeType": "ExpressionStatement", + "src": "34423:64:8" + }, + { + "assignments": [ + 3078 + ], + "declarations": [ + { + "constant": false, + "id": 3078, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34494:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34494:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3085, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3080, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34531:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3082, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "34545:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 3081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34537:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34537:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3079, + "name": "getFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2720, + "src": "34516:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34516:35:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34494:57:8" + }, + { + "assignments": [ + 3087 + ], + "declarations": [ + { + "constant": false, + "id": 3087, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34557:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3086, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "34557:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3093, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3089, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34583:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3090, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "34589:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3091, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3054, + "src": "34602:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3088, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2988, + "src": "34569:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 3092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34569:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34557:52:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3096, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34656:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3097, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "34662:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "34662:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3100, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34689:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3101, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3050, + "src": "34695:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3102, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3054, + "src": "34705:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3099, + "name": "getFxUSDAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4605, + "src": "34674:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 3103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34674:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3095, + "name": "setAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "34631:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34631:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d6f756e7420666f72206163636f756e742e", + "id": 3105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34721:51:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", + "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" + }, + "value": "Error: Unable to set spending amount for account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", + "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" + } + ], + "id": 3094, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34616:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34616:157:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3107, + "nodeType": "ExpressionStatement", + "src": "34616:157:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3110, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34809:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3111, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3050, + "src": "34815:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3112, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "34825:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "34825:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3114, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3052, + "src": "34837:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3115, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3054, + "src": "34841:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3116, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3056, + "src": "34849:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3109, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "34795:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34795:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 3118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34862:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 3108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34780:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34780:128:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3120, + "nodeType": "ExpressionStatement", + "src": "34780:128:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3123, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34986:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3124, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3050, + "src": "34992:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3125, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "35002:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "35002:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3127, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "35014:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3128, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3087, + "src": "35027:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3130, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "35043:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3131, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "35049:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3129, + "name": "getFeeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2626, + "src": "35033:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35033:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3122, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "34972:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34972:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35070:49:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 3121, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34957:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34957:163:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3136, + "nodeType": "ExpressionStatement", + "src": "34957:163:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35134:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3060, + "id": 3138, + "nodeType": "Return", + "src": "35127:11:8" + } + ] + }, + "documentation": "@notice Transfer an amount of currency token from msg.sender account to another specified account\n@dev This function is called by an interface that is accessible directly to the account holder\n@dev | This method has an `internal` view\n@dev | This method uses `forceTransfer()` low-level api\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3140, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3048, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34239:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3047, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "34239:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3050, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34258:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3049, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "34258:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3052, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34275:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34275:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3054, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34287:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3053, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "34287:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3056, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34300:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3055, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "34300:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34238:73:8" + }, + "payable": false, + "returnParameters": { + "id": 3060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3059, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34330:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3058, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "34330:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34329:14:8" + }, + "scope": 4606, + "src": "34221:922:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3235, + "nodeType": "Block", + "src": "36400:1060:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3159, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3148, + "src": "36429:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36421:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36421:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36436:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "36421:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", + "id": 3163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36447:39:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + }, + "value": "Error: `to` address must not be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + } + ], + "id": 3157, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "36406:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36406:86:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3165, + "nodeType": "ExpressionStatement", + "src": "36406:86:8" + }, + { + "assignments": [ + 3167 + ], + "declarations": [ + { + "constant": false, + "id": 3167, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36499:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36499:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3174, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3169, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36536:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "36550:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36542:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36542:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3168, + "name": "getFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2720, + "src": "36521:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36521:35:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36499:57:8" + }, + { + "assignments": [ + 3176 + ], + "declarations": [ + { + "constant": false, + "id": 3176, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36562:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3175, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "36562:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3182, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3178, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36588:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3179, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3167, + "src": "36594:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3180, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3150, + "src": "36607:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3177, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2988, + "src": "36574:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36574:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36562:52:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3185, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36754:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3186, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3146, + "src": "36760:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3188, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36781:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3189, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3144, + "src": "36787:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3190, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3150, + "src": "36797:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3187, + "name": "getFxUSDAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4605, + "src": "36766:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36766:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3184, + "name": "setAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "36729:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36729:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36813:47:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + }, + "value": "Error: Unable to set account spending amount." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + } + ], + "id": 3183, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "36714:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36714:152:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3195, + "nodeType": "ExpressionStatement", + "src": "36714:152:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3198, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36946:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3199, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3144, + "src": "36952:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3200, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3146, + "src": "36962:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3201, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3148, + "src": "36968:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3202, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3150, + "src": "36972:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3203, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "36980:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3197, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "36932:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36932:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36993:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 3196, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "36917:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36917:127:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3207, + "nodeType": "ExpressionStatement", + "src": "36917:127:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3210, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "37122:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3211, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3144, + "src": "37128:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3212, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3146, + "src": "37138:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3213, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3167, + "src": "37144:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3214, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "37157:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3216, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "37173:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3217, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3167, + "src": "37179:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3215, + "name": "getFeeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2626, + "src": "37163:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 3218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37163:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3209, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "37108:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37108:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37200:49:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 3208, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "37093:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37093:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3222, + "nodeType": "ExpressionStatement", + "src": "37093:162:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3225, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "37346:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3226, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3144, + "src": "37352:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3227, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3146, + "src": "37362:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3228, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3150, + "src": "37368:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3224, + "name": "updateAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3387, + "src": "37330:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256) returns (bool)" + } + }, + "id": 3229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37330:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e636520666f72207370656e6465722e", + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37383:48:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", + "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" + }, + "value": "Error: Unable to update allowance for spender." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", + "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" + } + ], + "id": 3223, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "37315:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37315:122:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3232, + "nodeType": "ExpressionStatement", + "src": "37315:122:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37451:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3156, + "id": 3234, + "nodeType": "Return", + "src": "37444:11:8" + } + ] + }, + "documentation": "@notice Transfer an amount of currency token from account to another specified account via an approved spender account\n@dev This function is called by an interface that is accessible directly to the account spender\n@dev | This method has an `internal` view\n@dev | Transactions will fail if the spending amount exceeds the daily limit\n@dev | This method uses `forceTransfer()` low-level api\n@dev | This method implements ERC20 transferFrom() method with approved spender behavior\n@dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3236, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3142, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36281:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3141, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "36281:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3144, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36300:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3143, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "36300:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3146, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36317:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3145, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36317:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3148, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36331:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3147, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36331:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3150, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36343:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3149, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "36343:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3152, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36356:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3151, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "36356:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36280:87:8" + }, + "payable": false, + "returnParameters": { + "id": 3156, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3155, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36386:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3154, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "36386:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36385:14:8" + }, + "scope": 4606, + "src": "36259:1201:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3334, + "nodeType": "Block", + "src": "38349:801:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3255, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3244, + "src": "38378:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "38370:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38370:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38385:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "38370:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", + "id": 3259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38396:39:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + }, + "value": "Error: `to` address must not be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + } + ], + "id": 3253, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "38355:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38355:86:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3261, + "nodeType": "ExpressionStatement", + "src": "38355:86:8" + }, + { + "assignments": [ + 3263 + ], + "declarations": [ + { + "constant": false, + "id": 3263, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38448:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3262, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38448:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3275, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38490:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3268, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3240, + "src": "38507:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3270, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38537:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3271, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3242, + "src": "38543:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3269, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "38517:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38517:31:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3265, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "38473:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "38473:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38473:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3264, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "38463:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38463:87:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38448:102:8" + }, + { + "assignments": [ + 3277 + ], + "declarations": [ + { + "constant": false, + "id": 3277, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38556:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3276, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38556:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3289, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38598:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3282, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3240, + "src": "38615:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3284, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38645:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3285, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3244, + "src": "38651:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3283, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "38625:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38625:29:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3279, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "38581:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "38581:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38581:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3278, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "38571:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38571:85:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38556:100:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3294, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3263, + "src": "38699:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3301, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "38736:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3298, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3263, + "src": "38726:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3295, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38705:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "38705:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "38705:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38705:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "38705:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38705:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3291, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38678:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3292, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "38678:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "38678:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38678:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38752:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "38663:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38663:202:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3306, + "nodeType": "ExpressionStatement", + "src": "38663:202:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3311, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3277, + "src": "38907:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3318, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "38944:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3315, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3277, + "src": "38934:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3312, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38913:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3313, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "38913:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "38913:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38913:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "38913:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38913:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3308, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38886:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "38886:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "38886:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38886:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38960:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3307, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "38871:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38871:202:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3323, + "nodeType": "ExpressionStatement", + "src": "38871:202:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3325, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3240, + "src": "39094:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3326, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3242, + "src": "39104:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3327, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3244, + "src": "39110:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3328, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "39114:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3329, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3248, + "src": "39122:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3324, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1670, + "src": "39085:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,address,uint256,bytes memory)" + } + }, + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39085:42:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3331, + "nodeType": "EmitStatement", + "src": "39080:47:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39141:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3252, + "id": 3333, + "nodeType": "Return", + "src": "39134:11:8" + } + ] + }, + "documentation": "@notice Low-level transfer method\n@dev | This method has an `internal` view\n@dev | This method does not include fees or approved allowances.\n@dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3335, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "forceTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3238, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38230:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3237, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "38230:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3240, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38249:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3239, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "38249:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3242, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38266:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3241, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3244, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38280:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38280:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3246, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38292:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "38292:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3248, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38305:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3247, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "38305:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38229:87:8" + }, + "payable": false, + "returnParameters": { + "id": 3252, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3251, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38335:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3250, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "38335:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38334:14:8" + }, + "scope": 4606, + "src": "38207:943:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3386, + "nodeType": "Block", + "src": "39827:376:8", + "statements": [ + { + "assignments": [ + 3349 + ], + "declarations": [ + { + "constant": false, + "id": 3349, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39833:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3348, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39833:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3366, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 3353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39873:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 3354, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3339, + "src": "39892:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3356, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3337, + "src": "39922:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3357, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3341, + "src": "39928:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3355, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "39902:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39902:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3360, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3337, + "src": "39958:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3361, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "39964:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "39964:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3359, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "39938:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39938:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "39856:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "39856:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39856:120:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3350, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "39846:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39846:131:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39833:144:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3371, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3349, + "src": "40019:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3378, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3343, + "src": "40052:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3375, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3349, + "src": "40044:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3372, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3337, + "src": "40023:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3373, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "40023:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "40023:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40023:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "40023:28:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40023:36:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3368, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3337, + "src": "39998:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3369, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "39998:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "39998:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39998:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40068:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3367, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "39983:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39983:198:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3383, + "nodeType": "ExpressionStatement", + "src": "39983:198:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40194:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3347, + "id": 3385, + "nodeType": "Return", + "src": "40187:11:8" + } + ] + }, + "documentation": "@notice Low-level method to update spender allowance for account\n@dev | This method is called inside the `transferFrom()` method\n@dev | msg.sender == spender address\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Value to reduce allowance by (i.e. the amount spent)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3387, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updateAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3337, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39729:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3336, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "39729:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3339, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39748:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3338, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "39748:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3341, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39765:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3340, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39765:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3343, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39782:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3342, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "39782:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39728:66:8" + }, + "payable": false, + "returnParameters": { + "id": 3347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3346, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39813:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3345, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "39813:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39812:14:8" + }, + "scope": 4606, + "src": "39704:499:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3507, + "nodeType": "Block", + "src": "40767:1110:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3399, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3391, + "src": "40781:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40792:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "40781:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20607370656e6465726020616464726573732063616e6e6f74206265206e756c6c2e", + "id": 3402, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40805:42:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", + "typeString": "literal_string \"Error: `spender` address cannot be null.\"" + }, + "value": "Error: `spender` address cannot be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", + "typeString": "literal_string \"Error: `spender` address cannot be null.\"" + } + ], + "id": 3398, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "40773:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40773:75:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3404, + "nodeType": "ExpressionStatement", + "src": "40773:75:8" + }, + { + "assignments": [ + 3406 + ], + "declarations": [ + { + "constant": false, + "id": 3406, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40855:22:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3405, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "40855:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3413, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3408, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "40895:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3410, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "40909:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "40901:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40901:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3407, + "name": "getTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2418, + "src": "40880:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40880:35:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40855:60:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3416, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "40959:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3417, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3406, + "src": "40965:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3419, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "40995:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3420, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3391, + "src": "41001:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3418, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "40975:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40975:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3415, + "name": "getTokenFrozenBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2848, + "src": "40937:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40937:73:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41014:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "40937:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205370656e646572206d757374206e6f74206861766520612066726f7a656e2062616c616e6365206469726563746c79", + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41023:56:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", + "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" + }, + "value": "Error: Spender must not have a frozen balance directly" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", + "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" + } + ], + "id": 3414, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "40922:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40922:158:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3427, + "nodeType": "ExpressionStatement", + "src": "40922:158:8" + }, + { + "assignments": [ + 3429 + ], + "declarations": [ + { + "constant": false, + "id": 3429, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "41087:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3428, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41087:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3446, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 3433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41129:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 3434, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3406, + "src": "41148:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3436, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41178:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3437, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "41184:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41184:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3435, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "41158:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41158:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3441, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41217:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3442, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3391, + "src": "41223:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3440, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "41197:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41197:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3431, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "41112:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41112:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41112:120:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3430, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "41102:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41102:131:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41087:146:8" + }, + { + "assignments": [ + 3448 + ], + "declarations": [ + { + "constant": false, + "id": 3448, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "41239:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3447, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41239:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3461, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41281:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3453, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3406, + "src": "41298:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3455, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41328:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3456, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "41334:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41334:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3454, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "41308:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41308:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3450, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "41264:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3451, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41264:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41264:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3449, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "41254:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41254:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41239:108:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3466, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3429, + "src": "41390:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3463, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41369:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3464, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "41369:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "41369:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41369:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41399:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "41369:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3470, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "41404:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41414:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "41404:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "41369:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283029206265666f72652073657474696e6720616e207570646174656420616c6c6f77616e636520666f72207370656e6465722e", + "id": 3474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41423:84:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", + "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" + }, + "value": "Error: Allowance must be zero (0) before setting an updated allowance for spender." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", + "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" + } + ], + "id": 3462, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "41354:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41354:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3476, + "nodeType": "ExpressionStatement", + "src": "41354:154:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3481, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3448, + "src": "41551:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3478, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41530:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "41530:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "41530:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41530:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3483, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "41560:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41530:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d73672e73656e64657220746f6b656e2062616c616e63652e", + "id": 3485, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41574:58:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", + "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" + }, + "value": "Error: Allowance cannot exceed msg.sender token balance." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", + "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" + } + ], + "id": 3477, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "41515:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41515:118:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3487, + "nodeType": "ExpressionStatement", + "src": "41515:118:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3492, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3429, + "src": "41676:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3493, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "41682:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3489, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41655:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3490, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "41655:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "41655:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41655:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41697:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3488, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "41640:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41640:165:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3497, + "nodeType": "ExpressionStatement", + "src": "41640:165:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3499, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "41826:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41826:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3501, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3391, + "src": "41838:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3502, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "41847:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3498, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1638, + "src": "41817:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41817:37:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3504, + "nodeType": "EmitStatement", + "src": "41812:42:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41868:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3397, + "id": 3506, + "nodeType": "Return", + "src": "41861:11:8" + } + ] + }, + "documentation": "@notice Low-level method to set the allowance for a spender\n@dev | This method is called inside the `approve()` ERC20 method\n@dev | msg.sender == account holder\n@param self Internal storage proxying TokenIOStorage contract\n@param spender Ethereum address of account spender\n@param amount Value to set for spender allowance\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3508, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approveAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3389, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40686:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3388, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "40686:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3391, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40705:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40705:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3393, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40722:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3392, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "40722:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "40685:49:8" + }, + "payable": false, + "returnParameters": { + "id": 3397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3396, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40753:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3395, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "40753:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "40752:14:8" + }, + "scope": 4606, + "src": "40660:1217:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3618, + "nodeType": "Block", + "src": "42704:943:8", + "statements": [ + { + "assignments": [ + 3524 + ], + "declarations": [ + { + "constant": false, + "id": 3524, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42710:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3523, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42710:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3536, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3528, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42752:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3529, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "42769:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3531, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "42799:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3532, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3514, + "src": "42805:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3530, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "42779:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42779:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3526, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "42735:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42735:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42735:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3525, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "42725:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42725:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42710:105:8" + }, + { + "assignments": [ + 3538 + ], + "declarations": [ + { + "constant": false, + "id": 3538, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42821:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3537, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42821:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3547, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e697373756564", + "id": 3542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42863:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + "value": "token.issued" + }, + { + "argumentTypes": null, + "id": 3543, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "42879:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3544, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3518, + "src": "42889:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3540, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "42846:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42846:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42846:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3539, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "42836:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42836:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42821:80:8" + }, + { + "assignments": [ + 3549 + ], + "declarations": [ + { + "constant": false, + "id": 3549, + "name": "id_c", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42907:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3548, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42907:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3557, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 3553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42949:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 3554, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "42965:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3551, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "42932:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42932:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42932:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3550, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "42922:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42922:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42907:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3562, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3524, + "src": "43012:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3569, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3516, + "src": "43049:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3566, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3524, + "src": "43039:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3563, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43018:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3564, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43018:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "43018:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43018:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43018:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43018:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3559, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "42991:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3560, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "42991:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "42991:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42991:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43065:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3558, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "42983:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42983:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3574, + "nodeType": "ExpressionStatement", + "src": "42983:190:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3579, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3538, + "src": "43208:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3586, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3516, + "src": "43245:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3583, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3538, + "src": "43235:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3580, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43214:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3581, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43214:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "43214:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43214:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43214:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43214:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3576, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43187:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3577, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43187:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "43187:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43187:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43261:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3575, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "43179:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43179:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3591, + "nodeType": "ExpressionStatement", + "src": "43179:190:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3596, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3549, + "src": "43404:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3603, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3516, + "src": "43441:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3600, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3549, + "src": "43431:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3597, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43410:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3598, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43410:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "43410:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43410:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43410:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43410:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3593, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43383:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43383:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "43383:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43383:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43457:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3592, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "43375:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43375:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3608, + "nodeType": "ExpressionStatement", + "src": "43375:190:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3610, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "43585:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3611, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3514, + "src": "43595:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3612, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3516, + "src": "43604:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3613, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3518, + "src": "43612:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3609, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1648, + "src": "43577:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,uint256,string memory)" + } + }, + "id": 3614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43577:46:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3615, + "nodeType": "EmitStatement", + "src": "43572:51:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43637:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3522, + "id": 3617, + "nodeType": "Return", + "src": "43630:11:8" + } + ] + }, + "documentation": "@notice Deposit an amount of currency into the Ethereum account holder\n@dev | The total supply of the token increases only when new funds are deposited 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to deposit for account\n@param issuerFirm Name of the issuing firm authorizing the deposit\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3619, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3510, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42587:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3509, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "42587:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3512, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42606:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3511, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "42606:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3514, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42623:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "42623:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3516, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42640:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3515, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "42640:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3518, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42653:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3517, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "42653:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "42586:85:8" + }, + "payable": false, + "returnParameters": { + "id": 3522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3521, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42690:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3520, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42690:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "42689:14:8" + }, + "scope": 4606, + "src": "42570:1077:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3729, + "nodeType": "Block", + "src": "44478:1002:8", + "statements": [ + { + "assignments": [ + 3635 + ], + "declarations": [ + { + "constant": false, + "id": 3635, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44484:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44484:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3647, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44526:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3640, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "44543:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3642, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "44573:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3643, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3625, + "src": "44579:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3641, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "44553:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44553:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3637, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "44509:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44509:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44509:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3636, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "44499:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44499:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44484:105:8" + }, + { + "assignments": [ + 3649 + ], + "declarations": [ + { + "constant": false, + "id": 3649, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44595:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3648, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44595:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3658, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e697373756564", + "id": 3653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44637:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + "value": "token.issued" + }, + { + "argumentTypes": null, + "id": 3654, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "44653:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3655, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3629, + "src": "44663:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3651, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "44620:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44620:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44620:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3650, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "44610:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44610:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44595:80:8" + }, + { + "assignments": [ + 3660 + ], + "declarations": [ + { + "constant": false, + "id": 3660, + "name": "id_c", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44719:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3659, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44719:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3668, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 3664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44761:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 3665, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "44777:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3662, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "44744:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44744:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44744:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3661, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "44734:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44734:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44719:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3673, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3635, + "src": "44830:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3680, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3627, + "src": "44867:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3677, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3635, + "src": "44857:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3674, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "44836:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3675, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "44836:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "44836:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44836:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "44836:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44836:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3670, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "44809:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3671, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "44809:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "44809:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44809:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44883:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3669, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "44794:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44794:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3685, + "nodeType": "ExpressionStatement", + "src": "44794:197:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3690, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3649, + "src": "45033:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3697, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3627, + "src": "45070:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3694, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3649, + "src": "45060:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3691, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "45039:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3692, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "45039:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "45039:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45039:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "45039:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45039:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3687, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "45012:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "45012:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "45012:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45012:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3700, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45086:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3686, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "44997:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44997:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3702, + "nodeType": "ExpressionStatement", + "src": "44997:197:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3707, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3660, + "src": "45236:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3714, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3627, + "src": "45273:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3711, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3660, + "src": "45263:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3708, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "45242:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3709, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "45242:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "45242:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45242:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "45242:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45242:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3704, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "45215:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3705, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "45215:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "45215:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45215:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45289:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3703, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "45200:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45200:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3719, + "nodeType": "ExpressionStatement", + "src": "45200:197:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3721, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "45418:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3722, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3625, + "src": "45428:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3723, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3627, + "src": "45437:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3724, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3629, + "src": "45445:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3720, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1658, + "src": "45409:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,uint256,string memory)" + } + }, + "id": 3725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45409:47:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3726, + "nodeType": "EmitStatement", + "src": "45404:52:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45470:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3633, + "id": 3728, + "nodeType": "Return", + "src": "45463:11:8" + } + ] + }, + "documentation": "@notice Withdraw an amount of currency from the Ethereum account holder\n@dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to withdraw for account\n@param issuerFirm Name of the issuing firm authorizing the withdraw\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3730, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3630, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3621, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44361:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3620, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "44361:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3623, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44380:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3622, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "44380:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3625, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44397:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44397:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3627, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44414:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3626, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "44414:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3629, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44427:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3628, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "44427:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44360:85:8" + }, + "payable": false, + "returnParameters": { + "id": 3633, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3632, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44464:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3631, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44464:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44463:14:8" + }, + "scope": 4606, + "src": "44343:1137:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3763, + "nodeType": "Block", + "src": "46213:275:8", + "statements": [ + { + "assignments": [ + 3742 + ], + "declarations": [ + { + "constant": false, + "id": 3742, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46219:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3741, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "46219:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3750, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e6669726d", + "id": 3746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46259:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + "value": "registered.firm" + }, + { + "argumentTypes": null, + "id": 3747, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3734, + "src": "46278:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3744, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "46242:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "46242:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46242:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3743, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "46232:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46232:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "46219:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3755, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3742, + "src": "46332:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3756, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3736, + "src": "46336:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3752, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3732, + "src": "46311:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3753, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "46311:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "46311:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 3757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46311:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46353:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3751, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "46296:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46296:170:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3760, + "nodeType": "ExpressionStatement", + "src": "46296:170:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46479:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3740, + "id": 3762, + "nodeType": "Return", + "src": "46472:11:8" + } + ] + }, + "documentation": "@notice Method for setting a registered issuer firm\n@dev | Only Token, Inc. and other authorized institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered\n@param approved Approval status to set for the firm (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3764, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3737, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3732, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46128:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3731, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "46128:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3734, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46147:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3733, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "46147:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3736, + "name": "approved", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46166:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3735, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "46166:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "46127:53:8" + }, + "payable": false, + "returnParameters": { + "id": 3740, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3739, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46199:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3738, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "46199:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "46198:14:8" + }, + "scope": 4606, + "src": "46101:387:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3828, + "nodeType": "Block", + "src": "47321:679:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3779, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3766, + "src": "47359:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3780, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3768, + "src": "47365:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3778, + "name": "isRegisteredFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3884, + "src": "47342:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" + } + }, + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47342:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20606973737565724669726d60206d75737420626520726567697374657265642e", + "id": 3782, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47384:41:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", + "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" + }, + "value": "Error: `issuerFirm` must be registered." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", + "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" + } + ], + "id": 3777, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "47327:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47327:99:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3784, + "nodeType": "ExpressionStatement", + "src": "47327:99:8" + }, + { + "assignments": [ + 3786 + ], + "declarations": [ + { + "constant": false, + "id": 3786, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47433:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3785, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47433:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3795, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47475:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "id": 3791, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3768, + "src": "47499:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3792, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3770, + "src": "47511:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3788, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "47458:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "47458:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47458:70:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3787, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "47448:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47448:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "47433:96:8" + }, + { + "assignments": [ + 3797 + ], + "declarations": [ + { + "constant": false, + "id": 3797, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47535:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3796, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47535:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3805, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f726974792e6669726d", + "id": 3801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47577:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + "value": "registered.authority.firm" + }, + { + "argumentTypes": null, + "id": 3802, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3770, + "src": "47606:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3799, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "47560:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "47560:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47560:63:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3798, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "47550:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47550:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "47535:89:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3810, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3786, + "src": "47667:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3811, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3772, + "src": "47673:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3807, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3766, + "src": "47646:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3808, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "47646:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "47646:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 3812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47646:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47690:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3806, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "47631:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47631:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3815, + "nodeType": "ExpressionStatement", + "src": "47631:167:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3820, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3797, + "src": "47843:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3821, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3768, + "src": "47849:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3817, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3766, + "src": "47820:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3818, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "47820:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "47820:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 3822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47820:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47868:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3816, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "47805:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47805:171:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3825, + "nodeType": "ExpressionStatement", + "src": "47805:171:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47991:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3776, + "id": 3827, + "nodeType": "Return", + "src": "47984:11:8" + } + ] + }, + "documentation": "@notice Method for setting a registered issuer firm authority\n@dev | Only Token, Inc. and other approved institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | Authority can only be set for a registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered to authority\n@param authorityAddress Ethereum address of the firm authority to be approved\n@param approved Approval status to set for the firm authority (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3829, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3773, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3766, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47210:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3765, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "47210:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3768, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47229:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3767, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "47229:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3770, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47248:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3769, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "47248:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3772, + "name": "approved", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47274:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3771, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "47274:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47209:79:8" + }, + "payable": false, + "returnParameters": { + "id": 3776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3775, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47307:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3774, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "47307:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47306:14:8" + }, + "scope": 4606, + "src": "47178:822:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3857, + "nodeType": "Block", + "src": "48488:164:8", + "statements": [ + { + "assignments": [ + 3839 + ], + "declarations": [ + { + "constant": false, + "id": 3839, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "48494:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3838, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "48494:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3850, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f726974792e6669726d", + "id": 3843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48534:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + "value": "registered.authority.firm" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3845, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3831, + "src": "48583:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3846, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3833, + "src": "48589:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3844, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "48563:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48563:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3841, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "48517:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "48517:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48517:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3840, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "48507:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48507:101:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "48494:114:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3854, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3839, + "src": "48644:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3851, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3831, + "src": "48621:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "48621:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "48621:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 3855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48621:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3837, + "id": 3856, + "nodeType": "Return", + "src": "48614:33:8" + } + ] + }, + "documentation": "@notice Get the issuer firm registered to the authority Ethereum address\n@dev | Only one firm can be registered per authority\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"issuerFirm\" : \"Name of the firm registered to authority\" }", + "id": 3858, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFirmFromAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3834, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3831, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "48401:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3830, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "48401:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3833, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "48420:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3832, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48420:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48400:45:8" + }, + "payable": false, + "returnParameters": { + "id": 3837, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3836, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "48469:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3835, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "48469:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48468:19:8" + }, + "scope": 4606, + "src": "48371:281:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3883, + "nodeType": "Block", + "src": "49050:119:8", + "statements": [ + { + "assignments": [ + 3868 + ], + "declarations": [ + { + "constant": false, + "id": 3868, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3884, + "src": "49056:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3867, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "49056:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3876, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e6669726d", + "id": 3872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49096:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + "value": "registered.firm" + }, + { + "argumentTypes": null, + "id": 3873, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3862, + "src": "49115:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3870, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "49079:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3871, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "49079:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49079:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3869, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "49069:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49069:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "49056:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3880, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3868, + "src": "49161:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3877, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3860, + "src": "49140:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "49140:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "49140:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49140:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3866, + "id": 3882, + "nodeType": "Return", + "src": "49133:31:8" + } + ] + }, + "documentation": "@notice Return the boolean (true/false) registration status for an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@return { \"registered\" : \"Return if the issuer firm has been registered\" }", + "id": 3884, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3860, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3884, + "src": "48972:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3859, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "48972:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3862, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3884, + "src": "48991:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3861, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "48991:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48971:38:8" + }, + "payable": false, + "returnParameters": { + "id": 3866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3865, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3884, + "src": "49033:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3864, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "49033:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49032:17:8" + }, + "scope": 4606, + "src": "48946:223:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3915, + "nodeType": "Block", + "src": "49701:169:8", + "statements": [ + { + "assignments": [ + 3896 + ], + "declarations": [ + { + "constant": false, + "id": 3896, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49707:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3895, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "49707:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3908, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49747:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "id": 3901, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3888, + "src": "49771:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3903, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3886, + "src": "49803:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3904, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "49809:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3902, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "49783:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49783:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3898, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "49730:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "49730:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49730:97:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3897, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "49720:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49720:108:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "49707:121:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3912, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3896, + "src": "49862:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3909, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3886, + "src": "49841:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3910, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "49841:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "49841:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49841:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3894, + "id": 3914, + "nodeType": "Return", + "src": "49834:31:8" + } + ] + }, + "documentation": "@notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }", + "id": 3916, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredToFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3891, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3886, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49597:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3885, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "49597:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3888, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49616:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3887, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "49616:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3890, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49635:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3889, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49635:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49596:64:8" + }, + "payable": false, + "returnParameters": { + "id": 3894, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3893, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49684:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3892, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "49684:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49683:17:8" + }, + "scope": 4606, + "src": "49569:301:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3951, + "nodeType": "Block", + "src": "50346:230:8", + "statements": [ + { + "assignments": [ + 3926 + ], + "declarations": [ + { + "constant": false, + "id": 3926, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3952, + "src": "50352:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3925, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "50352:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3944, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50392:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3932, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "50437:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3934, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "50463:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3935, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3920, + "src": "50469:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3933, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "50443:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50443:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3931, + "name": "getFirmFromAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3858, + "src": "50416:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 3937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50416:71:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3939, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "50509:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3940, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3920, + "src": "50515:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3938, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "50489:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50489:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3928, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "50375:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "50375:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50375:158:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3927, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "50365:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50365:169:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "50352:182:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3948, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3926, + "src": "50568:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3945, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "50547:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3946, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "50547:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "50547:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50547:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3924, + "id": 3950, + "nodeType": "Return", + "src": "50540:31:8" + } + ] + }, + "documentation": "@notice Return if an authority address is registered\n@dev | This also checks the status of the registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered\" }", + "id": 3952, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3918, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3952, + "src": "50261:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3917, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "50261:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3920, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3952, + "src": "50280:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3919, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "50280:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50260:45:8" + }, + "payable": false, + "returnParameters": { + "id": 3924, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3923, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3952, + "src": "50329:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3922, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "50329:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50328:17:8" + }, + "scope": 4606, + "src": "50230:346:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3977, + "nodeType": "Block", + "src": "51021:109:8", + "statements": [ + { + "assignments": [ + 3962 + ], + "declarations": [ + { + "constant": false, + "id": 3962, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "51027:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3961, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51027:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3970, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74782e737461747573", + "id": 3966, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51067:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + "value": "tx.status" + }, + { + "argumentTypes": null, + "id": 3967, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3956, + "src": "51080:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3964, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "51050:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "51050:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51050:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3963, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "51040:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51040:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51027:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3974, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3962, + "src": "51122:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3971, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3954, + "src": "51101:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3972, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "51101:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "51101:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51101:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3960, + "id": 3976, + "nodeType": "Return", + "src": "51094:31:8" + } + ] + }, + "documentation": "@notice Return boolean transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}", + "id": 3978, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTxStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3957, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3954, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "50948:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3953, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "50948:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3956, + "name": "txHash", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "50967:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3955, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "50967:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50947:35:8" + }, + "payable": false, + "returnParameters": { + "id": 3960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3959, + "name": "txStatus", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "51006:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3958, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "51006:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51005:15:8" + }, + "scope": 4606, + "src": "50927:203:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4018, + "nodeType": "Block", + "src": "51539:486:8", + "statements": [ + { + "assignments": [ + 3988 + ], + "declarations": [ + { + "constant": false, + "id": 3988, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "51545:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3987, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51545:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3996, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74782e737461747573", + "id": 3992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51585:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + "value": "tx.status" + }, + { + "argumentTypes": null, + "id": 3993, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3982, + "src": "51598:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3990, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "51568:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3991, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "51568:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51568:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3989, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "51558:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51558:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51545:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "51675:26:8", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3999, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3980, + "src": "51688:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4000, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3982, + "src": "51694:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3998, + "name": "getTxStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3978, + "src": "51676:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) view returns (bool)" + } + }, + "id": 4001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51676:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e20737461747573206d7573742062652066616c7365206265666f72652073657474696e6720746865207472616e73616374696f6e207374617475732e", + "id": 4003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51709:80:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", + "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" + }, + "value": "Error: Transaction status must be false before setting the transaction status." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", + "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" + } + ], + "id": 3997, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "51667:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51667:123:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4005, + "nodeType": "ExpressionStatement", + "src": "51667:123:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4010, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3988, + "src": "51877:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51881:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4007, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3980, + "src": "51856:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "51856:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "51856:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 4012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51856:30:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 4013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51894:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 4006, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "51848:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51848:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4015, + "nodeType": "ExpressionStatement", + "src": "51848:154:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4016, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52016:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3986, + "id": 4017, + "nodeType": "Return", + "src": "52009:11:8" + } + ] + }, + "documentation": "@notice Set transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 4019, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTxStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3983, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3980, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "51472:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3979, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "51472:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3982, + "name": "txHash", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "51491:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3981, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51491:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51471:35:8" + }, + "payable": false, + "returnParameters": { + "id": 3986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3985, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "51525:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3984, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "51525:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51524:14:8" + }, + "scope": 4606, + "src": "51451:574:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4132, + "nodeType": "Block", + "src": "53345:1436:8", + "statements": [ + { + "assignments": [ + 4045 + ], + "declarations": [ + { + "constant": false, + "id": 4045, + "name": "fxTxHash", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53352:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4044, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53352:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4057, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4049, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "53398:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4050, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4025, + "src": "53409:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4051, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4027, + "src": "53418:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4052, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4029, + "src": "53427:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4053, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4031, + "src": "53435:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4054, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "53443:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4047, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "53381:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "53381:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53381:73:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4046, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "53371:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53371:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "53352:103:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4060, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4021, + "src": "53628:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4061, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "53634:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "53634:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4063, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "53646:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4059, + "name": "verifyAccounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3018, + "src": "53613:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) view returns (bool)" + } + }, + "id": 4064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53613:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204f6e6c79207665726966696564206163636f756e74732063616e20706572666f726d2063757272656e63792073776170732e", + "id": 4065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53664:59:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", + "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" + }, + "value": "Error: Only verified accounts can perform currency swaps." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", + "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" + } + ], + "id": 4058, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "53598:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53598:126:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4067, + "nodeType": "ExpressionStatement", + "src": "53598:126:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4070, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4021, + "src": "53848:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4071, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "53854:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4069, + "name": "setTxStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4019, + "src": "53836:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) returns (bool)" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53836:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f20736574207472616e73616374696f6e2073746174757320746f2066756c66696c6c65642e", + "id": 4073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53871:55:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", + "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" + }, + "value": "Error: Failed to set transaction status to fulfilled." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", + "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" + } + ], + "id": 4068, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "53821:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53821:106:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4075, + "nodeType": "ExpressionStatement", + "src": "53821:106:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4077, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "53992:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4078, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "54006:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53992:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e20686173206578706972656421", + "id": 4080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54011:33:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", + "typeString": "literal_string \"Error: Transaction has expired!\"" + }, + "value": "Error: Transaction has expired!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", + "typeString": "literal_string \"Error: Transaction has expired!\"" + } + ], + "id": 4076, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "53984:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53984:61:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4082, + "nodeType": "ExpressionStatement", + "src": "53984:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4085, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "54205:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4086, + "name": "sigV", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "54215:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 4087, + "name": "sigR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "54221:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4088, + "name": "sigS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "54227:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4084, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5232, + "src": "54195:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 4089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54195:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 4090, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "54236:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "54195:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204164647265737320646572697665642066726f6d207472616e73616374696f6e207369676e617475726520646f6573206e6f74206d6174636820746865207265717565737465722061646472657373", + "id": 4092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54253:88:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", + "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" + }, + "value": "Error: Address derived from transaction signature does not match the requester address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", + "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" + } + ], + "id": 4083, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "54180:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54180:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4094, + "nodeType": "ExpressionStatement", + "src": "54180:162:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4097, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4021, + "src": "54436:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4098, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4025, + "src": "54442:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4099, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "54451:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "54451:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4101, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "54463:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4102, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4029, + "src": "54474:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 4103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54482:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "id": 4096, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "54422:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54422:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 4105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54496:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 4095, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "54407:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54407:135:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4107, + "nodeType": "ExpressionStatement", + "src": "54407:135:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4110, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4021, + "src": "54578:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4111, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4027, + "src": "54584:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4112, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "54593:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4113, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "54604:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "54604:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4115, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4031, + "src": "54616:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54624:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "id": 4109, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "54564:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54564:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 4118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54638:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 4108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "54549:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54549:135:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4120, + "nodeType": "ExpressionStatement", + "src": "54549:135:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4122, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4025, + "src": "54703:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4123, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4027, + "src": "54712:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4124, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4029, + "src": "54721:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4125, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4031, + "src": "54729:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4126, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "54737:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4127, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "54749:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4121, + "name": "FxSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1700, + "src": "54696:6:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (string memory,string memory,uint256,uint256,uint256,bytes32)" + } + }, + "id": 4128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54696:62:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4129, + "nodeType": "EmitStatement", + "src": "54691:67:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54772:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4043, + "id": 4131, + "nodeType": "Return", + "src": "54765:11:8" + } + ] + }, + "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev | This method can be called directly between peers\n@dev | This method does not take transaction fees from the swap\n@param self Internal storage proxying TokenIOStorage contract\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4133, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "execSwap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4021, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53121:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4020, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "53121:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4023, + "name": "requester", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53144:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4022, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "53144:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4025, + "name": "symbolA", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53167:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4024, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "53167:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4027, + "name": "symbolB", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53187:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4026, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "53187:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4029, + "name": "valueA", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53207:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4028, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53207:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4031, + "name": "valueB", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53224:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4030, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53224:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4033, + "name": "sigV", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53241:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4032, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "53241:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4035, + "name": "sigR", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53257:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4034, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53257:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4037, + "name": "sigS", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53275:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4036, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53275:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4039, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53293:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4038, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53293:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "53115:197:8" + }, + "payable": false, + "returnParameters": { + "id": 4043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4042, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53331:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4041, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "53331:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "53330:14:8" + }, + "scope": 4606, + "src": "53098:1683:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4171, + "nodeType": "Block", + "src": "55334:350:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4143, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4137, + "src": "55348:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 4144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55367:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "55348:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2063616e6e6f74206465707265636174652061206e756c6c20616464726573732e", + "id": 4146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55380:41:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", + "typeString": "literal_string \"Error: cannot deprecate a null address.\"" + }, + "value": "Error: cannot deprecate a null address." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", + "typeString": "literal_string \"Error: cannot deprecate a null address.\"" + } + ], + "id": 4142, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "55340:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55340:82:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4148, + "nodeType": "ExpressionStatement", + "src": "55340:82:8" + }, + { + "assignments": [ + 4150 + ], + "declarations": [ + { + "constant": false, + "id": 4150, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4172, + "src": "55429:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4149, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "55429:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4158, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6465706372656361746564", + "id": 4154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55469:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + "value": "depcrecated" + }, + { + "argumentTypes": null, + "id": 4155, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4137, + "src": "55484:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4152, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "55452:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "55452:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55452:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4151, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "55442:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55442:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "55429:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4163, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4150, + "src": "55537:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4164, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55541:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4160, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "55516:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4161, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "55516:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "55516:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 4165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55516:30:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55554:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "55508:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55508:153:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4168, + "nodeType": "ExpressionStatement", + "src": "55508:153:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55675:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4141, + "id": 4170, + "nodeType": "Return", + "src": "55668:11:8" + } + ] + }, + "documentation": "@notice Deprecate a contract interface\n@dev | This is a low-level method to deprecate a contract interface.\n@dev | This is useful if the interface needs to be updated or becomes out of date\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4172, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setDeprecatedContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4135, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4172, + "src": "55258:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4134, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "55258:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4137, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4172, + "src": "55277:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "55277:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "55257:44:8" + }, + "payable": false, + "returnParameters": { + "id": 4141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4140, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4172, + "src": "55320:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4139, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "55320:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "55319:14:8" + }, + "scope": 4606, + "src": "55227:457:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4197, + "nodeType": "Block", + "src": "56098:120:8", + "statements": [ + { + "assignments": [ + 4182 + ], + "declarations": [ + { + "constant": false, + "id": 4182, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4198, + "src": "56104:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4181, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "56104:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4190, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6465706372656361746564", + "id": 4186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56144:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + "value": "depcrecated" + }, + { + "argumentTypes": null, + "id": 4187, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4176, + "src": "56159:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "56127:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "56127:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56127:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4183, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "56117:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56117:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56104:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4194, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4182, + "src": "56210:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4191, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4174, + "src": "56189:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4192, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "56189:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "56189:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 4195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56189:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4180, + "id": 4196, + "nodeType": "Return", + "src": "56182:31:8" + } + ] + }, + "documentation": "@notice Return the deprecation status of a contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}", + "id": 4198, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isContractDeprecated", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4177, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4174, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4198, + "src": "56018:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4173, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "56018:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4176, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4198, + "src": "56037:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "56037:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56017:44:8" + }, + "payable": false, + "returnParameters": { + "id": 4180, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4179, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 4198, + "src": "56085:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "56085:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56084:13:8" + }, + "scope": 4606, + "src": "55988:230:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4231, + "nodeType": "Block", + "src": "56741:264:8", + "statements": [ + { + "assignments": [ + 4210 + ], + "declarations": [ + { + "constant": false, + "id": 4210, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56747:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4209, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "56747:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4218, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6c696d69742e7370656e64696e672e706572696f64", + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56787:23:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + "value": "limit.spending.period" + }, + { + "argumentTypes": null, + "id": 4215, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "56812:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4212, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "56770:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "56770:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56770:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4211, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "56760:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56760:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56747:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4223, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4210, + "src": "56856:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4224, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4204, + "src": "56860:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4220, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4200, + "src": "56835:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4221, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "56835:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "56835:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56835:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56875:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4219, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "56827:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56827:155:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4228, + "nodeType": "ExpressionStatement", + "src": "56827:155:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56996:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4208, + "id": 4230, + "nodeType": "Return", + "src": "56989:11:8" + } + ] + }, + "documentation": "@notice Set the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param period Unix timestamp of the spending period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4232, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4200, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56660:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4199, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "56660:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4202, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56679:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4201, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "56679:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4204, + "name": "period", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56696:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4203, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "56696:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56659:49:8" + }, + "payable": false, + "returnParameters": { + "id": 4208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4207, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56727:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4206, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "56727:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56726:14:8" + }, + "scope": 4606, + "src": "56626:379:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4257, + "nodeType": "Block", + "src": "57590:122:8", + "statements": [ + { + "assignments": [ + 4242 + ], + "declarations": [ + { + "constant": false, + "id": 4242, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4258, + "src": "57596:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4241, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "57596:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4250, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6c696d69742e7370656e64696e672e706572696f64", + "id": 4246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "57636:23:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + "value": "limit.spending.period" + }, + { + "argumentTypes": null, + "id": 4247, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4236, + "src": "57661:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4244, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "57619:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "57619:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57619:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4243, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "57609:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57609:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57596:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4254, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4242, + "src": "57704:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4251, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4234, + "src": "57683:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4252, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "57683:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "57683:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57683:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4240, + "id": 4256, + "nodeType": "Return", + "src": "57676:31:8" + } + ] + }, + "documentation": "@notice Get the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@dev | If the current spending period has expired, it will be set upon next `transfer()`\nor `transferFrom()` request\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"period\" : \"Returns Unix timestamp of the current spending period\"}", + "id": 4258, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4234, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4258, + "src": "57518:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4233, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "57518:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4236, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4258, + "src": "57537:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "57537:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57517:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4239, + "name": "period", + "nodeType": "VariableDeclaration", + "scope": 4258, + "src": "57577:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4238, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "57577:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57576:13:8" + }, + "scope": 4606, + "src": "57484:228:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4291, + "nodeType": "Block", + "src": "58198:264:8", + "statements": [ + { + "assignments": [ + 4270 + ], + "declarations": [ + { + "constant": false, + "id": 4270, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58204:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4269, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "58204:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4278, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", + "id": 4274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58244:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + "value": "account.spending.limit" + }, + { + "argumentTypes": null, + "id": 4275, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4262, + "src": "58270:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4272, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "58227:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "58227:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58227:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4271, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "58217:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58217:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "58204:75:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4283, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4270, + "src": "58314:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4284, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4264, + "src": "58318:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4280, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4260, + "src": "58293:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4281, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "58293:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "58293:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58293:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58332:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4279, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "58285:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58285:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4288, + "nodeType": "ExpressionStatement", + "src": "58285:154:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58453:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4268, + "id": 4290, + "nodeType": "Return", + "src": "58446:11:8" + } + ] + }, + "documentation": "@notice Set the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param limit Spending limit amount\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4292, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4260, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58118:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4259, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "58118:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4262, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58137:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4261, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "58137:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4264, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58154:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4263, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "58154:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58117:48:8" + }, + "payable": false, + "returnParameters": { + "id": 4268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4267, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58184:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4266, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "58184:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58183:14:8" + }, + "scope": 4606, + "src": "58085:377:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4317, + "nodeType": "Block", + "src": "58887:123:8", + "statements": [ + { + "assignments": [ + 4302 + ], + "declarations": [ + { + "constant": false, + "id": 4302, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "58893:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4301, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "58893:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4310, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", + "id": 4306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58933:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + "value": "account.spending.limit" + }, + { + "argumentTypes": null, + "id": 4307, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4296, + "src": "58959:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4304, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "58916:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "58916:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58916:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4303, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "58906:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58906:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "58893:75:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4314, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4302, + "src": "59002:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4311, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294, + "src": "58981:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "58981:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "58981:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58981:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4300, + "id": 4316, + "nodeType": "Return", + "src": "58974:31:8" + } + ] + }, + "documentation": "@notice Get the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"limit\" : \"Returns the account spending limit amount\"}", + "id": 4318, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4294, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "58816:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4293, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "58816:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4296, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "58835:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "58835:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58815:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4299, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "58875:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4298, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "58875:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58874:12:8" + }, + "scope": 4606, + "src": "58783:227:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4383, + "nodeType": "Block", + "src": "59710:887:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4331, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "59844:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4332, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "59850:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4330, + "name": "updateAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4441, + "src": "59816:27:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 4333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59816:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59866:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4329, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "59808:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59808:109:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4336, + "nodeType": "ExpressionStatement", + "src": "59808:109:8" + }, + { + "assignments": [ + 4338 + ], + "declarations": [ + { + "constant": false, + "id": 4338, + "name": "updatedAmount", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59924:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4337, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "59924:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4346, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4344, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4324, + "src": "59989:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4340, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "59970:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4341, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "59976:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4339, + "name": "getAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4471, + "src": "59945:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59945:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "59945:43:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59945:51:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "59924:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4349, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "60126:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4350, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "60132:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4348, + "name": "getAccountSpendingLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4318, + "src": "60102:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60102:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4352, + "name": "updatedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60144:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60102:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e742063616e6e6f742065786365656420697473206461696c79207370656e64206c696d69742e", + "id": 4354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60165:53:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", + "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" + }, + "value": "Error: Account cannot exceed its daily spend limit." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", + "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" + } + ], + "id": 4347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "60087:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60087:132:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4356, + "nodeType": "ExpressionStatement", + "src": "60087:132:8" + }, + { + "assignments": [ + 4358 + ], + "declarations": [ + { + "constant": false, + "id": 4358, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "60289:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4357, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "60289:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4370, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", + "id": 4362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60329:25:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + "value": "account.spending.amount" + }, + { + "argumentTypes": null, + "id": 4363, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "60356:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4365, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "60390:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4366, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "60396:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4364, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4258, + "src": "60365:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60365:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4360, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "60312:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "60312:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60312:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4359, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "60302:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60302:104:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "60289:117:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4375, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4358, + "src": "60441:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4376, + "name": "updatedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60445:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4372, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "60420:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4373, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "60420:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "60420:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60420:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60467:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4371, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "60412:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60412:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4380, + "nodeType": "ExpressionStatement", + "src": "60412:162:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60588:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4328, + "id": 4382, + "nodeType": "Return", + "src": "60581:11:8" + } + ] + }, + "documentation": "@notice Set the account spending amount for the daily period\n@dev | Each account has it's own daily spending limit\n@dev | This transaction will throw if the new spending amount is greater than the limit\n@dev | This method is called in the `transfer()` and `transferFrom()` methods\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param amount Set the amount spent for the daily period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4384, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4325, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4320, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59629:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4319, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "59629:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4322, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59648:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4321, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "59648:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4324, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59665:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4323, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "59665:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59628:49:8" + }, + "payable": false, + "returnParameters": { + "id": 4328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4327, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59696:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4326, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "59696:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59695:14:8" + }, + "scope": 4606, + "src": "59595:1002:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4440, + "nodeType": "Block", + "src": "61157:398:8", + "statements": [ + { + "assignments": [ + 4394 + ], + "declarations": [ + { + "constant": false, + "id": 4394, + "name": "begDate", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61163:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4393, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "61163:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4399, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4396, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4386, + "src": "61203:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4397, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4388, + "src": "61209:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4395, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4258, + "src": "61178:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61178:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "61163:54:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4400, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "61227:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 4401, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "61237:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61227:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4438, + "nodeType": "Block", + "src": "61274:277:8", + "statements": [ + { + "assignments": [ + 4407 + ], + "declarations": [ + { + "constant": false, + "id": 4407, + "name": "duration", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61282:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4406, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "61282:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4409, + "initialValue": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 4408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61298:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "nodeType": "VariableDeclarationStatement", + "src": "61282:21:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4412, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4386, + "src": "61379:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4413, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4388, + "src": "61385:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4429, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4407, + "src": "61452:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 4425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61444:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4422, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4407, + "src": "61430:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4418, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "61416:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4416, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "61408:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "61408:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61408:16:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4420, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61407:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "61407:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61407:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "61407:36:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61407:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4427, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61406:41:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "61406:45:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61406:55:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4414, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "61394:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "61394:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61394:68:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4411, + "name": "setAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4232, + "src": "61354:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 4432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61354:109:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61473:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4410, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "61337:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61337:187:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4435, + "nodeType": "ExpressionStatement", + "src": "61337:187:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61540:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4392, + "id": 4437, + "nodeType": "Return", + "src": "61533:11:8" + } + ] + }, + "id": 4439, + "nodeType": "IfStatement", + "src": "61223:328:8", + "trueBody": { + "id": 4405, + "nodeType": "Block", + "src": "61242:26:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61257:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4392, + "id": 4404, + "nodeType": "Return", + "src": "61250:11:8" + } + ] + } + } + ] + }, + "documentation": "@notice Low-level API to ensure the account spending period is always current\n@dev | This method is internally called by `setAccountSpendingAmount()` to ensure\nspending period is always the most current daily period.\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4441, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updateAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4386, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61089:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4385, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "61089:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4388, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61108:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "61108:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61088:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4391, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61143:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4390, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "61143:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61142:14:8" + }, + "scope": 4606, + "src": "61052:503:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4470, + "nodeType": "Block", + "src": "62019:165:8", + "statements": [ + { + "assignments": [ + 4451 + ], + "declarations": [ + { + "constant": false, + "id": 4451, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4471, + "src": "62025:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4450, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "62025:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4463, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", + "id": 4455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "62065:25:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + "value": "account.spending.amount" + }, + { + "argumentTypes": null, + "id": 4456, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4445, + "src": "62092:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4458, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4443, + "src": "62126:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4459, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4445, + "src": "62132:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4457, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4258, + "src": "62101:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62101:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4453, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "62048:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4454, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "62048:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62048:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4452, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "62038:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62038:104:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62025:117:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4467, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4451, + "src": "62176:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4464, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4443, + "src": "62155:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "62155:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "62155:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62155:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4449, + "id": 4469, + "nodeType": "Return", + "src": "62148:31:8" + } + ] + }, + "documentation": "@notice Return the amount spent during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount spent by the account during the current period\"}", + "id": 4471, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4443, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4471, + "src": "61947:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4442, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "61947:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4445, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4471, + "src": "61966:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "61966:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61946:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4448, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4471, + "src": "62006:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "62006:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62005:13:8" + }, + "scope": 4606, + "src": "61913:271:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4491, + "nodeType": "Block", + "src": "62667:101:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4486, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4473, + "src": "62748:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4487, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4475, + "src": "62754:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4485, + "name": "getAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4471, + "src": "62723:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62723:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4481, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4473, + "src": "62704:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4482, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4475, + "src": "62710:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4480, + "name": "getAccountSpendingLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4318, + "src": "62680:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62680:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "62680:42:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62680:83:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4479, + "id": 4490, + "nodeType": "Return", + "src": "62673:90:8" + } + ] + }, + "documentation": "@notice Return the amount remaining during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}", + "id": 4492, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingRemaining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4473, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4492, + "src": "62587:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4472, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "62587:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4475, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4492, + "src": "62606:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4474, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "62606:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62586:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4479, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4478, + "name": "remainingLimit", + "nodeType": "VariableDeclaration", + "scope": 4492, + "src": "62646:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4477, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "62646:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62645:21:8" + }, + "scope": 4606, + "src": "62550:218:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4525, + "nodeType": "Block", + "src": "63361:207:8", + "statements": [ + { + "assignments": [ + 4504 + ], + "declarations": [ + { + "constant": false, + "id": 4504, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63367:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4503, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "63367:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4512, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66782e7573642e72617465", + "id": 4508, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63407:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + "value": "fx.usd.rate" + }, + { + "argumentTypes": null, + "id": 4509, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4496, + "src": "63422:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "63390:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "63390:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63390:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4505, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "63380:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63380:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63367:65:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4517, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "63474:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4518, + "name": "bpsRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4498, + "src": "63478:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4514, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4494, + "src": "63453:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4515, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "63453:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "63453:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63453:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63494:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4513, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "63438:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63438:107:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4522, + "nodeType": "ExpressionStatement", + "src": "63438:107:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63559:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4502, + "id": 4524, + "nodeType": "Return", + "src": "63552:11:8" + } + ] + }, + "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 4526, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFxUSDBPSRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4499, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4494, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63279:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4493, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "63279:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4496, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63298:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4495, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "63298:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4498, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63315:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4497, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "63315:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63278:50:8" + }, + "payable": false, + "returnParameters": { + "id": 4502, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4501, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63347:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4500, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "63347:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63346:14:8" + }, + "scope": 4606, + "src": "63254:314:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4551, + "nodeType": "Block", + "src": "63974:113:8", + "statements": [ + { + "assignments": [ + 4536 + ], + "declarations": [ + { + "constant": false, + "id": 4536, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4552, + "src": "63980:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4535, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "63980:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4544, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66782e7573642e72617465", + "id": 4540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64020:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + "value": "fx.usd.rate" + }, + { + "argumentTypes": null, + "id": 4541, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "64035:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4538, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "64003:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "64003:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64003:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4537, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "63993:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63993:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63980:65:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4548, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "64079:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4545, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4528, + "src": "64058:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "64058:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "64058:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64058:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4534, + "id": 4550, + "nodeType": "Return", + "src": "64051:31:8" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount in basis points\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", + "id": 4552, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDBPSRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4528, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4552, + "src": "63901:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4527, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "63901:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4530, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4552, + "src": "63920:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "63920:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63900:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4534, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4533, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 4552, + "src": "63960:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4532, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "63960:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63959:14:8" + }, + "scope": 4606, + "src": "63876:211:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4604, + "nodeType": "Block", + "src": "64556:330:8", + "statements": [ + { + "assignments": [ + 4564 + ], + "declarations": [ + { + "constant": false, + "id": 4564, + "name": "usdDecimals", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64562:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4563, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64562:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4569, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4566, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4554, + "src": "64598:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "hexValue": "55534478", + "id": 4567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64604:6:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", + "typeString": "literal_string \"USDx\"" + }, + "value": "USDx" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", + "typeString": "literal_string \"USDx\"" + } + ], + "id": 4565, + "name": "getTokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2496, + "src": "64581:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64581:30:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64562:49:8" + }, + { + "assignments": [ + 4571 + ], + "declarations": [ + { + "constant": false, + "id": 4571, + "name": "fxDecimals", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64617:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4570, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64617:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4576, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4573, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4554, + "src": "64652:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4574, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4556, + "src": "64658:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4572, + "name": "getTokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2496, + "src": "64635:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64635:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64617:50:8" + }, + { + "assignments": [ + 4578 + ], + "declarations": [ + { + "constant": false, + "id": 4578, + "name": "usdAmount", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64741:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4577, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64741:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4601, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64844:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 4598, + "name": "fxDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4571, + "src": "64848:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64844:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64822:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 4592, + "name": "usdDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4564, + "src": "64826:11:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64822:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 4587, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64810:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4582, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4554, + "src": "64789:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4583, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4556, + "src": "64795:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4581, + "name": "getFxUSDBPSRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4552, + "src": "64773:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64773:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4579, + "name": "fxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4558, + "src": "64760:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "64760:12:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64760:45:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "64760:49:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64760:56:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4589, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64759:58:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "64759:62:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64759:79:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4595, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64758:81:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "64758:85:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64758:101:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64741:118:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 4602, + "name": "usdAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4578, + "src": "64872:9:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4562, + "id": 4603, + "nodeType": "Return", + "src": "64865:16:8" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"amount\" : \"Returns the foreign currency amount in USD\"}", + "id": 4605, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4554, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64469:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4553, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "64469:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4556, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64488:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4555, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "64488:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4558, + "name": "fxAmount", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64505:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4557, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64505:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64468:51:8" + }, + "payable": false, + "returnParameters": { + "id": 4562, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4561, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64543:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4560, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64543:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64542:13:8" + }, + "scope": 4606, + "src": "64445:441:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 4607, + "src": "898:63992:8" + } + ], + "src": "0:64891:8" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "exportedSymbols": { + "TokenIOLib": [ + 4606 + ] + }, + "id": 4607, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1622, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", + "file": "./SafeMath.sol", + "id": 1623, + "nodeType": "ImportDirective", + "scope": 4607, + "sourceUnit": 286, + "src": "25:24:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 1624, + "nodeType": "ImportDirective", + "scope": 4607, + "sourceUnit": 5226, + "src": "50:30:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title TokenIOLib\n@author Ryan Tate , Sean Pollock \n@notice This library proxies the TokenIOStorage contract for the interface contract,\nallowing the library and the interfaces to remain stateless, and share a universally\navailable storage contract between interfaces.", + "fullyImplemented": true, + "id": 4606, + "linearizedBaseContracts": [ + 4606 + ], + "name": "TokenIOLib", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1627, + "libraryName": { + "contractScope": null, + "id": 1625, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 285, + "src": "1018:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$285", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1012:24:8", + "typeName": { + "id": 1626, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1031:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "canonicalName": "TokenIOLib.Data", + "id": 1630, + "members": [ + { + "constant": false, + "id": 1629, + "name": "Storage", + "nodeType": "VariableDeclaration", + "scope": 1630, + "src": "1132:22:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + }, + "typeName": { + "contractScope": null, + "id": 1628, + "name": "TokenIOStorage", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5225, + "src": "1132:14:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Data", + "nodeType": "StructDefinition", + "scope": 4606, + "src": "1114:45:8", + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "@notice Not using `Log` prefix for events to be consistent with ERC20 named events;", + "id": 1638, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1632, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1638, + "src": "1268:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1631, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1634, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1638, + "src": "1291:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1633, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1291:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1636, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1638, + "src": "1316:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1635, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1316:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1267:61:8" + }, + "src": "1253:76:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1648, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 1647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1640, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "1346:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1639, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1346:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1642, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "1363:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1363:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1644, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "1388:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1643, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1388:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1646, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "1401:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1645, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1401:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1345:74:8" + }, + "src": "1332:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1658, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 1657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1650, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1438:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1649, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1438:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1652, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1455:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1651, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1455:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1654, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1480:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1653, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1480:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1656, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1493:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1655, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1493:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1437:74:8" + }, + "src": "1423:89:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1670, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1669, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1660, + "indexed": false, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1530:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1659, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1530:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1662, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1547:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1547:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1664, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1569:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1569:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1666, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1589:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1589:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1668, + "indexed": false, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1670, + "src": "1602:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1667, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1602:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1529:84:8" + }, + "src": "1515:99:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1678, + "name": "KYCApproval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1672, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1678, + "src": "1635:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1671, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1635:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1674, + "indexed": false, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 1678, + "src": "1660:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1673, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1660:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1676, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1678, + "src": "1673:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1675, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1673:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1634:57:8" + }, + "src": "1617:75:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1686, + "name": "AccountStatus", + "nodeType": "EventDefinition", + "parameters": { + "id": 1685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1680, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1715:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1679, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1715:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1682, + "indexed": false, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1740:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1681, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1740:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1684, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1686, + "src": "1753:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1683, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1753:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1714:57:8" + }, + "src": "1695:77:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1700, + "name": "FxSwap", + "nodeType": "EventDefinition", + "parameters": { + "id": 1699, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1688, + "indexed": false, + "name": "tokenASymbol", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1788:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1687, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1788:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1690, + "indexed": false, + "name": "tokenBSymbol", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1808:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1689, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1808:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1692, + "indexed": false, + "name": "tokenAValue", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1828:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1691, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1828:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1694, + "indexed": false, + "name": "tokenBValue", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1845:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1693, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1845:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1696, + "indexed": false, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1863:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1695, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1863:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1698, + "indexed": false, + "name": "transactionHash", + "nodeType": "VariableDeclaration", + "scope": 1700, + "src": "1880:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1697, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1880:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1787:117:8" + }, + "src": "1775:130:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1706, + "name": "AccountForward", + "nodeType": "EventDefinition", + "parameters": { + "id": 1705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1702, + "indexed": true, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 1706, + "src": "1929:31:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1701, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1929:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1704, + "indexed": true, + "name": "forwardedAccount", + "nodeType": "VariableDeclaration", + "scope": 1706, + "src": "1962:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1703, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1962:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1928:67:8" + }, + "src": "1908:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1712, + "name": "NewAuthority", + "nodeType": "EventDefinition", + "parameters": { + "id": 1711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1708, + "indexed": true, + "name": "authority", + "nodeType": "VariableDeclaration", + "scope": 1712, + "src": "2018:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1707, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1710, + "indexed": false, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 1712, + "src": "2045:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1709, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2045:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2017:46:8" + }, + "src": "1999:65:8" + }, + { + "body": { + "id": 1745, + "nodeType": "Block", + "src": "2554:275:8", + "statements": [ + { + "assignments": [ + 1722 + ], + "declarations": [ + { + "constant": false, + "id": 1722, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1746, + "src": "2560:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1721, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2560:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1732, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d65", + "id": 1726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2600:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + "value": "token.name" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1728, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2622:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2614:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2614:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1724, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "2583:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1725, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2583:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2583:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1723, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "2573:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2573:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2560:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1737, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1722, + "src": "2673:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1738, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1716, + "src": "2677:9:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1734, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "2650:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1735, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "2650:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "2650:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2650:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2695:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1733, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2635:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2635:172:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1742, + "nodeType": "ExpressionStatement", + "src": "2635:172:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2820:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1720, + "id": 1744, + "nodeType": "Return", + "src": "2813:11:8" + } + ] + }, + "documentation": "@notice Set the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenName Name of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1746, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1717, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1714, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1746, + "src": "2485:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1713, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "2485:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1716, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 1746, + "src": "2504:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1715, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2504:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2484:37:8" + }, + "payable": false, + "returnParameters": { + "id": 1720, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1719, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1746, + "src": "2540:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1718, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2540:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2539:14:8" + }, + "scope": 4606, + "src": "2463:366:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1779, + "nodeType": "Block", + "src": "3329:279:8", + "statements": [ + { + "assignments": [ + 1756 + ], + "declarations": [ + { + "constant": false, + "id": 1756, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1780, + "src": "3335:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1755, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3335:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1766, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e73796d626f6c", + "id": 1760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3375:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + "value": "token.symbol" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1762, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3399:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3391:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3391:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1758, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "3358:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3358:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3358:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1757, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "3348:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3348:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3335:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1771, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1756, + "src": "3450:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1772, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1750, + "src": "3454:11:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1768, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1748, + "src": "3427:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "3427:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "3427:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3427:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3474:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1767, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "3412:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3412:174:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1776, + "nodeType": "ExpressionStatement", + "src": "3412:174:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3599:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1754, + "id": 1778, + "nodeType": "Return", + "src": "3592:11:8" + } + ] + }, + "documentation": "@notice Set the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenSymbol Symbol of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1780, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenSymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1751, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1748, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1780, + "src": "3258:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1747, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "3258:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1750, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 1780, + "src": "3277:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1749, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3277:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3257:39:8" + }, + "payable": false, + "returnParameters": { + "id": 1754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1753, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1780, + "src": "3315:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1752, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3315:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3314:14:8" + }, + "scope": 4606, + "src": "3234:374:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1813, + "nodeType": "Block", + "src": "4120:273:8", + "statements": [ + { + "assignments": [ + 1790 + ], + "declarations": [ + { + "constant": false, + "id": 1790, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1814, + "src": "4126:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1789, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4126:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1800, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e746c61", + "id": 1794, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4166:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + "value": "token.tla" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1796, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "4187:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4179:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1792, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "4149:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4149:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4149:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1791, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "4139:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4139:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4126:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1805, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1790, + "src": "4238:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1806, + "name": "tokenTLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1784, + "src": "4242:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1802, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1782, + "src": "4215:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1803, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "4215:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "4215:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4215:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4259:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4200:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4200:171:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1810, + "nodeType": "ExpressionStatement", + "src": "4200:171:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4384:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1788, + "id": 1812, + "nodeType": "Return", + "src": "4377:11:8" + } + ] + }, + "documentation": "@notice Set the token three letter abreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenTLA TLA of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenTLA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1782, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1814, + "src": "4052:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1781, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "4052:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1784, + "name": "tokenTLA", + "nodeType": "VariableDeclaration", + "scope": 1814, + "src": "4071:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1783, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4071:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4051:36:8" + }, + "payable": false, + "returnParameters": { + "id": 1788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1787, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1814, + "src": "4106:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1786, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4106:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4105:14:8" + }, + "scope": 4606, + "src": "4031:362:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1847, + "nodeType": "Block", + "src": "4942:281:8", + "statements": [ + { + "assignments": [ + 1824 + ], + "declarations": [ + { + "constant": false, + "id": 1824, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1848, + "src": "4948:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1823, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4948:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1834, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e76657273696f6e", + "id": 1828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4988:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + "value": "token.version" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1830, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "5013:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5005:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5005:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1826, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "4971:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4971:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4971:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1825, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "4961:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4961:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4948:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1839, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1824, + "src": "5064:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1840, + "name": "tokenVersion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1818, + "src": "5068:12:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1836, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1816, + "src": "5041:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1837, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "5041:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "5041:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 1841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5041:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5089:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1835, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "5026:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5026:175:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1844, + "nodeType": "ExpressionStatement", + "src": "5026:175:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5214:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1822, + "id": 1846, + "nodeType": "Return", + "src": "5207:11:8" + } + ] + }, + "documentation": "@notice Set the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1848, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenVersion", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1816, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1848, + "src": "4870:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1815, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "4870:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1818, + "name": "tokenVersion", + "nodeType": "VariableDeclaration", + "scope": 1848, + "src": "4889:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1817, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4889:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4869:40:8" + }, + "payable": false, + "returnParameters": { + "id": 1822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1821, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1848, + "src": "4928:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1820, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4928:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4927:14:8" + }, + "scope": 4606, + "src": "4845:378:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1881, + "nodeType": "Block", + "src": "6051:276:8", + "statements": [ + { + "assignments": [ + 1860 + ], + "declarations": [ + { + "constant": false, + "id": 1860, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "6057:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1859, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6057:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1868, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e646563696d616c73", + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6097:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + "value": "token.decimals" + }, + { + "argumentTypes": null, + "id": 1865, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1852, + "src": "6115:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 1862, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "6080:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6080:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6080:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1861, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "6070:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6070:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6057:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1873, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1860, + "src": "6167:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1874, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1854, + "src": "6171:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1870, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1850, + "src": "6146:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "6146:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "6146:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6146:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6193:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1869, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6131:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6131:174:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1878, + "nodeType": "ExpressionStatement", + "src": "6131:174:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6318:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1858, + "id": 1880, + "nodeType": "Return", + "src": "6311:11:8" + } + ] + }, + "documentation": "@notice Set the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@dev This method is not set to the address of the contract, rather is maped to currency\n@dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param tokenDecimals Decimal representation of the token contract unit amount\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1882, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenDecimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1855, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1850, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "5963:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1849, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "5963:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1852, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "5982:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1851, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5982:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1854, + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "5999:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1853, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5999:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5962:56:8" + }, + "payable": false, + "returnParameters": { + "id": 1858, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1857, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1882, + "src": "6037:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1856, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6037:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6036:14:8" + }, + "scope": 4606, + "src": "5937:390:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1915, + "nodeType": "Block", + "src": "6887:267:8", + "statements": [ + { + "assignments": [ + 1892 + ], + "declarations": [ + { + "constant": false, + "id": 1892, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1916, + "src": "6893:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1891, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6893:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1902, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 1896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6933:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1898, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "6952:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6944:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6944:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1894, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "6916:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6916:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6916:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1893, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "6906:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6906:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6893:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1907, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1892, + "src": "7001:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1908, + "name": "feeBPS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1886, + "src": "7005:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1904, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1884, + "src": "6980:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1905, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "6980:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "6980:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6980:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7020:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1903, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "6965:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6965:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1912, + "nodeType": "ExpressionStatement", + "src": "6965:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7145:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1890, + "id": 1914, + "nodeType": "Return", + "src": "7138:11:8" + } + ] + }, + "documentation": "@notice Set basis point fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeBPS Basis points fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1916, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeBPS", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1887, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1884, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1916, + "src": "6823:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1883, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "6823:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "name": "feeBPS", + "nodeType": "VariableDeclaration", + "scope": 1916, + "src": "6842:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1885, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6842:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6822:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1889, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1916, + "src": "6873:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1888, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6873:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6872:14:8" + }, + "scope": 4606, + "src": "6804:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1949, + "nodeType": "Block", + "src": "7705:267:8", + "statements": [ + { + "assignments": [ + 1926 + ], + "declarations": [ + { + "constant": false, + "id": 1926, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1950, + "src": "7711:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1925, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7711:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1936, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 1930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7751:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1932, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "7770:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7762:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7762:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1928, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "7734:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7734:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7734:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1927, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "7724:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7724:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7711:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1941, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1926, + "src": "7819:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1942, + "name": "feeMin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1920, + "src": "7823:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1938, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1918, + "src": "7798:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1939, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "7798:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "7798:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7798:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7838:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1937, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "7783:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7783:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1946, + "nodeType": "ExpressionStatement", + "src": "7783:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7963:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1924, + "id": 1948, + "nodeType": "Return", + "src": "7956:11:8" + } + ] + }, + "documentation": "@notice Set minimum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMin Minimum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1950, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1918, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1950, + "src": "7641:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1917, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "7641:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1920, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 1950, + "src": "7660:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1919, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7660:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7640:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1924, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1923, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1950, + "src": "7691:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1922, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7691:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7690:14:8" + }, + "scope": 4606, + "src": "7622:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1983, + "nodeType": "Block", + "src": "8523:267:8", + "statements": [ + { + "assignments": [ + 1960 + ], + "declarations": [ + { + "constant": false, + "id": 1960, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1984, + "src": "8529:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1959, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8529:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1970, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 1964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8569:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1966, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "8588:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8580:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8580:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1962, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "8552:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8552:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8552:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1961, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "8542:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8542:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8529:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1975, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "8637:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1976, + "name": "feeMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1954, + "src": "8641:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1972, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1952, + "src": "8616:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 1973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "8616:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 1974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "8616:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 1977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8616:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 1978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8656:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 1971, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "8601:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8601:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1980, + "nodeType": "ExpressionStatement", + "src": "8601:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8781:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1958, + "id": 1982, + "nodeType": "Return", + "src": "8774:11:8" + } + ] + }, + "documentation": "@notice Set maximum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMax Maximum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 1984, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMax", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1952, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 1984, + "src": "8459:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1951, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "8459:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1954, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 1984, + "src": "8478:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1953, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8478:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8458:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1957, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1984, + "src": "8509:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1956, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8509:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8508:14:8" + }, + "scope": 4606, + "src": "8440:350:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2017, + "nodeType": "Block", + "src": "9338:269:8", + "statements": [ + { + "assignments": [ + 1994 + ], + "declarations": [ + { + "constant": false, + "id": 1994, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2018, + "src": "9344:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1993, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9344:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2004, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 1998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9384:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2000, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "9404:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 1999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9396:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9396:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1996, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "9367:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9367:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9367:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1995, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "9357:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9357:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9344:67:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2009, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1994, + "src": "9453:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2010, + "name": "feeFlat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1988, + "src": "9457:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2006, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1986, + "src": "9432:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2007, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "9432:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "9432:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 2011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9432:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9473:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2005, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "9417:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9417:168:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2014, + "nodeType": "ExpressionStatement", + "src": "9417:168:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9598:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1992, + "id": 2016, + "nodeType": "Return", + "src": "9591:11:8" + } + ] + }, + "documentation": "@notice Set flat fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeFlat Flat fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2018, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeFlat", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1986, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2018, + "src": "9273:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 1985, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "9273:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1988, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 2018, + "src": "9292:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1987, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9292:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9272:33:8" + }, + "payable": false, + "returnParameters": { + "id": 1992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1991, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2018, + "src": "9324:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1990, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9324:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9323:14:8" + }, + "scope": 4606, + "src": "9253:354:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2051, + "nodeType": "Block", + "src": "10188:268:8", + "statements": [ + { + "assignments": [ + 2028 + ], + "declarations": [ + { + "constant": false, + "id": 2028, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2052, + "src": "10194:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2027, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10194:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2038, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d7367", + "id": 2032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10234:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + "value": "fee.msg" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2034, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "10253:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 2033, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10245:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10245:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2030, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "10217:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10217:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10217:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2029, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "10207:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10207:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10194:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2043, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2028, + "src": "10303:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2044, + "name": "feeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2022, + "src": "10307:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2040, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2020, + "src": "10281:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2041, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "10281:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 5010, + "src": "10281:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,bytes memory) external returns (bool)" + } + }, + "id": 2045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10281:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10322:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2039, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "10266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10266:168:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2048, + "nodeType": "ExpressionStatement", + "src": "10266:168:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10447:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2026, + "id": 2050, + "nodeType": "Return", + "src": "10440:11:8" + } + ] + }, + "documentation": "@notice Set fee message for contract interface\n@dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n@dev Fee messages vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMsg Fee message included in a transaction with fees\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2052, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeMsg", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2023, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2020, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2052, + "src": "10123:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2019, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "10123:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2022, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 2052, + "src": "10142:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2021, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10142:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10122:33:8" + }, + "payable": false, + "returnParameters": { + "id": 2026, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2025, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2052, + "src": "10174:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2024, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10174:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10173:14:8" + }, + "scope": 4606, + "src": "10104:352:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2085, + "nodeType": "Block", + "src": "11121:279:8", + "statements": [ + { + "assignments": [ + 2062 + ], + "declarations": [ + { + "constant": false, + "id": 2062, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2086, + "src": "11127:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2061, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11127:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2072, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6163636f756e74", + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11167:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + "value": "fee.account" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2068, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "11190:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 2067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11182:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11182:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2064, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "11150:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11150:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11150:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2063, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "11140:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11140:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11127:70:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2077, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "11242:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2078, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2056, + "src": "11246:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2074, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2054, + "src": "11218:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2075, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "11218:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4950, + "src": "11218:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11218:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11266:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2073, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "11203:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11203:175:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2082, + "nodeType": "ExpressionStatement", + "src": "11203:175:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11391:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2060, + "id": 2084, + "nodeType": "Return", + "src": "11384:11:8" + } + ] + }, + "documentation": "@notice Set fee contract for a contract interface\n@dev feeContract must be a TokenIOFeeContract storage approved contract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@dev | This must be called directly from the interface contract\n@param self Internal storage proxying TokenIOStorage contract\n@param feeContract Set the fee contract for `this` contract address interface\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2086, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2054, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2086, + "src": "11049:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2053, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "11049:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2056, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 2086, + "src": "11068:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2055, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11068:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11048:40:8" + }, + "payable": false, + "returnParameters": { + "id": 2060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2059, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2086, + "src": "11107:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2058, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11107:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11106:14:8" + }, + "scope": 4606, + "src": "11025:375:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2119, + "nodeType": "Block", + "src": "12035:280:8", + "statements": [ + { + "assignments": [ + 2096 + ], + "declarations": [ + { + "constant": false, + "id": 2096, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2120, + "src": "12041:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2095, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12041:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2104, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d657370616365", + "id": 2100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12081:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + "value": "token.namespace" + }, + { + "argumentTypes": null, + "id": 2101, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2090, + "src": "12100:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2098, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "12064:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12064:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12064:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2097, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "12054:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12054:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12041:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2109, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2096, + "src": "12155:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2111, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "12167:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12159:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12159:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2106, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2088, + "src": "12131:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "12131:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4950, + "src": "12131:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12131:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12181:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2105, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "12116:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12116:177:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2116, + "nodeType": "ExpressionStatement", + "src": "12116:177:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12306:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2094, + "id": 2118, + "nodeType": "Return", + "src": "12299:11:8" + } + ] + }, + "documentation": "@notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n@dev | This should only be called once from a token interface contract;\n@dev | This method has an `internal` view\n@dev | This method is experimental and may be deprecated/refactored\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2120, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2091, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2088, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2120, + "src": "11967:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2087, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "11967:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2090, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2120, + "src": "11986:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2089, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11986:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11966:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2094, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2093, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2120, + "src": "12021:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2092, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12021:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12020:14:8" + }, + "scope": 4606, + "src": "11940:375:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2164, + "nodeType": "Block", + "src": "13113:435:8", + "statements": [ + { + "assignments": [ + 2134 + ], + "declarations": [ + { + "constant": false, + "id": 2134, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13121:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2133, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13121:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2145, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e6b7963", + "id": 2138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13161:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + "value": "account.kyc" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2140, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2122, + "src": "13196:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2141, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2124, + "src": "13202:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2139, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "13176:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13176:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2136, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "13144:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13144:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13144:67:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2135, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "13134:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13134:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13121:91:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2150, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "13258:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2151, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2126, + "src": "13262:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2147, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2122, + "src": "13237:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "13237:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "13237:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13237:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13283:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "13220:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13220:177:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2155, + "nodeType": "ExpressionStatement", + "src": "13220:177:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2157, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2124, + "src": "13492:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2158, + "name": "isApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2126, + "src": "13501:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2159, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2128, + "src": "13513:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2156, + "name": "KYCApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1678, + "src": "13480:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,bool,string memory)" + } + }, + "id": 2160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13480:44:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2161, + "nodeType": "EmitStatement", + "src": "13475:49:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13539:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2132, + "id": 2163, + "nodeType": "Return", + "src": "13532:11:8" + } + ] + }, + "documentation": "@notice Set the KYC approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isApproved Boolean (true/false) KYC approval status for a given account\n@param issuerFirm Firm name for issuing KYC approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2165, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setKYCApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2122, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13009:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2121, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "13009:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2124, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13028:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13028:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2126, + "name": "isApproved", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13045:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2125, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13045:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2128, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13062:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2127, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "13062:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13008:72:8" + }, + "payable": false, + "returnParameters": { + "id": 2132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2131, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "13099:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2130, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13099:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13098:14:8" + }, + "scope": 4606, + "src": "12985:563:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2209, + "nodeType": "Block", + "src": "14343:419:8", + "statements": [ + { + "assignments": [ + 2179 + ], + "declarations": [ + { + "constant": false, + "id": 2179, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14349:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2178, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "14349:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2190, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e616c6c6f776564", + "id": 2183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14389:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + "value": "account.allowed" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2185, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "14428:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2186, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2169, + "src": "14434:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2184, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "14408:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14408:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2181, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "14372:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14372:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14372:71:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2180, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "14362:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14362:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14349:95:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2195, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2179, + "src": "14486:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2196, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2171, + "src": "14490:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2192, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "14465:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "14465:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "14465:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14465:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14508:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2191, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "14450:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14450:170:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2200, + "nodeType": "ExpressionStatement", + "src": "14450:170:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2202, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2169, + "src": "14709:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2203, + "name": "isAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2171, + "src": "14718:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2204, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2173, + "src": "14729:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2201, + "name": "AccountStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "14695:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,bool,string memory)" + } + }, + "id": 2205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14695:45:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2206, + "nodeType": "EmitStatement", + "src": "14690:50:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14753:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2177, + "id": 2208, + "nodeType": "Return", + "src": "14746:11:8" + } + ] + }, + "documentation": "@notice Set the global approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isAllowed Boolean (true/false) global status for a given account\n@param issuerFirm Firm name for issuing approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2210, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2167, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14240:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2166, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "14240:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2169, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14259:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14259:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2171, + "name": "isAllowed", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14276:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14276:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2173, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14292:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2172, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14292:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14239:71:8" + }, + "payable": false, + "returnParameters": { + "id": 2177, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2176, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2210, + "src": "14329:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2175, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14329:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14328:14:8" + }, + "scope": 4606, + "src": "14214:548:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2243, + "nodeType": "Block", + "src": "15647:289:8", + "statements": [ + { + "assignments": [ + 2222 + ], + "declarations": [ + { + "constant": false, + "id": 2222, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15653:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2221, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15653:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2230, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6d61737465722e6163636f756e74", + "id": 2226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15693:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + "value": "master.account" + }, + { + "argumentTypes": null, + "id": 2227, + "name": "forwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2216, + "src": "15711:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2224, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "15676:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15676:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15676:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2223, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "15666:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15666:63:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15653:76:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2235, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2222, + "src": "15774:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2236, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2214, + "src": "15778:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2232, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2212, + "src": "15750:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "15750:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4950, + "src": "15750:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15750:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15802:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2231, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "15735:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15735:179:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2240, + "nodeType": "ExpressionStatement", + "src": "15735:179:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15927:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2220, + "id": 2242, + "nodeType": "Return", + "src": "15920:11:8" + } + ] + }, + "documentation": "@notice Set a forwarded address for an account.\n@dev | This method has an `internal` view\n@dev | Forwarded accounts must be set by an authority in case of account recovery;\n@dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n@dev | All transactions will be logged under the same KYC information as the original account holder;\n@param self Internal storage proxying TokenIOStorage contract\n@param originalAccount Original registered Ethereum address of the account holder\n@param forwardedAccount Forwarded Ethereum address of the account holder\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2244, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2212, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15545:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2211, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "15545:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2214, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15564:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15564:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2216, + "name": "forwardedAccount", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15589:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15589:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15544:70:8" + }, + "payable": false, + "returnParameters": { + "id": 2220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2244, + "src": "15633:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15633:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15632:14:8" + }, + "scope": 4606, + "src": "15516:420:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2281, + "nodeType": "Block", + "src": "16515:242:8", + "statements": [ + { + "assignments": [ + 2254 + ], + "declarations": [ + { + "constant": false, + "id": 2254, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16521:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2253, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "16521:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2262, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6d61737465722e6163636f756e74", + "id": 2258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16561:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + "value": "master.account" + }, + { + "argumentTypes": null, + "id": 2259, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2248, + "src": "16579:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", + "typeString": "literal_string \"master.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2256, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "16544:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16544:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16544:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2255, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "16534:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16534:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16521:67:8" + }, + { + "assignments": [ + 2264 + ], + "declarations": [ + { + "constant": false, + "id": 2264, + "name": "originalAccount", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16594:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16594:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2270, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2268, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2254, + "src": "16644:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2265, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2246, + "src": "16620:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2266, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "16620:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5164, + "src": "16620:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16620:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16594:53:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2271, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "16657:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 2272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16676:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "16657:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2279, + "nodeType": "Block", + "src": "16724:29:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2277, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2248, + "src": "16739:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2252, + "id": 2278, + "nodeType": "Return", + "src": "16732:14:8" + } + ] + }, + "id": 2280, + "nodeType": "IfStatement", + "src": "16653:100:8", + "trueBody": { + "id": 2276, + "nodeType": "Block", + "src": "16681:37:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2274, + "name": "originalAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "16696:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2252, + "id": 2275, + "nodeType": "Return", + "src": "16689:22:8" + } + ] + } + } + ] + }, + "documentation": "@notice Get the original address for a forwarded account\n@dev | This method has an `internal` view\n@dev | Will return the registered account for the given forwarded account\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}", + "id": 2282, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getForwardedAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2246, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16429:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2245, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "16429:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2248, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16448:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2247, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16448:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16428:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2252, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2251, + "name": "registeredAccount", + "nodeType": "VariableDeclaration", + "scope": 2282, + "src": "16488:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16488:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16487:27:8" + }, + "scope": 4606, + "src": "16400:357:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2310, + "nodeType": "Block", + "src": "17256:143:8", + "statements": [ + { + "assignments": [ + 2292 + ], + "declarations": [ + { + "constant": false, + "id": 2292, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2311, + "src": "17264:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2291, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17264:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2303, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e6b7963", + "id": 2296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17304:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + "value": "account.kyc" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2298, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2284, + "src": "17339:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2299, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2286, + "src": "17345:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2297, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "17319:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17319:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", + "typeString": "literal_string \"account.kyc\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2294, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "17287:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17287:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17287:67:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2293, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "17277:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17277:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17264:91:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2307, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "17391:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2304, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2284, + "src": "17370:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2305, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "17370:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "17370:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 2308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17370:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2290, + "id": 2309, + "nodeType": "Return", + "src": "17363:31:8" + } + ] + }, + "documentation": "@notice Get KYC approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the KYC approval status for an account holder\" }", + "id": 2311, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getKYCApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2287, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2284, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2311, + "src": "17184:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2283, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "17184:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2286, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2311, + "src": "17203:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2285, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17203:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17183:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2290, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2289, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 2311, + "src": "17243:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2288, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17243:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17242:13:8" + }, + "scope": 4606, + "src": "17160:239:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2339, + "nodeType": "Block", + "src": "17906:143:8", + "statements": [ + { + "assignments": [ + 2321 + ], + "declarations": [ + { + "constant": false, + "id": 2321, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2340, + "src": "17912:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2320, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17912:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2332, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e616c6c6f776564", + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17952:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + "value": "account.allowed" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2327, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2313, + "src": "17991:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2328, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2315, + "src": "17997:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2326, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "17971:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17971:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", + "typeString": "literal_string \"account.allowed\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2323, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "17935:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17935:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17935:71:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2322, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "17925:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17925:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17912:95:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2336, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2321, + "src": "18041:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2333, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2313, + "src": "18020:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "18020:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "18020:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 2337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18020:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2319, + "id": 2338, + "nodeType": "Return", + "src": "18013:31:8" + } + ] + }, + "documentation": "@notice Get global approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the global approval status for an account holder\" }", + "id": 2340, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2313, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2340, + "src": "17834:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2312, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "17834:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2315, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2340, + "src": "17853:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17853:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17833:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2318, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 2340, + "src": "17893:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2317, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17893:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17892:13:8" + }, + "scope": 4606, + "src": "17808:241:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2365, + "nodeType": "Block", + "src": "18533:120:8", + "statements": [ + { + "assignments": [ + 2350 + ], + "declarations": [ + { + "constant": false, + "id": 2350, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2366, + "src": "18539:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2349, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "18539:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2358, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d657370616365", + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18579:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + "value": "token.namespace" + }, + { + "argumentTypes": null, + "id": 2355, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2344, + "src": "18598:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", + "typeString": "literal_string \"token.namespace\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2352, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "18562:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18562:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18562:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2351, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "18552:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18552:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18539:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2362, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2350, + "src": "18645:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2359, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2342, + "src": "18621:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "18621:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5164, + "src": "18621:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18621:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2348, + "id": 2364, + "nodeType": "Return", + "src": "18614:34:8" + } + ] + }, + "documentation": "@notice Get the contract interface address associated with token symbol\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }", + "id": 2366, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2345, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2342, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2366, + "src": "18449:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2341, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "18449:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2344, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2366, + "src": "18468:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2343, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "18468:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18448:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2347, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2366, + "src": "18508:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18508:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18507:25:8" + }, + "scope": 4606, + "src": "18422:231:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2391, + "nodeType": "Block", + "src": "19151:121:8", + "statements": [ + { + "assignments": [ + 2376 + ], + "declarations": [ + { + "constant": false, + "id": 2376, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2392, + "src": "19157:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2375, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19157:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2384, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e6e616d65", + "id": 2380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19197:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + "value": "token.name" + }, + { + "argumentTypes": null, + "id": 2381, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2370, + "src": "19211:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", + "typeString": "literal_string \"token.name\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2378, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "19180:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19180:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19180:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2377, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "19170:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19170:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19157:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2388, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2376, + "src": "19264:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2385, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2368, + "src": "19241:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "19241:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "19241:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19241:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2374, + "id": 2390, + "nodeType": "Return", + "src": "19234:33:8" + } + ] + }, + "documentation": "@notice Get the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenName\" : \"Name of the token contract\"}", + "id": 2392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2368, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2392, + "src": "19066:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2367, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "19066:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2370, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2392, + "src": "19085:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19085:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19065:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2373, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 2392, + "src": "19133:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2372, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "19133:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19132:18:8" + }, + "scope": 4606, + "src": "19044:228:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2417, + "nodeType": "Block", + "src": "19780:123:8", + "statements": [ + { + "assignments": [ + 2402 + ], + "declarations": [ + { + "constant": false, + "id": 2402, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2418, + "src": "19786:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2401, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19786:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2410, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e73796d626f6c", + "id": 2406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19826:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + "value": "token.symbol" + }, + { + "argumentTypes": null, + "id": 2407, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2396, + "src": "19842:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", + "typeString": "literal_string \"token.symbol\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2404, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "19809:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19809:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19809:49:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2403, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "19799:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19799:60:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19786:73:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2414, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2402, + "src": "19895:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2411, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2394, + "src": "19872:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "19872:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "19872:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19872:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2400, + "id": 2416, + "nodeType": "Return", + "src": "19865:33:8" + } + ] + }, + "documentation": "@notice Get the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenSymbol\" : \"Symbol of the token contract\"}", + "id": 2418, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2394, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2418, + "src": "19693:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2393, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "19693:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2396, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2418, + "src": "19712:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2395, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19712:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19692:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2399, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 2418, + "src": "19760:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2398, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "19760:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19759:20:8" + }, + "scope": 4606, + "src": "19669:234:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2443, + "nodeType": "Block", + "src": "20424:120:8", + "statements": [ + { + "assignments": [ + 2428 + ], + "declarations": [ + { + "constant": false, + "id": 2428, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2444, + "src": "20430:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2427, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "20430:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2436, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e746c61", + "id": 2432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20470:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + "value": "token.tla" + }, + { + "argumentTypes": null, + "id": 2433, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "20483:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", + "typeString": "literal_string \"token.tla\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2430, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "20453:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20453:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20453:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2429, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "20443:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20443:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20430:70:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2440, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2428, + "src": "20536:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2437, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2420, + "src": "20513:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2438, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "20513:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "20513:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20513:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2426, + "id": 2442, + "nodeType": "Return", + "src": "20506:33:8" + } + ] + }, + "documentation": "@notice Get the token Three letter abbreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenTLA\" : \"TLA of the token contract\"}", + "id": 2444, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenTLA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2420, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2444, + "src": "20340:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2419, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "20340:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2422, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2444, + "src": "20359:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2421, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20359:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20339:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2425, + "name": "tokenTLA", + "nodeType": "VariableDeclaration", + "scope": 2444, + "src": "20407:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2424, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20407:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20406:17:8" + }, + "scope": 4606, + "src": "20319:225:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2469, + "nodeType": "Block", + "src": "21053:124:8", + "statements": [ + { + "assignments": [ + 2454 + ], + "declarations": [ + { + "constant": false, + "id": 2454, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2470, + "src": "21059:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2453, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21059:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2462, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e76657273696f6e", + "id": 2458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21099:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + "value": "token.version" + }, + { + "argumentTypes": null, + "id": 2459, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2448, + "src": "21116:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", + "typeString": "literal_string \"token.version\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2456, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "21082:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21082:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21082:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2455, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "21072:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21072:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21059:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2466, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2454, + "src": "21169:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2463, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2446, + "src": "21146:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2464, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "21146:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "21146:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 2467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21146:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2452, + "id": 2468, + "nodeType": "Return", + "src": "21139:33:8" + } + ] + }, + "documentation": "@notice Get the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenVersion\" : \"Semantic version of the token contract\"}", + "id": 2470, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenVersion", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2446, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2470, + "src": "20978:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2445, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "20978:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2448, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2470, + "src": "20997:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20997:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20977:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2451, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2470, + "src": "21045:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2450, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "21045:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21044:8:8" + }, + "scope": 4606, + "src": "20953:224:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2495, + "nodeType": "Block", + "src": "21688:116:8", + "statements": [ + { + "assignments": [ + 2480 + ], + "declarations": [ + { + "constant": false, + "id": 2480, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2496, + "src": "21694:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2479, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21694:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2488, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e646563696d616c73", + "id": 2484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21734:16:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + "value": "token.decimals" + }, + { + "argumentTypes": null, + "id": 2485, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2474, + "src": "21752:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", + "typeString": "literal_string \"token.decimals\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2482, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "21717:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21717:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21717:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2481, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "21707:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21707:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21694:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2492, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2480, + "src": "21796:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2489, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2472, + "src": "21775:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2490, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "21775:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "21775:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21775:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2478, + "id": 2494, + "nodeType": "Return", + "src": "21768:31:8" + } + ] + }, + "documentation": "@notice Get the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"tokenDecimals\" : \"Decimals of the token contract\"}", + "id": 2496, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenDecimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2475, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2472, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2496, + "src": "21609:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2471, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "21609:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2474, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2496, + "src": "21628:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2473, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "21628:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21608:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2477, + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "scope": 2496, + "src": "21668:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "21668:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21667:20:8" + }, + "scope": 4606, + "src": "21583:221:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2521, + "nodeType": "Block", + "src": "22293:116:8", + "statements": [ + { + "assignments": [ + 2506 + ], + "declarations": [ + { + "constant": false, + "id": 2506, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2522, + "src": "22299:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2505, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "22299:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2514, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 2510, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22339:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "id": 2511, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2500, + "src": "22350:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2508, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "22322:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22322:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22322:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2507, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "22312:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22312:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22299:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2518, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "22401:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2515, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2498, + "src": "22380:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2516, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "22380:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "22380:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22380:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2504, + "id": 2520, + "nodeType": "Return", + "src": "22373:31:8" + } + ] + }, + "documentation": "@notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}", + "id": 2522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeBPS", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2501, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2498, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2522, + "src": "22213:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2497, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "22213:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2500, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2522, + "src": "22232:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2499, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22232:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22212:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2503, + "name": "feeBps", + "nodeType": "VariableDeclaration", + "scope": 2522, + "src": "22280:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2502, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22280:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22279:13:8" + }, + "scope": 4606, + "src": "22194:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2547, + "nodeType": "Block", + "src": "22888:116:8", + "statements": [ + { + "assignments": [ + 2532 + ], + "declarations": [ + { + "constant": false, + "id": 2532, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "22894:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2531, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "22894:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2540, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 2536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22934:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "id": 2537, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2526, + "src": "22945:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2534, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "22917:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22917:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22917:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2533, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "22907:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22907:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22894:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2544, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2532, + "src": "22996:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2541, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2524, + "src": "22975:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2542, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "22975:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "22975:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22975:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2530, + "id": 2546, + "nodeType": "Return", + "src": "22968:31:8" + } + ] + }, + "documentation": "@notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}", + "id": 2548, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2527, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2524, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "22808:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2523, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "22808:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2526, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "22827:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2525, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22827:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22807:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2530, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2529, + "name": "feeMin", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "22875:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2528, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22875:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22874:13:8" + }, + "scope": 4606, + "src": "22789:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2573, + "nodeType": "Block", + "src": "23483:116:8", + "statements": [ + { + "assignments": [ + 2558 + ], + "declarations": [ + { + "constant": false, + "id": 2558, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2574, + "src": "23489:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2557, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "23489:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2566, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 2562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23529:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "id": 2563, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2552, + "src": "23540:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2560, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "23512:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23512:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23512:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2559, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "23502:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23502:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23489:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2570, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2558, + "src": "23591:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2567, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2550, + "src": "23570:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2568, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "23570:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "23570:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23570:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2556, + "id": 2572, + "nodeType": "Return", + "src": "23563:31:8" + } + ] + }, + "documentation": "@notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}", + "id": 2574, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMax", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2550, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2574, + "src": "23403:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2549, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "23403:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2552, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2574, + "src": "23422:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2551, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23422:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23402:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2555, + "name": "feeMax", + "nodeType": "VariableDeclaration", + "scope": 2574, + "src": "23470:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2554, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "23470:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23469:13:8" + }, + "scope": 4606, + "src": "23384:215:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2599, + "nodeType": "Block", + "src": "24075:117:8", + "statements": [ + { + "assignments": [ + 2584 + ], + "declarations": [ + { + "constant": false, + "id": 2584, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2600, + "src": "24081:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2583, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "24081:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2592, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24121:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "id": 2589, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2578, + "src": "24133:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2586, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "24104:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2587, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24104:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24104:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2585, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "24094:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24094:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24081:69:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2596, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "24184:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2593, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2576, + "src": "24163:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "24163:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "24163:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24163:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2582, + "id": 2598, + "nodeType": "Return", + "src": "24156:31:8" + } + ] + }, + "documentation": "@notice Get the flat fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}", + "id": 2600, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeFlat", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2579, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2576, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2600, + "src": "23994:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2575, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "23994:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2578, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2600, + "src": "24013:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24013:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23993:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2581, + "name": "feeFlat", + "nodeType": "VariableDeclaration", + "scope": 2600, + "src": "24061:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2580, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "24061:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24060:14:8" + }, + "scope": 4606, + "src": "23974:218:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2625, + "nodeType": "Block", + "src": "24680:117:8", + "statements": [ + { + "assignments": [ + 2610 + ], + "declarations": [ + { + "constant": false, + "id": 2610, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2626, + "src": "24686:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2609, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "24686:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2618, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d7367", + "id": 2614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24726:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + "value": "fee.msg" + }, + { + "argumentTypes": null, + "id": 2615, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "24737:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", + "typeString": "literal_string \"fee.msg\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2612, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "24709:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24709:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24709:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2611, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "24699:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24699:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24686:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2622, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2610, + "src": "24789:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2619, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "24767:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2620, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "24767:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 5200, + "src": "24767:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes32) view external returns (bytes memory)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24767:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 2608, + "id": 2624, + "nodeType": "Return", + "src": "24760:32:8" + } + ] + }, + "documentation": "@notice Get the flat message of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}", + "id": 2626, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeMsg", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2605, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2602, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2626, + "src": "24599:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2601, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "24599:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2604, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2626, + "src": "24618:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2603, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24618:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24598:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2608, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2607, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 2626, + "src": "24666:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2606, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "24666:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24665:14:8" + }, + "scope": 4606, + "src": "24580:217:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2656, + "nodeType": "Block", + "src": "25354:276:8", + "statements": [ + { + "assignments": [ + 2636 + ], + "declarations": [ + { + "constant": false, + "id": 2636, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2657, + "src": "25360:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2635, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "25360:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2643, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e636f6e74726163742e6d6173746572", + "id": 2640, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25400:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + }, + "value": "fee.contract.master" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 2638, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "25383:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25383:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25383:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2637, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "25373:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25373:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25360:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2648, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2636, + "src": "25468:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2649, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2630, + "src": "25472:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2645, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2628, + "src": "25444:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "25444:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4950, + "src": "25444:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) external returns (bool)" + } + }, + "id": 2650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25444:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25496:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2644, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "25429:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25429:179:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2653, + "nodeType": "ExpressionStatement", + "src": "25429:179:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25621:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2634, + "id": 2655, + "nodeType": "Return", + "src": "25614:11:8" + } + ] + }, + "documentation": "@notice Set the master fee contract used as the default fee contract when none is provided\n@dev | This method has an `internal` view\n@dev | This value is set in the TokenIOAuthority contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"success\" : \"Returns true when successfully called from another contract\"}", + "id": 2657, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2628, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2657, + "src": "25278:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2627, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "25278:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2630, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2657, + "src": "25297:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2629, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25297:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25277:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2634, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2633, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2657, + "src": "25340:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2632, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "25340:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25339:14:8" + }, + "scope": 4606, + "src": "25248:382:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2679, + "nodeType": "Block", + "src": "26023:114:8", + "statements": [ + { + "assignments": [ + 2665 + ], + "declarations": [ + { + "constant": false, + "id": 2665, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2680, + "src": "26029:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2664, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "26029:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2672, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e636f6e74726163742e6d6173746572", + "id": 2669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26069:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + }, + "value": "fee.contract.master" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", + "typeString": "literal_string \"fee.contract.master\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 2667, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "26052:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26052:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26052:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2666, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "26042:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26042:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26029:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2676, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2665, + "src": "26129:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2673, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2659, + "src": "26105:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "26105:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5164, + "src": "26105:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26105:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2663, + "id": 2678, + "nodeType": "Return", + "src": "26098:34:8" + } + ] + }, + "documentation": "@notice Get the master fee contract set via the TokenIOAuthority contract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}", + "id": 2680, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMasterFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2659, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2680, + "src": "25954:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2658, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "25954:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25953:19:8" + }, + "payable": false, + "returnParameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2662, + "name": "masterFeeContract", + "nodeType": "VariableDeclaration", + "scope": 2680, + "src": "25996:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25996:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25995:27:8" + }, + "scope": 4606, + "src": "25924:213:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2719, + "nodeType": "Block", + "src": "26836:252:8", + "statements": [ + { + "assignments": [ + 2690 + ], + "declarations": [ + { + "constant": false, + "id": 2690, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26842:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2689, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "26842:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2698, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6163636f756e74", + "id": 2694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26882:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + "value": "fee.account" + }, + { + "argumentTypes": null, + "id": 2695, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2684, + "src": "26897:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", + "typeString": "literal_string \"fee.account\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2692, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "26865:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26865:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26865:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2691, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "26855:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26855:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26842:72:8" + }, + { + "assignments": [ + 2700 + ], + "declarations": [ + { + "constant": false, + "id": 2700, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26921:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26921:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2706, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2704, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2690, + "src": "26966:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2701, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2682, + "src": "26942:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2702, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "26942:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 5164, + "src": "26942:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 2705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26942:27:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26921:48:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2707, + "name": "feeAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2700, + "src": "26979:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26993:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "26979:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2717, + "nodeType": "Block", + "src": "27052:32:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2715, + "name": "feeAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2700, + "src": "27067:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2688, + "id": 2716, + "nodeType": "Return", + "src": "27060:17:8" + } + ] + }, + "id": 2718, + "nodeType": "IfStatement", + "src": "26975:109:8", + "trueBody": { + "id": 2714, + "nodeType": "Block", + "src": "26998:48:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2711, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2682, + "src": "27034:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + ], + "id": 2710, + "name": "getMasterFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2680, + "src": "27013:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer) view returns (address)" + } + }, + "id": 2712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27013:26:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2688, + "id": 2713, + "nodeType": "Return", + "src": "27006:33:8" + } + ] + } + } + ] + }, + "documentation": "@notice Get the fee contract set for a contract interface\n@dev | This method has an `internal` view\n@dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n@dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}", + "id": 2720, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2682, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26748:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2681, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "26748:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2684, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26767:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2683, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26767:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26747:44:8" + }, + "payable": false, + "returnParameters": { + "id": 2688, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2687, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 2720, + "src": "26815:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2686, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26815:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26814:21:8" + }, + "scope": 4606, + "src": "26724:364:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2745, + "nodeType": "Block", + "src": "27551:114:8", + "statements": [ + { + "assignments": [ + 2730 + ], + "declarations": [ + { + "constant": false, + "id": 2730, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2746, + "src": "27557:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2729, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "27557:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2738, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 2734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27597:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 2735, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2724, + "src": "27613:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2732, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "27580:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27580:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27580:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2731, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "27570:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27570:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27557:66:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2742, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2730, + "src": "27657:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2739, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2722, + "src": "27636:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "27636:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "27636:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27636:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2728, + "id": 2744, + "nodeType": "Return", + "src": "27629:31:8" + } + ] + }, + "documentation": "@notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"supply\" : \"Returns the token supply of the given currency\"}", + "id": 2746, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2725, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2722, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2746, + "src": "27479:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2721, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "27479:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2724, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2746, + "src": "27498:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2723, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "27498:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27478:36:8" + }, + "payable": false, + "returnParameters": { + "id": 2728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2727, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 2746, + "src": "27538:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2726, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "27538:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27537:13:8" + }, + "scope": 4606, + "src": "27455:210:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "28192:189:8", + "statements": [ + { + "assignments": [ + 2760 + ], + "declarations": [ + { + "constant": false, + "id": 2760, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28198:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2759, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "28198:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2776, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28238:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 2765, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2750, + "src": "28257:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2767, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2748, + "src": "28287:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2768, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2752, + "src": "28293:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2766, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "28267:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28267:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2771, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2748, + "src": "28323:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2772, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2754, + "src": "28329:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2770, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "28303:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28303:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2762, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "28221:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28221:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28221:117:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2761, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "28211:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28211:128:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28198:141:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2780, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2760, + "src": "28373:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2777, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2748, + "src": "28352:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2778, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "28352:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "28352:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28352:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2758, + "id": 2782, + "nodeType": "Return", + "src": "28345:31:8" + } + ] + }, + "documentation": "@notice Get the token spender allowance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param spender Ethereum address of spender\n@return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}", + "id": 2784, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2755, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2748, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28083:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2747, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "28083:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2750, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28102:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2749, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28102:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2752, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28119:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2751, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28119:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2754, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28136:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2753, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28136:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28082:70:8" + }, + "payable": false, + "returnParameters": { + "id": 2758, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2757, + "name": "allowance", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "28176:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2756, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "28176:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28175:16:8" + }, + "scope": 4606, + "src": "28056:325:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2815, + "nodeType": "Block", + "src": "28904:151:8", + "statements": [ + { + "assignments": [ + 2796 + ], + "declarations": [ + { + "constant": false, + "id": 2796, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28910:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "28910:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2808, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 2800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28950:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 2801, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "28967:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2803, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2786, + "src": "28997:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2804, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2790, + "src": "29003:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2802, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "28977:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28977:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2798, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "28933:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28933:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28933:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2797, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "28923:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28923:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28910:103:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2812, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2796, + "src": "29047:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2809, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2786, + "src": "29026:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "29026:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "29026:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29026:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2794, + "id": 2814, + "nodeType": "Return", + "src": "29019:31:8" + } + ] + }, + "documentation": "@notice Get the token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"balance\" : \"Return the balance of a given account for a specified currency\"}", + "id": 2816, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2791, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2786, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28814:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2785, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "28814:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2788, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28833:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2787, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28833:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2790, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28850:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28850:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28813:53:8" + }, + "payable": false, + "returnParameters": { + "id": 2794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2793, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 2816, + "src": "28890:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2792, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "28890:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28889:14:8" + }, + "scope": 4606, + "src": "28789:266:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2847, + "nodeType": "Block", + "src": "29610:150:8", + "statements": [ + { + "assignments": [ + 2828 + ], + "declarations": [ + { + "constant": false, + "id": 2828, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29616:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2827, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "29616:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2840, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e66726f7a656e", + "id": 2832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29656:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + "value": "token.frozen" + }, + { + "argumentTypes": null, + "id": 2833, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2820, + "src": "29672:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2835, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "29702:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2836, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2822, + "src": "29708:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2834, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "29682:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29682:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2830, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "29639:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29639:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29639:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2829, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "29629:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29629:89:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "29616:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2844, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2828, + "src": "29752:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2841, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "29731:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2842, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "29731:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "29731:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29731:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2826, + "id": 2846, + "nodeType": "Return", + "src": "29724:31:8" + } + ] + }, + "documentation": "@notice Get the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}", + "id": 2848, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenFrozenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2823, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2818, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29514:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2817, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "29514:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2820, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29533:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2819, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29533:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2822, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29550:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2821, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29550:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29513:53:8" + }, + "payable": false, + "returnParameters": { + "id": 2826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2825, + "name": "frozenBalance", + "nodeType": "VariableDeclaration", + "scope": 2848, + "src": "29590:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2824, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "29590:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29589:20:8" + }, + "scope": 4606, + "src": "29483:277:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2887, + "nodeType": "Block", + "src": "30356:303:8", + "statements": [ + { + "assignments": [ + 2862 + ], + "declarations": [ + { + "constant": false, + "id": 2862, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30362:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2861, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "30362:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2874, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e66726f7a656e", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30402:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + "value": "token.frozen" + }, + { + "argumentTypes": null, + "id": 2867, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2852, + "src": "30418:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2869, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2850, + "src": "30448:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 2870, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2854, + "src": "30454:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2868, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "30428:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30428:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", + "typeString": "literal_string \"token.frozen\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2864, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "30385:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30385:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30385:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2863, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "30375:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30375:89:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30362:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2879, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "30506:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 2880, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2856, + "src": "30510:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2876, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2850, + "src": "30485:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "30485:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "30485:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 2881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30485:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 2882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30525:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 2875, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "30470:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30470:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2884, + "nodeType": "ExpressionStatement", + "src": "30470:167:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30650:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2860, + "id": 2886, + "nodeType": "Return", + "src": "30643:11:8" + } + ] + }, + "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Amount of tokens to freeze for account\n@return { \"success\" : \"Return true if successfully called from another contract\"}", + "id": 2888, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTokenFrozenBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2857, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2850, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30258:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2849, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "30258:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2852, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30277:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2851, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "30277:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2854, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30294:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2853, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30294:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2856, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30311:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2855, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "30311:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30257:66:8" + }, + "payable": false, + "returnParameters": { + "id": 2860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2859, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 2888, + "src": "30342:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2858, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30342:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30341:14:8" + }, + "scope": 4606, + "src": "30227:432:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 2987, + "nodeType": "Block", + "src": "31190:598:8", + "statements": [ + { + "assignments": [ + 2900 + ], + "declarations": [ + { + "constant": false, + "id": 2900, + "name": "maxFee", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31197:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2899, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31197:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2912, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d6178", + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31259:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + "value": "fee.max" + }, + { + "argumentTypes": null, + "id": 2908, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "31270:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", + "typeString": "literal_string \"fee.max\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2905, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "31242:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31242:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31242:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2904, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "31232:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31232:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2901, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2890, + "src": "31211:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2902, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "31211:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "31211:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31211:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31197:91:8" + }, + { + "assignments": [ + 2914 + ], + "declarations": [ + { + "constant": false, + "id": 2914, + "name": "minFee", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31294:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2913, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31294:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2926, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e6d696e", + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31356:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + "value": "fee.min" + }, + { + "argumentTypes": null, + "id": 2922, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "31367:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", + "typeString": "literal_string \"fee.min\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2919, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "31339:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2920, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31339:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31339:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2918, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "31329:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31329:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2915, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2890, + "src": "31308:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2916, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "31308:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "31308:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31308:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31294:91:8" + }, + { + "assignments": [ + 2928 + ], + "declarations": [ + { + "constant": false, + "id": 2928, + "name": "bpsFee", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31391:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2927, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31391:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2940, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e627073", + "id": 2935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31453:9:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + "value": "fee.bps" + }, + { + "argumentTypes": null, + "id": 2936, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "31464:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", + "typeString": "literal_string \"fee.bps\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2933, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "31436:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31436:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31436:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2932, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "31426:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31426:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2929, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2890, + "src": "31405:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "31405:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "31405:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31405:77:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31391:91:8" + }, + { + "assignments": [ + 2942 + ], + "declarations": [ + { + "constant": false, + "id": 2942, + "name": "flatFee", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31488:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2941, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31488:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2954, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6665652e666c6174", + "id": 2949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31551:10:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + "value": "fee.flat" + }, + { + "argumentTypes": null, + "id": 2950, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "31563:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", + "typeString": "literal_string \"fee.flat\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2947, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "31534:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31534:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31534:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2946, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "31524:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31524:56:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2943, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2890, + "src": "31503:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 2944, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "31503:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 2945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "31503:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 2953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31503:78:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31488:93:8" + }, + { + "assignments": [ + 2956 + ], + "declarations": [ + { + "constant": false, + "id": 2956, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31587:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2955, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31587:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2969, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2967, + "name": "flatFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2942, + "src": "31637:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 2963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31625:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2959, + "name": "bpsFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2928, + "src": "31612:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2957, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2894, + "src": "31601:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "31601:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31601:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2961, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31600:20:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "31600:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31600:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2965, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31599:33:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "31599:37:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31599:46:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31587:58:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2970, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2956, + "src": "31656:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 2971, + "name": "maxFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2900, + "src": "31663:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31656:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2976, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2956, + "src": "31709:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2977, + "name": "minFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2914, + "src": "31716:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31709:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2984, + "nodeType": "Block", + "src": "31758:26:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2982, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2956, + "src": "31773:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2898, + "id": 2983, + "nodeType": "Return", + "src": "31766:11:8" + } + ] + }, + "id": 2985, + "nodeType": "IfStatement", + "src": "31705:79:8", + "trueBody": { + "id": 2981, + "nodeType": "Block", + "src": "31724:28:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2979, + "name": "minFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2914, + "src": "31739:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2898, + "id": 2980, + "nodeType": "Return", + "src": "31732:13:8" + } + ] + } + }, + "id": 2986, + "nodeType": "IfStatement", + "src": "31652:132:8", + "trueBody": { + "id": 2975, + "nodeType": "Block", + "src": "31671:28:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2973, + "name": "maxFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2900, + "src": "31686:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2898, + "id": 2974, + "nodeType": "Return", + "src": "31679:13:8" + } + ] + } + } + ] + }, + "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the fee contract\n@param amount Transaction value\n@return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }", + "id": 2988, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2890, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31089:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2889, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "31089:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2892, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31108:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2891, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31108:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2894, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31133:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2893, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31133:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31088:57:8" + }, + "payable": false, + "returnParameters": { + "id": 2898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2897, + "name": "calculatedFees", + "nodeType": "VariableDeclaration", + "scope": 2988, + "src": "31169:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2896, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "31169:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31168:21:8" + }, + "scope": 4606, + "src": "31066:722:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3017, + "nodeType": "Block", + "src": "32388:334:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3001, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "32423:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3002, + "name": "accountA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2992, + "src": "32429:8:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3000, + "name": "verifyAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3046, + "src": "32409:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32409:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", + "id": 3004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32446:92:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + }, + "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + } + ], + "id": 2999, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "32394:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32394:150:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3006, + "nodeType": "ExpressionStatement", + "src": "32394:150:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3009, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "32579:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3010, + "name": "accountB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2994, + "src": "32585:8:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3008, + "name": "verifyAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3046, + "src": "32565:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32565:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", + "id": 3012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32602:92:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + }, + "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", + "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" + } + ], + "id": 3007, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "32550:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32550:150:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3014, + "nodeType": "ExpressionStatement", + "src": "32550:150:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32713:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2998, + "id": 3016, + "nodeType": "Return", + "src": "32706:11:8" + } + ] + }, + "documentation": "@notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param accountA Ethereum address of first account holder to verify\n@param accountB Ethereum address of second account holder to verify\n@return { \"verified\" : \"Returns true if both accounts are successfully verified\" }", + "id": 3018, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "verifyAccounts", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2990, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "32295:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 2989, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "32295:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2992, + "name": "accountA", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "32314:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2991, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32314:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2994, + "name": "accountB", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "32332:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2993, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32332:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32294:55:8" + }, + "payable": false, + "returnParameters": { + "id": 2998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2997, + "name": "verified", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "32373:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2996, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "32373:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32372:15:8" + }, + "scope": 4606, + "src": "32271:451:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3045, + "nodeType": "Block", + "src": "33212:262:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3029, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3020, + "src": "33248:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3030, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3022, + "src": "33254:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3028, + "name": "getKYCApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2311, + "src": "33233:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33233:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e7420646f6573206e6f742068617665204b594320617070726f76616c2e", + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33270:44:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", + "typeString": "literal_string \"Error: Account does not have KYC approval.\"" + }, + "value": "Error: Account does not have KYC approval." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", + "typeString": "literal_string \"Error: Account does not have KYC approval.\"" + } + ], + "id": 3027, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "33218:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33218:102:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3034, + "nodeType": "ExpressionStatement", + "src": "33218:102:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3037, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3020, + "src": "33358:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3038, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3022, + "src": "33364:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3036, + "name": "getAccountStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2340, + "src": "33341:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" + } + }, + "id": 3039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33341:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e7420737461747573206973206066616c7365602e204163636f756e7420737461747573206d757374206265206074727565602e", + "id": 3040, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33380:66:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", + "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" + }, + "value": "Error: Account status is `false`. Account status must be `true`." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", + "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" + } + ], + "id": 3035, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "33326:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33326:126:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3042, + "nodeType": "ExpressionStatement", + "src": "33326:126:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3043, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33465:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3026, + "id": 3044, + "nodeType": "Return", + "src": "33458:11:8" + } + ] + }, + "documentation": "@notice Verified KYC and global status for a single account and return true or throw if account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder to verify\n@return { \"verified\" : \"Returns true if account is successfully verified\" }", + "id": 3046, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "verifyAccount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3023, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3020, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3046, + "src": "33138:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3019, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "33138:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3022, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3046, + "src": "33157:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3021, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33157:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33137:36:8" + }, + "payable": false, + "returnParameters": { + "id": 3026, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3025, + "name": "verified", + "nodeType": "VariableDeclaration", + "scope": 3046, + "src": "33197:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3024, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33197:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33196:15:8" + }, + "scope": 4606, + "src": "33115:359:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3139, + "nodeType": "Block", + "src": "34344:799:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3063, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3052, + "src": "34366:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34358:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34358:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34373:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "34358:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f6020616464726573732063616e6e6f74206265206e756c6c2e", + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34378:37:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", + "typeString": "literal_string \"Error: `to` address cannot be null.\"" + }, + "value": "Error: `to` address cannot be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", + "typeString": "literal_string \"Error: `to` address cannot be null.\"" + } + ], + "id": 3061, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34350:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34350:67:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3069, + "nodeType": "ExpressionStatement", + "src": "34350:67:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3071, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3054, + "src": "34431:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34440:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "34431:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060616d6f756e7460206d7573742062652067726561746572207468616e207a65726f", + "id": 3074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34443:43:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", + "typeString": "literal_string \"Error: `amount` must be greater than zero\"" + }, + "value": "Error: `amount` must be greater than zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", + "typeString": "literal_string \"Error: `amount` must be greater than zero\"" + } + ], + "id": 3070, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34423:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34423:64:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3076, + "nodeType": "ExpressionStatement", + "src": "34423:64:8" + }, + { + "assignments": [ + 3078 + ], + "declarations": [ + { + "constant": false, + "id": 3078, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34494:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34494:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3085, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3080, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34531:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3082, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "34545:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 3081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34537:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34537:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3079, + "name": "getFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2720, + "src": "34516:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34516:35:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34494:57:8" + }, + { + "assignments": [ + 3087 + ], + "declarations": [ + { + "constant": false, + "id": 3087, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34557:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3086, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "34557:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3093, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3089, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34583:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3090, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "34589:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3091, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3054, + "src": "34602:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3088, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2988, + "src": "34569:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 3092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34569:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34557:52:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3096, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34656:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3097, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "34662:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "34662:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3100, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34689:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3101, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3050, + "src": "34695:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3102, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3054, + "src": "34705:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3099, + "name": "getFxUSDAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4605, + "src": "34674:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 3103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34674:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3095, + "name": "setAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "34631:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34631:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d6f756e7420666f72206163636f756e742e", + "id": 3105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34721:51:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", + "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" + }, + "value": "Error: Unable to set spending amount for account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", + "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" + } + ], + "id": 3094, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34616:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34616:157:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3107, + "nodeType": "ExpressionStatement", + "src": "34616:157:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3110, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34809:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3111, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3050, + "src": "34815:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3112, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "34825:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "34825:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3114, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3052, + "src": "34837:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3115, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3054, + "src": "34841:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3116, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3056, + "src": "34849:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3109, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "34795:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34795:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 3118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34862:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 3108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34780:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34780:128:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3120, + "nodeType": "ExpressionStatement", + "src": "34780:128:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3123, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "34986:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3124, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3050, + "src": "34992:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3125, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "35002:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "35002:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3127, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "35014:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3128, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3087, + "src": "35027:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3130, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "35043:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3131, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "35049:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3129, + "name": "getFeeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2626, + "src": "35033:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35033:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3122, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "34972:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34972:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35070:49:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 3121, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "34957:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34957:163:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3136, + "nodeType": "ExpressionStatement", + "src": "34957:163:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35134:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3060, + "id": 3138, + "nodeType": "Return", + "src": "35127:11:8" + } + ] + }, + "documentation": "@notice Transfer an amount of currency token from msg.sender account to another specified account\n@dev This function is called by an interface that is accessible directly to the account holder\n@dev | This method has an `internal` view\n@dev | This method uses `forceTransfer()` low-level api\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3140, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3048, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34239:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3047, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "34239:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3050, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34258:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3049, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "34258:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3052, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34275:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34275:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3054, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34287:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3053, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "34287:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3056, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34300:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3055, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "34300:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34238:73:8" + }, + "payable": false, + "returnParameters": { + "id": 3060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3059, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3140, + "src": "34330:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3058, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "34330:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34329:14:8" + }, + "scope": 4606, + "src": "34221:922:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3235, + "nodeType": "Block", + "src": "36400:1060:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3159, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3148, + "src": "36429:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36421:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36421:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36436:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "36421:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", + "id": 3163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36447:39:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + }, + "value": "Error: `to` address must not be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + } + ], + "id": 3157, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "36406:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36406:86:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3165, + "nodeType": "ExpressionStatement", + "src": "36406:86:8" + }, + { + "assignments": [ + 3167 + ], + "declarations": [ + { + "constant": false, + "id": 3167, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36499:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36499:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3174, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3169, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36536:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "36550:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36542:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36542:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3168, + "name": "getFeeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2720, + "src": "36521:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36521:35:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36499:57:8" + }, + { + "assignments": [ + 3176 + ], + "declarations": [ + { + "constant": false, + "id": 3176, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36562:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3175, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "36562:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3182, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3178, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36588:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3179, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3167, + "src": "36594:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3180, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3150, + "src": "36607:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3177, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2988, + "src": "36574:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36574:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36562:52:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3185, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36754:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3186, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3146, + "src": "36760:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3188, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36781:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3189, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3144, + "src": "36787:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3190, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3150, + "src": "36797:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3187, + "name": "getFxUSDAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4605, + "src": "36766:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36766:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3184, + "name": "setAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "36729:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36729:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36813:47:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + }, + "value": "Error: Unable to set account spending amount." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + } + ], + "id": 3183, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "36714:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36714:152:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3195, + "nodeType": "ExpressionStatement", + "src": "36714:152:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3198, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "36946:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3199, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3144, + "src": "36952:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3200, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3146, + "src": "36962:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3201, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3148, + "src": "36968:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3202, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3150, + "src": "36972:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3203, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "36980:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3197, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "36932:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36932:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36993:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 3196, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "36917:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36917:127:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3207, + "nodeType": "ExpressionStatement", + "src": "36917:127:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3210, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "37122:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3211, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3144, + "src": "37128:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3212, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3146, + "src": "37138:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3213, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3167, + "src": "37144:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3214, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "37157:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3216, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "37173:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3217, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3167, + "src": "37179:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3215, + "name": "getFeeMsg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2626, + "src": "37163:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 3218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37163:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3209, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "37108:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37108:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37200:49:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 3208, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "37093:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37093:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3222, + "nodeType": "ExpressionStatement", + "src": "37093:162:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3225, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3142, + "src": "37346:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3226, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3144, + "src": "37352:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3227, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3146, + "src": "37362:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3228, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3150, + "src": "37368:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3224, + "name": "updateAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3387, + "src": "37330:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256) returns (bool)" + } + }, + "id": 3229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37330:45:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e636520666f72207370656e6465722e", + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37383:48:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", + "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" + }, + "value": "Error: Unable to update allowance for spender." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", + "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" + } + ], + "id": 3223, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "37315:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37315:122:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3232, + "nodeType": "ExpressionStatement", + "src": "37315:122:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37451:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3156, + "id": 3234, + "nodeType": "Return", + "src": "37444:11:8" + } + ] + }, + "documentation": "@notice Transfer an amount of currency token from account to another specified account via an approved spender account\n@dev This function is called by an interface that is accessible directly to the account spender\n@dev | This method has an `internal` view\n@dev | Transactions will fail if the spending amount exceeds the daily limit\n@dev | This method uses `forceTransfer()` low-level api\n@dev | This method implements ERC20 transferFrom() method with approved spender behavior\n@dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3236, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3142, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36281:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3141, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "36281:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3144, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36300:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3143, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "36300:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3146, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36317:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3145, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36317:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3148, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36331:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3147, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36331:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3150, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36343:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3149, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "36343:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3152, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36356:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3151, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "36356:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36280:87:8" + }, + "payable": false, + "returnParameters": { + "id": 3156, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3155, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3236, + "src": "36386:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3154, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "36386:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36385:14:8" + }, + "scope": 4606, + "src": "36259:1201:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3334, + "nodeType": "Block", + "src": "38349:801:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3255, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3244, + "src": "38378:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "38370:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38370:11:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38385:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "38370:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", + "id": 3259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38396:39:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + }, + "value": "Error: `to` address must not be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", + "typeString": "literal_string \"Error: `to` address must not be null.\"" + } + ], + "id": 3253, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "38355:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38355:86:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3261, + "nodeType": "ExpressionStatement", + "src": "38355:86:8" + }, + { + "assignments": [ + 3263 + ], + "declarations": [ + { + "constant": false, + "id": 3263, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38448:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3262, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38448:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3275, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38490:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3268, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3240, + "src": "38507:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3270, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38537:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3271, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3242, + "src": "38543:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3269, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "38517:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38517:31:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3265, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "38473:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "38473:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38473:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3264, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "38463:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38463:87:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38448:102:8" + }, + { + "assignments": [ + 3277 + ], + "declarations": [ + { + "constant": false, + "id": 3277, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38556:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3276, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38556:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3289, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38598:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3282, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3240, + "src": "38615:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3284, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38645:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3285, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3244, + "src": "38651:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3283, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "38625:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38625:29:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3279, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "38581:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "38581:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38581:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3278, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "38571:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38571:85:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38556:100:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3294, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3263, + "src": "38699:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3301, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "38736:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3298, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3263, + "src": "38726:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3295, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38705:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "38705:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "38705:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38705:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "38705:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38705:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3291, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38678:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3292, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "38678:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "38678:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38678:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38752:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "38663:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38663:202:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3306, + "nodeType": "ExpressionStatement", + "src": "38663:202:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3311, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3277, + "src": "38907:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3318, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "38944:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3315, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3277, + "src": "38934:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3312, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38913:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3313, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "38913:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "38913:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38913:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "38913:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38913:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3308, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3238, + "src": "38886:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "38886:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "38886:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38886:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38960:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3307, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "38871:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38871:202:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3323, + "nodeType": "ExpressionStatement", + "src": "38871:202:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3325, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3240, + "src": "39094:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3326, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3242, + "src": "39104:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3327, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3244, + "src": "39110:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3328, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "39114:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3329, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3248, + "src": "39122:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3324, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1670, + "src": "39085:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,address,uint256,bytes memory)" + } + }, + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39085:42:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3331, + "nodeType": "EmitStatement", + "src": "39080:47:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39141:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3252, + "id": 3333, + "nodeType": "Return", + "src": "39134:11:8" + } + ] + }, + "documentation": "@notice Low-level transfer method\n@dev | This method has an `internal` view\n@dev | This method does not include fees or approved allowances.\n@dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3335, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "forceTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3238, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38230:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3237, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "38230:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3240, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38249:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3239, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "38249:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3242, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38266:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3241, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3244, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38280:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38280:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3246, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38292:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "38292:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3248, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38305:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3247, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "38305:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38229:87:8" + }, + "payable": false, + "returnParameters": { + "id": 3252, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3251, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3335, + "src": "38335:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3250, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "38335:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38334:14:8" + }, + "scope": 4606, + "src": "38207:943:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3386, + "nodeType": "Block", + "src": "39827:376:8", + "statements": [ + { + "assignments": [ + 3349 + ], + "declarations": [ + { + "constant": false, + "id": 3349, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39833:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3348, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39833:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3366, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 3353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39873:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 3354, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3339, + "src": "39892:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3356, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3337, + "src": "39922:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3357, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3341, + "src": "39928:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3355, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "39902:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39902:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3360, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3337, + "src": "39958:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3361, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "39964:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "39964:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3359, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "39938:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39938:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "39856:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "39856:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39856:120:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3350, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "39846:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39846:131:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39833:144:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3371, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3349, + "src": "40019:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3378, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3343, + "src": "40052:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3375, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3349, + "src": "40044:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3372, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3337, + "src": "40023:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3373, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "40023:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "40023:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40023:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "40023:28:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40023:36:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3368, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3337, + "src": "39998:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3369, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "39998:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "39998:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39998:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40068:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3367, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "39983:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39983:198:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3383, + "nodeType": "ExpressionStatement", + "src": "39983:198:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40194:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3347, + "id": 3385, + "nodeType": "Return", + "src": "40187:11:8" + } + ] + }, + "documentation": "@notice Low-level method to update spender allowance for account\n@dev | This method is called inside the `transferFrom()` method\n@dev | msg.sender == spender address\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Value to reduce allowance by (i.e. the amount spent)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3387, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updateAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3337, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39729:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3336, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "39729:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3339, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39748:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3338, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "39748:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3341, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39765:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3340, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39765:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3343, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39782:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3342, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "39782:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39728:66:8" + }, + "payable": false, + "returnParameters": { + "id": 3347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3346, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3387, + "src": "39813:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3345, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "39813:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39812:14:8" + }, + "scope": 4606, + "src": "39704:499:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3507, + "nodeType": "Block", + "src": "40767:1110:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3399, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3391, + "src": "40781:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40792:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "40781:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20607370656e6465726020616464726573732063616e6e6f74206265206e756c6c2e", + "id": 3402, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40805:42:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", + "typeString": "literal_string \"Error: `spender` address cannot be null.\"" + }, + "value": "Error: `spender` address cannot be null." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", + "typeString": "literal_string \"Error: `spender` address cannot be null.\"" + } + ], + "id": 3398, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "40773:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40773:75:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3404, + "nodeType": "ExpressionStatement", + "src": "40773:75:8" + }, + { + "assignments": [ + 3406 + ], + "declarations": [ + { + "constant": false, + "id": 3406, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40855:22:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3405, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "40855:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3413, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3408, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "40895:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3410, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "40909:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + ], + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "40901:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40901:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3407, + "name": "getTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2418, + "src": "40880:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40880:35:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40855:60:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3416, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "40959:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3417, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3406, + "src": "40965:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3419, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "40995:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3420, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3391, + "src": "41001:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3418, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "40975:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40975:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3415, + "name": "getTokenFrozenBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2848, + "src": "40937:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" + } + }, + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40937:73:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41014:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "40937:78:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205370656e646572206d757374206e6f74206861766520612066726f7a656e2062616c616e6365206469726563746c79", + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41023:56:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", + "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" + }, + "value": "Error: Spender must not have a frozen balance directly" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", + "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" + } + ], + "id": 3414, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "40922:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "40922:158:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3427, + "nodeType": "ExpressionStatement", + "src": "40922:158:8" + }, + { + "assignments": [ + 3429 + ], + "declarations": [ + { + "constant": false, + "id": 3429, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "41087:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3428, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41087:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3446, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e616c6c6f77616e6365", + "id": 3433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41129:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + "value": "token.allowance" + }, + { + "argumentTypes": null, + "id": 3434, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3406, + "src": "41148:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3436, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41178:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3437, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "41184:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41184:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3435, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "41158:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41158:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3441, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41217:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3442, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3391, + "src": "41223:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3440, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "41197:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41197:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", + "typeString": "literal_string \"token.allowance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3431, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "41112:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41112:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41112:120:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3430, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "41102:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41102:131:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41087:146:8" + }, + { + "assignments": [ + 3448 + ], + "declarations": [ + { + "constant": false, + "id": 3448, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "41239:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3447, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41239:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3461, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41281:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3453, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3406, + "src": "41298:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3455, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41328:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3456, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "41334:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41334:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3454, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "41308:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41308:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3450, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "41264:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3451, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41264:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41264:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3449, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "41254:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41254:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41239:108:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3466, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3429, + "src": "41390:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3463, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41369:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3464, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "41369:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "41369:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41369:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41399:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "41369:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3470, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "41404:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41414:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "41404:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "41369:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283029206265666f72652073657474696e6720616e207570646174656420616c6c6f77616e636520666f72207370656e6465722e", + "id": 3474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41423:84:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", + "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" + }, + "value": "Error: Allowance must be zero (0) before setting an updated allowance for spender." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", + "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" + } + ], + "id": 3462, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "41354:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41354:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3476, + "nodeType": "ExpressionStatement", + "src": "41354:154:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3481, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3448, + "src": "41551:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3478, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41530:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "41530:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "41530:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41530:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3483, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "41560:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41530:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d73672e73656e64657220746f6b656e2062616c616e63652e", + "id": 3485, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41574:58:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", + "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" + }, + "value": "Error: Allowance cannot exceed msg.sender token balance." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", + "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" + } + ], + "id": 3477, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "41515:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41515:118:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3487, + "nodeType": "ExpressionStatement", + "src": "41515:118:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3492, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3429, + "src": "41676:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3493, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "41682:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3489, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3389, + "src": "41655:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3490, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "41655:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "41655:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41655:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41697:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3488, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "41640:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41640:165:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3497, + "nodeType": "ExpressionStatement", + "src": "41640:165:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3499, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "41826:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "41826:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3501, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3391, + "src": "41838:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3502, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "41847:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3498, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1638, + "src": "41817:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "41817:37:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3504, + "nodeType": "EmitStatement", + "src": "41812:42:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41868:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3397, + "id": 3506, + "nodeType": "Return", + "src": "41861:11:8" + } + ] + }, + "documentation": "@notice Low-level method to set the allowance for a spender\n@dev | This method is called inside the `approve()` ERC20 method\n@dev | msg.sender == account holder\n@param self Internal storage proxying TokenIOStorage contract\n@param spender Ethereum address of account spender\n@param amount Value to set for spender allowance\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3508, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approveAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3389, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40686:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3388, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "40686:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3391, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40705:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40705:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3393, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40722:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3392, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "40722:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "40685:49:8" + }, + "payable": false, + "returnParameters": { + "id": 3397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3396, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3508, + "src": "40753:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3395, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "40753:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "40752:14:8" + }, + "scope": 4606, + "src": "40660:1217:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3618, + "nodeType": "Block", + "src": "42704:943:8", + "statements": [ + { + "assignments": [ + 3524 + ], + "declarations": [ + { + "constant": false, + "id": 3524, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42710:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3523, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42710:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3536, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3528, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42752:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3529, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "42769:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3531, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "42799:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3532, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3514, + "src": "42805:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3530, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "42779:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42779:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3526, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "42735:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42735:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42735:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3525, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "42725:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42725:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42710:105:8" + }, + { + "assignments": [ + 3538 + ], + "declarations": [ + { + "constant": false, + "id": 3538, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42821:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3537, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42821:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3547, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e697373756564", + "id": 3542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42863:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + "value": "token.issued" + }, + { + "argumentTypes": null, + "id": 3543, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "42879:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3544, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3518, + "src": "42889:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3540, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "42846:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42846:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42846:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3539, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "42836:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42836:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42821:80:8" + }, + { + "assignments": [ + 3549 + ], + "declarations": [ + { + "constant": false, + "id": 3549, + "name": "id_c", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42907:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3548, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "42907:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3557, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 3553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42949:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 3554, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "42965:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3551, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "42932:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "42932:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42932:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3550, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "42922:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42922:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "42907:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3562, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3524, + "src": "43012:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3569, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3516, + "src": "43049:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3566, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3524, + "src": "43039:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3563, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43018:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3564, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43018:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "43018:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43018:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43018:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43018:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3559, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "42991:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3560, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "42991:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "42991:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42991:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43065:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3558, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "42983:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "42983:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3574, + "nodeType": "ExpressionStatement", + "src": "42983:190:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3579, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3538, + "src": "43208:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3586, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3516, + "src": "43245:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3583, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3538, + "src": "43235:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3580, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43214:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3581, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43214:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "43214:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43214:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43214:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43214:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3576, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43187:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3577, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43187:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "43187:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43187:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43261:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3575, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "43179:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43179:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3591, + "nodeType": "ExpressionStatement", + "src": "43179:190:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3596, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3549, + "src": "43404:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3603, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3516, + "src": "43441:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3600, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3549, + "src": "43431:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3597, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43410:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3598, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43410:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "43410:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43410:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "43410:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43410:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3593, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "43383:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "43383:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "43383:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43383:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43457:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3592, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "43375:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43375:190:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3608, + "nodeType": "ExpressionStatement", + "src": "43375:190:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3610, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "43585:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3611, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3514, + "src": "43595:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3612, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3516, + "src": "43604:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3613, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3518, + "src": "43612:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3609, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1648, + "src": "43577:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,uint256,string memory)" + } + }, + "id": 3614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43577:46:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3615, + "nodeType": "EmitStatement", + "src": "43572:51:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43637:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3522, + "id": 3617, + "nodeType": "Return", + "src": "43630:11:8" + } + ] + }, + "documentation": "@notice Deposit an amount of currency into the Ethereum account holder\n@dev | The total supply of the token increases only when new funds are deposited 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to deposit for account\n@param issuerFirm Name of the issuing firm authorizing the deposit\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3619, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3510, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42587:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3509, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "42587:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3512, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42606:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3511, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "42606:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3514, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42623:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "42623:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3516, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42640:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3515, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "42640:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3518, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42653:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3517, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "42653:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "42586:85:8" + }, + "payable": false, + "returnParameters": { + "id": 3522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3521, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3619, + "src": "42690:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3520, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42690:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "42689:14:8" + }, + "scope": 4606, + "src": "42570:1077:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3729, + "nodeType": "Block", + "src": "44478:1002:8", + "statements": [ + { + "assignments": [ + 3635 + ], + "declarations": [ + { + "constant": false, + "id": 3635, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44484:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44484:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3647, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e62616c616e6365", + "id": 3639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44526:15:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + "value": "token.balance" + }, + { + "argumentTypes": null, + "id": 3640, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "44543:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3642, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "44573:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3643, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3625, + "src": "44579:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3641, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "44553:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44553:34:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", + "typeString": "literal_string \"token.balance\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3637, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "44509:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44509:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44509:79:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3636, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "44499:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44499:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44484:105:8" + }, + { + "assignments": [ + 3649 + ], + "declarations": [ + { + "constant": false, + "id": 3649, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44595:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3648, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44595:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3658, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e697373756564", + "id": 3653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44637:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + "value": "token.issued" + }, + { + "argumentTypes": null, + "id": 3654, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "44653:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3655, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3629, + "src": "44663:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", + "typeString": "literal_string \"token.issued\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3651, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "44620:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44620:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44620:54:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3650, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "44610:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44610:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44595:80:8" + }, + { + "assignments": [ + 3660 + ], + "declarations": [ + { + "constant": false, + "id": 3660, + "name": "id_c", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44719:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3659, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "44719:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3668, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "746f6b656e2e737570706c79", + "id": 3664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44761:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + "value": "token.supply" + }, + { + "argumentTypes": null, + "id": 3665, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "44777:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", + "typeString": "literal_string \"token.supply\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3662, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "44744:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "44744:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44744:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3661, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "44734:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44734:53:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44719:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3673, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3635, + "src": "44830:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3680, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3627, + "src": "44867:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3677, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3635, + "src": "44857:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3674, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "44836:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3675, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "44836:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "44836:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44836:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "44836:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44836:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3670, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "44809:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3671, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "44809:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "44809:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44809:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44883:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3669, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "44794:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44794:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3685, + "nodeType": "ExpressionStatement", + "src": "44794:197:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3690, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3649, + "src": "45033:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3697, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3627, + "src": "45070:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3694, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3649, + "src": "45060:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3691, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "45039:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3692, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "45039:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "45039:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45039:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "45039:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45039:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3687, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "45012:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "45012:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "45012:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45012:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3700, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45086:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3686, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "44997:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "44997:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3702, + "nodeType": "ExpressionStatement", + "src": "44997:197:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3707, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3660, + "src": "45236:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3714, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3627, + "src": "45273:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3711, + "name": "id_c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3660, + "src": "45263:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3708, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "45242:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3709, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "45242:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "45242:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 3712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45242:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "45242:30:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45242:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3704, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3621, + "src": "45215:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3705, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "45215:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "45215:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 3716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45215:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45289:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3703, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "45200:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45200:197:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3719, + "nodeType": "ExpressionStatement", + "src": "45200:197:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3721, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "45418:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3722, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3625, + "src": "45428:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3723, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3627, + "src": "45437:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3724, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3629, + "src": "45445:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3720, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1658, + "src": "45409:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,address,uint256,string memory)" + } + }, + "id": 3725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45409:47:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3726, + "nodeType": "EmitStatement", + "src": "45404:52:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45470:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3633, + "id": 3728, + "nodeType": "Return", + "src": "45463:11:8" + } + ] + }, + "documentation": "@notice Withdraw an amount of currency from the Ethereum account holder\n@dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to withdraw for account\n@param issuerFirm Name of the issuing firm authorizing the withdraw\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3730, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3630, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3621, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44361:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3620, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "44361:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3623, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44380:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3622, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "44380:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3625, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44397:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44397:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3627, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44414:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3626, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "44414:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3629, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44427:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3628, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "44427:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44360:85:8" + }, + "payable": false, + "returnParameters": { + "id": 3633, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3632, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "44464:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3631, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44464:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44463:14:8" + }, + "scope": 4606, + "src": "44343:1137:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3763, + "nodeType": "Block", + "src": "46213:275:8", + "statements": [ + { + "assignments": [ + 3742 + ], + "declarations": [ + { + "constant": false, + "id": 3742, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46219:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3741, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "46219:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3750, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e6669726d", + "id": 3746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46259:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + "value": "registered.firm" + }, + { + "argumentTypes": null, + "id": 3747, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3734, + "src": "46278:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3744, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "46242:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "46242:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46242:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3743, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "46232:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46232:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "46219:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3755, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3742, + "src": "46332:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3756, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3736, + "src": "46336:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3752, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3732, + "src": "46311:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3753, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "46311:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "46311:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 3757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46311:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46353:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3751, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "46296:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "46296:170:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3760, + "nodeType": "ExpressionStatement", + "src": "46296:170:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46479:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3740, + "id": 3762, + "nodeType": "Return", + "src": "46472:11:8" + } + ] + }, + "documentation": "@notice Method for setting a registered issuer firm\n@dev | Only Token, Inc. and other authorized institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered\n@param approved Approval status to set for the firm (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3764, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3737, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3732, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46128:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3731, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "46128:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3734, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46147:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3733, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "46147:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3736, + "name": "approved", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46166:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3735, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "46166:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "46127:53:8" + }, + "payable": false, + "returnParameters": { + "id": 3740, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3739, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "46199:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3738, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "46199:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "46198:14:8" + }, + "scope": 4606, + "src": "46101:387:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3828, + "nodeType": "Block", + "src": "47321:679:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3779, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3766, + "src": "47359:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3780, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3768, + "src": "47365:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3778, + "name": "isRegisteredFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3884, + "src": "47342:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" + } + }, + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47342:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20606973737565724669726d60206d75737420626520726567697374657265642e", + "id": 3782, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47384:41:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", + "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" + }, + "value": "Error: `issuerFirm` must be registered." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", + "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" + } + ], + "id": 3777, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "47327:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47327:99:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3784, + "nodeType": "ExpressionStatement", + "src": "47327:99:8" + }, + { + "assignments": [ + 3786 + ], + "declarations": [ + { + "constant": false, + "id": 3786, + "name": "id_a", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47433:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3785, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47433:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3795, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47475:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "id": 3791, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3768, + "src": "47499:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 3792, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3770, + "src": "47511:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3788, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "47458:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "47458:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47458:70:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3787, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "47448:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47448:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "47433:96:8" + }, + { + "assignments": [ + 3797 + ], + "declarations": [ + { + "constant": false, + "id": 3797, + "name": "id_b", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47535:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3796, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47535:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3805, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f726974792e6669726d", + "id": 3801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47577:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + "value": "registered.authority.firm" + }, + { + "argumentTypes": null, + "id": 3802, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3770, + "src": "47606:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3799, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "47560:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "47560:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47560:63:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3798, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "47550:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47550:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "47535:89:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3810, + "name": "id_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3786, + "src": "47667:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3811, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3772, + "src": "47673:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3807, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3766, + "src": "47646:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3808, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "47646:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "47646:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 3812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47646:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47690:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3806, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "47631:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47631:167:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3815, + "nodeType": "ExpressionStatement", + "src": "47631:167:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3820, + "name": "id_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3797, + "src": "47843:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3821, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3768, + "src": "47849:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3817, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3766, + "src": "47820:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3818, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "47820:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setString", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "47820:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes32,string memory) external returns (bool)" + } + }, + "id": 3822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47820:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 3823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47868:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 3816, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "47805:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "47805:171:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3825, + "nodeType": "ExpressionStatement", + "src": "47805:171:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47991:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3776, + "id": 3827, + "nodeType": "Return", + "src": "47984:11:8" + } + ] + }, + "documentation": "@notice Method for setting a registered issuer firm authority\n@dev | Only Token, Inc. and other approved institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | Authority can only be set for a registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered to authority\n@param authorityAddress Ethereum address of the firm authority to be approved\n@param approved Approval status to set for the firm authority (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 3829, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3773, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3766, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47210:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3765, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "47210:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3768, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47229:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3767, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "47229:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3770, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47248:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3769, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "47248:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3772, + "name": "approved", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47274:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3771, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "47274:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47209:79:8" + }, + "payable": false, + "returnParameters": { + "id": 3776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3775, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 3829, + "src": "47307:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3774, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "47307:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47306:14:8" + }, + "scope": 4606, + "src": "47178:822:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3857, + "nodeType": "Block", + "src": "48488:164:8", + "statements": [ + { + "assignments": [ + 3839 + ], + "declarations": [ + { + "constant": false, + "id": 3839, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "48494:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3838, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "48494:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3850, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f726974792e6669726d", + "id": 3843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48534:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + "value": "registered.authority.firm" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3845, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3831, + "src": "48583:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3846, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3833, + "src": "48589:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3844, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "48563:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48563:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", + "typeString": "literal_string \"registered.authority.firm\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3841, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "48517:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "48517:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48517:90:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3840, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "48507:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48507:101:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "48494:114:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3854, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3839, + "src": "48644:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3851, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3831, + "src": "48621:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "48621:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getString", + "nodeType": "MemberAccess", + "referencedDeclaration": 5188, + "src": "48621:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) view external returns (string memory)" + } + }, + "id": 3855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "48621:26:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3837, + "id": 3856, + "nodeType": "Return", + "src": "48614:33:8" + } + ] + }, + "documentation": "@notice Get the issuer firm registered to the authority Ethereum address\n@dev | Only one firm can be registered per authority\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"issuerFirm\" : \"Name of the firm registered to authority\" }", + "id": 3858, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFirmFromAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3834, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3831, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "48401:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3830, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "48401:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3833, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "48420:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3832, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48420:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48400:45:8" + }, + "payable": false, + "returnParameters": { + "id": 3837, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3836, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "48469:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3835, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "48469:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48468:19:8" + }, + "scope": 4606, + "src": "48371:281:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3883, + "nodeType": "Block", + "src": "49050:119:8", + "statements": [ + { + "assignments": [ + 3868 + ], + "declarations": [ + { + "constant": false, + "id": 3868, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3884, + "src": "49056:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3867, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "49056:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3876, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e6669726d", + "id": 3872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49096:17:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + "value": "registered.firm" + }, + { + "argumentTypes": null, + "id": 3873, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3862, + "src": "49115:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", + "typeString": "literal_string \"registered.firm\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 3870, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "49079:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3871, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "49079:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49079:47:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3869, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "49069:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49069:58:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "49056:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3880, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3868, + "src": "49161:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3877, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3860, + "src": "49140:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "49140:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "49140:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49140:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3866, + "id": 3882, + "nodeType": "Return", + "src": "49133:31:8" + } + ] + }, + "documentation": "@notice Return the boolean (true/false) registration status for an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@return { \"registered\" : \"Return if the issuer firm has been registered\" }", + "id": 3884, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3860, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3884, + "src": "48972:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3859, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "48972:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3862, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3884, + "src": "48991:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3861, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "48991:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "48971:38:8" + }, + "payable": false, + "returnParameters": { + "id": 3866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3865, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3884, + "src": "49033:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3864, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "49033:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49032:17:8" + }, + "scope": 4606, + "src": "48946:223:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3915, + "nodeType": "Block", + "src": "49701:169:8", + "statements": [ + { + "assignments": [ + 3896 + ], + "declarations": [ + { + "constant": false, + "id": 3896, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49707:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3895, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "49707:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3908, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49747:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "id": 3901, + "name": "issuerFirm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3888, + "src": "49771:10:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3903, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3886, + "src": "49803:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3904, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "49809:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3902, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "49783:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49783:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3898, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "49730:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "49730:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49730:97:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3897, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "49720:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49720:108:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "49707:121:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3912, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3896, + "src": "49862:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3909, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3886, + "src": "49841:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3910, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "49841:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "49841:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "49841:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3894, + "id": 3914, + "nodeType": "Return", + "src": "49834:31:8" + } + ] + }, + "documentation": "@notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }", + "id": 3916, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredToFirm", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3891, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3886, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49597:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3885, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "49597:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3888, + "name": "issuerFirm", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49616:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3887, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "49616:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3890, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49635:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3889, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49635:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49596:64:8" + }, + "payable": false, + "returnParameters": { + "id": 3894, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3893, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3916, + "src": "49684:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3892, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "49684:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "49683:17:8" + }, + "scope": 4606, + "src": "49569:301:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3951, + "nodeType": "Block", + "src": "50346:230:8", + "statements": [ + { + "assignments": [ + 3926 + ], + "declarations": [ + { + "constant": false, + "id": 3926, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3952, + "src": "50352:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3925, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "50352:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3944, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "726567697374657265642e617574686f72697479", + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50392:22:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + "value": "registered.authority" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3932, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "50437:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3934, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "50463:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3935, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3920, + "src": "50469:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3933, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "50443:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50443:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3931, + "name": "getFirmFromAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3858, + "src": "50416:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" + } + }, + "id": 3937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50416:71:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3939, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "50509:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 3940, + "name": "authorityAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3920, + "src": "50515:16:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3938, + "name": "getForwardedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2282, + "src": "50489:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50489:43:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", + "typeString": "literal_string \"registered.authority\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3928, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "50375:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "50375:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50375:158:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3927, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "50365:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50365:169:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "50352:182:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3948, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3926, + "src": "50568:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3945, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "50547:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3946, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "50547:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "50547:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "50547:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3924, + "id": 3950, + "nodeType": "Return", + "src": "50540:31:8" + } + ] + }, + "documentation": "@notice Return if an authority address is registered\n@dev | This also checks the status of the registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered\" }", + "id": 3952, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isRegisteredAuthority", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3918, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3952, + "src": "50261:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3917, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "50261:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3920, + "name": "authorityAddress", + "nodeType": "VariableDeclaration", + "scope": 3952, + "src": "50280:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3919, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "50280:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50260:45:8" + }, + "payable": false, + "returnParameters": { + "id": 3924, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3923, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 3952, + "src": "50329:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3922, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "50329:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50328:17:8" + }, + "scope": 4606, + "src": "50230:346:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3977, + "nodeType": "Block", + "src": "51021:109:8", + "statements": [ + { + "assignments": [ + 3962 + ], + "declarations": [ + { + "constant": false, + "id": 3962, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "51027:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3961, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51027:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3970, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74782e737461747573", + "id": 3966, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51067:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + "value": "tx.status" + }, + { + "argumentTypes": null, + "id": 3967, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3956, + "src": "51080:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3964, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "51050:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "51050:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51050:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3963, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "51040:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51040:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51027:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3974, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3962, + "src": "51122:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3971, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3954, + "src": "51101:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 3972, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "51101:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 3973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "51101:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 3975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51101:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3960, + "id": 3976, + "nodeType": "Return", + "src": "51094:31:8" + } + ] + }, + "documentation": "@notice Return boolean transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}", + "id": 3978, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTxStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3957, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3954, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "50948:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3953, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "50948:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3956, + "name": "txHash", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "50967:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3955, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "50967:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "50947:35:8" + }, + "payable": false, + "returnParameters": { + "id": 3960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3959, + "name": "txStatus", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "51006:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3958, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "51006:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51005:15:8" + }, + "scope": 4606, + "src": "50927:203:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4018, + "nodeType": "Block", + "src": "51539:486:8", + "statements": [ + { + "assignments": [ + 3988 + ], + "declarations": [ + { + "constant": false, + "id": 3988, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "51545:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3987, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51545:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3996, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74782e737461747573", + "id": 3992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51585:11:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + "value": "tx.status" + }, + { + "argumentTypes": null, + "id": 3993, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3982, + "src": "51598:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", + "typeString": "literal_string \"tx.status\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3990, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "51568:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3991, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "51568:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51568:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3989, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "51558:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 3995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51558:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51545:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "51675:26:8", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3999, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3980, + "src": "51688:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4000, + "name": "txHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3982, + "src": "51694:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3998, + "name": "getTxStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3978, + "src": "51676:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) view returns (bool)" + } + }, + "id": 4001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51676:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e20737461747573206d7573742062652066616c7365206265666f72652073657474696e6720746865207472616e73616374696f6e207374617475732e", + "id": 4003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51709:80:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", + "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" + }, + "value": "Error: Transaction status must be false before setting the transaction status." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", + "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" + } + ], + "id": 3997, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "51667:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51667:123:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4005, + "nodeType": "ExpressionStatement", + "src": "51667:123:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4010, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3988, + "src": "51877:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51881:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4007, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3980, + "src": "51856:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "51856:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "51856:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 4012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51856:30:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", + "id": 4013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51894:107:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" + } + ], + "id": 4006, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "51848:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51848:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4015, + "nodeType": "ExpressionStatement", + "src": "51848:154:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4016, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52016:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 3986, + "id": 4017, + "nodeType": "Return", + "src": "52009:11:8" + } + ] + }, + "documentation": "@notice Set transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return { \"success\" : \"Return true if successfully called from another contract\" }", + "id": 4019, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setTxStatus", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3983, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3980, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "51472:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 3979, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "51472:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3982, + "name": "txHash", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "51491:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3981, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "51491:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51471:35:8" + }, + "payable": false, + "returnParameters": { + "id": 3986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3985, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "51525:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3984, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "51525:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51524:14:8" + }, + "scope": 4606, + "src": "51451:574:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4132, + "nodeType": "Block", + "src": "53345:1436:8", + "statements": [ + { + "assignments": [ + 4045 + ], + "declarations": [ + { + "constant": false, + "id": 4045, + "name": "fxTxHash", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53352:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4044, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53352:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4057, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4049, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "53398:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4050, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4025, + "src": "53409:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4051, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4027, + "src": "53418:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4052, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4029, + "src": "53427:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4053, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4031, + "src": "53435:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4054, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "53443:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4047, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "53381:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "53381:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53381:73:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4046, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "53371:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53371:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "53352:103:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4060, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4021, + "src": "53628:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4061, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "53634:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "53634:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4063, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "53646:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4059, + "name": "verifyAccounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3018, + "src": "53613:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) view returns (bool)" + } + }, + "id": 4064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53613:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204f6e6c79207665726966696564206163636f756e74732063616e20706572666f726d2063757272656e63792073776170732e", + "id": 4065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53664:59:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", + "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" + }, + "value": "Error: Only verified accounts can perform currency swaps." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", + "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" + } + ], + "id": 4058, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "53598:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53598:126:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4067, + "nodeType": "ExpressionStatement", + "src": "53598:126:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4070, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4021, + "src": "53848:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4071, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "53854:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4069, + "name": "setTxStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4019, + "src": "53836:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) returns (bool)" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53836:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204661696c656420746f20736574207472616e73616374696f6e2073746174757320746f2066756c66696c6c65642e", + "id": 4073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53871:55:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", + "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" + }, + "value": "Error: Failed to set transaction status to fulfilled." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", + "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" + } + ], + "id": 4068, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "53821:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53821:106:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4075, + "nodeType": "ExpressionStatement", + "src": "53821:106:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4077, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "53992:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4078, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "54006:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53992:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a205472616e73616374696f6e20686173206578706972656421", + "id": 4080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54011:33:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", + "typeString": "literal_string \"Error: Transaction has expired!\"" + }, + "value": "Error: Transaction has expired!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", + "typeString": "literal_string \"Error: Transaction has expired!\"" + } + ], + "id": 4076, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "53984:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "53984:61:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4082, + "nodeType": "ExpressionStatement", + "src": "53984:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4085, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "54205:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4086, + "name": "sigV", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "54215:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 4087, + "name": "sigR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "54221:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4088, + "name": "sigS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "54227:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4084, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5232, + "src": "54195:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 4089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54195:37:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 4090, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "54236:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "54195:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204164647265737320646572697665642066726f6d207472616e73616374696f6e207369676e617475726520646f6573206e6f74206d6174636820746865207265717565737465722061646472657373", + "id": 4092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54253:88:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", + "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" + }, + "value": "Error: Address derived from transaction signature does not match the requester address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", + "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" + } + ], + "id": 4083, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "54180:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54180:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4094, + "nodeType": "ExpressionStatement", + "src": "54180:162:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4097, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4021, + "src": "54436:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4098, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4025, + "src": "54442:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4099, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "54451:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "54451:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4101, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "54463:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4102, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4029, + "src": "54474:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 4103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54482:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "id": 4096, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "54422:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54422:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 4105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54496:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 4095, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "54407:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54407:135:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4107, + "nodeType": "ExpressionStatement", + "src": "54407:135:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4110, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4021, + "src": "54578:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4111, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4027, + "src": "54584:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4112, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4023, + "src": "54593:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4113, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "54604:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "54604:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4115, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4031, + "src": "54616:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "307830", + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54624:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", + "typeString": "literal_string \"0x0\"" + } + ], + "id": 4109, + "name": "forceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "54564:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54564:66:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", + "id": 4118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54638:45:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + }, + "value": "Error: Unable to transfer funds to account." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", + "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" + } + ], + "id": 4108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "54549:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54549:135:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4120, + "nodeType": "ExpressionStatement", + "src": "54549:135:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4122, + "name": "symbolA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4025, + "src": "54703:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4123, + "name": "symbolB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4027, + "src": "54712:7:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4124, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4029, + "src": "54721:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4125, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4031, + "src": "54729:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4126, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "54737:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4127, + "name": "fxTxHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4045, + "src": "54749:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4121, + "name": "FxSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1700, + "src": "54696:6:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (string memory,string memory,uint256,uint256,uint256,bytes32)" + } + }, + "id": 4128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "54696:62:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4129, + "nodeType": "EmitStatement", + "src": "54691:67:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54772:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4043, + "id": 4131, + "nodeType": "Return", + "src": "54765:11:8" + } + ] + }, + "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev | This method can be called directly between peers\n@dev | This method does not take transaction fees from the swap\n@param self Internal storage proxying TokenIOStorage contract\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4133, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "execSwap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4021, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53121:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4020, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "53121:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4023, + "name": "requester", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53144:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4022, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "53144:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4025, + "name": "symbolA", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53167:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4024, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "53167:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4027, + "name": "symbolB", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53187:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4026, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "53187:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4029, + "name": "valueA", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53207:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4028, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53207:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4031, + "name": "valueB", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53224:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4030, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53224:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4033, + "name": "sigV", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53241:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4032, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "53241:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4035, + "name": "sigR", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53257:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4034, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53257:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4037, + "name": "sigS", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53275:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4036, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "53275:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4039, + "name": "expiration", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53293:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4038, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "53293:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "53115:197:8" + }, + "payable": false, + "returnParameters": { + "id": 4043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4042, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4133, + "src": "53331:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4041, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "53331:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "53330:14:8" + }, + "scope": 4606, + "src": "53098:1683:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4171, + "nodeType": "Block", + "src": "55334:350:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4143, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4137, + "src": "55348:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 4144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55367:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "55348:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a2063616e6e6f74206465707265636174652061206e756c6c20616464726573732e", + "id": 4146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55380:41:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", + "typeString": "literal_string \"Error: cannot deprecate a null address.\"" + }, + "value": "Error: cannot deprecate a null address." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", + "typeString": "literal_string \"Error: cannot deprecate a null address.\"" + } + ], + "id": 4142, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "55340:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55340:82:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4148, + "nodeType": "ExpressionStatement", + "src": "55340:82:8" + }, + { + "assignments": [ + 4150 + ], + "declarations": [ + { + "constant": false, + "id": 4150, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4172, + "src": "55429:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4149, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "55429:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4158, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6465706372656361746564", + "id": 4154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55469:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + "value": "depcrecated" + }, + { + "argumentTypes": null, + "id": 4155, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4137, + "src": "55484:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4152, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "55452:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "55452:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55452:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4151, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "55442:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55442:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "55429:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4163, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4150, + "src": "55537:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4164, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55541:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4160, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "55516:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4161, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "55516:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5030, + "src": "55516:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", + "typeString": "function (bytes32,bool) external returns (bool)" + } + }, + "id": 4165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55516:30:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55554:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "55508:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "55508:153:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4168, + "nodeType": "ExpressionStatement", + "src": "55508:153:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55675:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4141, + "id": 4170, + "nodeType": "Return", + "src": "55668:11:8" + } + ] + }, + "documentation": "@notice Deprecate a contract interface\n@dev | This is a low-level method to deprecate a contract interface.\n@dev | This is useful if the interface needs to be updated or becomes out of date\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4172, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setDeprecatedContract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4135, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4172, + "src": "55258:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4134, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "55258:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4137, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4172, + "src": "55277:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "55277:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "55257:44:8" + }, + "payable": false, + "returnParameters": { + "id": 4141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4140, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4172, + "src": "55320:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4139, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "55320:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "55319:14:8" + }, + "scope": 4606, + "src": "55227:457:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4197, + "nodeType": "Block", + "src": "56098:120:8", + "statements": [ + { + "assignments": [ + 4182 + ], + "declarations": [ + { + "constant": false, + "id": 4182, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4198, + "src": "56104:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4181, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "56104:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4190, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6465706372656361746564", + "id": 4186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56144:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + "value": "depcrecated" + }, + { + "argumentTypes": null, + "id": 4187, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4176, + "src": "56159:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", + "typeString": "literal_string \"depcrecated\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "56127:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "56127:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56127:48:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4183, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "56117:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56117:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56104:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4194, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4182, + "src": "56210:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4191, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4174, + "src": "56189:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4192, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "56189:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBool", + "nodeType": "MemberAccess", + "referencedDeclaration": 5212, + "src": "56189:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view external returns (bool)" + } + }, + "id": 4195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56189:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4180, + "id": 4196, + "nodeType": "Return", + "src": "56182:31:8" + } + ] + }, + "documentation": "@notice Return the deprecation status of a contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}", + "id": 4198, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isContractDeprecated", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4177, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4174, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4198, + "src": "56018:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4173, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "56018:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4176, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4198, + "src": "56037:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "56037:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56017:44:8" + }, + "payable": false, + "returnParameters": { + "id": 4180, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4179, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 4198, + "src": "56085:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "56085:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56084:13:8" + }, + "scope": 4606, + "src": "55988:230:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4231, + "nodeType": "Block", + "src": "56741:264:8", + "statements": [ + { + "assignments": [ + 4210 + ], + "declarations": [ + { + "constant": false, + "id": 4210, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56747:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4209, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "56747:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4218, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6c696d69742e7370656e64696e672e706572696f64", + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56787:23:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + "value": "limit.spending.period" + }, + { + "argumentTypes": null, + "id": 4215, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "56812:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4212, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "56770:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "56770:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56770:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4211, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "56760:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56760:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56747:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4223, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4210, + "src": "56856:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4224, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4204, + "src": "56860:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4220, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4200, + "src": "56835:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4221, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "56835:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "56835:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56835:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56875:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4219, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "56827:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "56827:155:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4228, + "nodeType": "ExpressionStatement", + "src": "56827:155:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56996:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4208, + "id": 4230, + "nodeType": "Return", + "src": "56989:11:8" + } + ] + }, + "documentation": "@notice Set the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param period Unix timestamp of the spending period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4232, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4200, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56660:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4199, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "56660:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4202, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56679:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4201, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "56679:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4204, + "name": "period", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56696:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4203, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "56696:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56659:49:8" + }, + "payable": false, + "returnParameters": { + "id": 4208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4207, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4232, + "src": "56727:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4206, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "56727:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56726:14:8" + }, + "scope": 4606, + "src": "56626:379:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4257, + "nodeType": "Block", + "src": "57590:122:8", + "statements": [ + { + "assignments": [ + 4242 + ], + "declarations": [ + { + "constant": false, + "id": 4242, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4258, + "src": "57596:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4241, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "57596:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4250, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6c696d69742e7370656e64696e672e706572696f64", + "id": 4246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "57636:23:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + "value": "limit.spending.period" + }, + { + "argumentTypes": null, + "id": 4247, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4236, + "src": "57661:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", + "typeString": "literal_string \"limit.spending.period\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4244, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "57619:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "57619:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57619:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4243, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "57609:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57609:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57596:74:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4254, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4242, + "src": "57704:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4251, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4234, + "src": "57683:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4252, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "57683:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "57683:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57683:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4240, + "id": 4256, + "nodeType": "Return", + "src": "57676:31:8" + } + ] + }, + "documentation": "@notice Get the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@dev | If the current spending period has expired, it will be set upon next `transfer()`\nor `transferFrom()` request\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"period\" : \"Returns Unix timestamp of the current spending period\"}", + "id": 4258, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4234, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4258, + "src": "57518:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4233, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "57518:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4236, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4258, + "src": "57537:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "57537:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57517:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4239, + "name": "period", + "nodeType": "VariableDeclaration", + "scope": 4258, + "src": "57577:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4238, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "57577:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57576:13:8" + }, + "scope": 4606, + "src": "57484:228:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4291, + "nodeType": "Block", + "src": "58198:264:8", + "statements": [ + { + "assignments": [ + 4270 + ], + "declarations": [ + { + "constant": false, + "id": 4270, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58204:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4269, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "58204:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4278, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", + "id": 4274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58244:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + "value": "account.spending.limit" + }, + { + "argumentTypes": null, + "id": 4275, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4262, + "src": "58270:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4272, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "58227:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "58227:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58227:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4271, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "58217:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58217:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "58204:75:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4283, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4270, + "src": "58314:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4284, + "name": "limit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4264, + "src": "58318:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4280, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4260, + "src": "58293:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4281, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "58293:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "58293:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58293:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58332:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4279, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "58285:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58285:154:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4288, + "nodeType": "ExpressionStatement", + "src": "58285:154:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58453:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4268, + "id": 4290, + "nodeType": "Return", + "src": "58446:11:8" + } + ] + }, + "documentation": "@notice Set the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param limit Spending limit amount\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4292, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4260, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58118:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4259, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "58118:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4262, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58137:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4261, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "58137:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4264, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58154:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4263, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "58154:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58117:48:8" + }, + "payable": false, + "returnParameters": { + "id": 4268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4267, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4292, + "src": "58184:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4266, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "58184:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58183:14:8" + }, + "scope": 4606, + "src": "58085:377:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4317, + "nodeType": "Block", + "src": "58887:123:8", + "statements": [ + { + "assignments": [ + 4302 + ], + "declarations": [ + { + "constant": false, + "id": 4302, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "58893:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4301, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "58893:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4310, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", + "id": 4306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58933:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + "value": "account.spending.limit" + }, + { + "argumentTypes": null, + "id": 4307, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4296, + "src": "58959:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", + "typeString": "literal_string \"account.spending.limit\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4304, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "58916:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "58916:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58916:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4303, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "58906:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58906:62:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "58893:75:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4314, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4302, + "src": "59002:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4311, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294, + "src": "58981:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "58981:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "58981:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "58981:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4300, + "id": 4316, + "nodeType": "Return", + "src": "58974:31:8" + } + ] + }, + "documentation": "@notice Get the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"limit\" : \"Returns the account spending limit amount\"}", + "id": 4318, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4294, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "58816:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4293, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "58816:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4296, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "58835:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "58835:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58815:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4299, + "name": "limit", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "58875:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4298, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "58875:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "58874:12:8" + }, + "scope": 4606, + "src": "58783:227:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4383, + "nodeType": "Block", + "src": "59710:887:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4331, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "59844:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4332, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "59850:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4330, + "name": "updateAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4441, + "src": "59816:27:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 4333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59816:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59866:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4329, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "59808:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59808:109:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4336, + "nodeType": "ExpressionStatement", + "src": "59808:109:8" + }, + { + "assignments": [ + 4338 + ], + "declarations": [ + { + "constant": false, + "id": 4338, + "name": "updatedAmount", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59924:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4337, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "59924:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4346, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4344, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4324, + "src": "59989:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4340, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "59970:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4341, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "59976:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4339, + "name": "getAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4471, + "src": "59945:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59945:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "59945:43:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "59945:51:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "59924:72:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4349, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "60126:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4350, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "60132:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4348, + "name": "getAccountSpendingLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4318, + "src": "60102:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60102:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4352, + "name": "updatedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60144:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60102:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a204163636f756e742063616e6e6f742065786365656420697473206461696c79207370656e64206c696d69742e", + "id": 4354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60165:53:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", + "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" + }, + "value": "Error: Account cannot exceed its daily spend limit." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", + "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" + } + ], + "id": 4347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "60087:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60087:132:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4356, + "nodeType": "ExpressionStatement", + "src": "60087:132:8" + }, + { + "assignments": [ + 4358 + ], + "declarations": [ + { + "constant": false, + "id": 4358, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "60289:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4357, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "60289:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4370, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", + "id": 4362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60329:25:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + "value": "account.spending.amount" + }, + { + "argumentTypes": null, + "id": 4363, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "60356:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4365, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "60390:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4366, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "60396:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4364, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4258, + "src": "60365:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60365:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4360, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "60312:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "60312:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60312:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4359, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "60302:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60302:104:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "60289:117:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4375, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4358, + "src": "60441:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4376, + "name": "updatedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4338, + "src": "60445:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4372, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "60420:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4373, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "60420:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "60420:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60420:39:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", + "id": 4378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60467:106:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + }, + "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", + "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" + } + ], + "id": 4371, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "60412:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "60412:162:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4380, + "nodeType": "ExpressionStatement", + "src": "60412:162:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60588:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4328, + "id": 4382, + "nodeType": "Return", + "src": "60581:11:8" + } + ] + }, + "documentation": "@notice Set the account spending amount for the daily period\n@dev | Each account has it's own daily spending limit\n@dev | This transaction will throw if the new spending amount is greater than the limit\n@dev | This method is called in the `transfer()` and `transferFrom()` methods\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param amount Set the amount spent for the daily period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4384, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setAccountSpendingAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4325, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4320, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59629:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4319, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "59629:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4322, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59648:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4321, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "59648:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4324, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59665:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4323, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "59665:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59628:49:8" + }, + "payable": false, + "returnParameters": { + "id": 4328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4327, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "59696:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4326, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "59696:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59695:14:8" + }, + "scope": 4606, + "src": "59595:1002:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4440, + "nodeType": "Block", + "src": "61157:398:8", + "statements": [ + { + "assignments": [ + 4394 + ], + "declarations": [ + { + "constant": false, + "id": 4394, + "name": "begDate", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61163:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4393, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "61163:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4399, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4396, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4386, + "src": "61203:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4397, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4388, + "src": "61209:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4395, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4258, + "src": "61178:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61178:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "61163:54:8" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4400, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "61227:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 4401, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "61237:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61227:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4438, + "nodeType": "Block", + "src": "61274:277:8", + "statements": [ + { + "assignments": [ + 4407 + ], + "declarations": [ + { + "constant": false, + "id": 4407, + "name": "duration", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61282:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4406, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "61282:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4409, + "initialValue": { + "argumentTypes": null, + "hexValue": "3836343030", + "id": 4408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61298:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "86400" + }, + "nodeType": "VariableDeclarationStatement", + "src": "61282:21:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4412, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4386, + "src": "61379:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4413, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4388, + "src": "61385:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4429, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4407, + "src": "61452:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 4425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61444:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4422, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4407, + "src": "61430:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4418, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "61416:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4416, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "61408:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "61408:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61408:16:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4420, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61407:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "61407:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61407:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "61407:36:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61407:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4427, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61406:41:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "61406:45:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61406:55:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4414, + "name": "begDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "61394:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 284, + "src": "61394:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61394:68:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4411, + "name": "setAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4232, + "src": "61354:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 4432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61354:109:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61473:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4410, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "61337:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "61337:187:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4435, + "nodeType": "ExpressionStatement", + "src": "61337:187:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61540:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4392, + "id": 4437, + "nodeType": "Return", + "src": "61533:11:8" + } + ] + }, + "id": 4439, + "nodeType": "IfStatement", + "src": "61223:328:8", + "trueBody": { + "id": 4405, + "nodeType": "Block", + "src": "61242:26:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61257:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4392, + "id": 4404, + "nodeType": "Return", + "src": "61250:11:8" + } + ] + } + } + ] + }, + "documentation": "@notice Low-level API to ensure the account spending period is always current\n@dev | This method is internally called by `setAccountSpendingAmount()` to ensure\nspending period is always the most current daily period.\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", + "id": 4441, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updateAccountSpendingPeriod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4386, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61089:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4385, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "61089:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4388, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61108:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "61108:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61088:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4391, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "61143:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4390, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "61143:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61142:14:8" + }, + "scope": 4606, + "src": "61052:503:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4470, + "nodeType": "Block", + "src": "62019:165:8", + "statements": [ + { + "assignments": [ + 4451 + ], + "declarations": [ + { + "constant": false, + "id": 4451, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4471, + "src": "62025:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4450, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "62025:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4463, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", + "id": 4455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "62065:25:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + "value": "account.spending.amount" + }, + { + "argumentTypes": null, + "id": 4456, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4445, + "src": "62092:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4458, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4443, + "src": "62126:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4459, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4445, + "src": "62132:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4457, + "name": "getAccountSpendingPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4258, + "src": "62101:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62101:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", + "typeString": "literal_string \"account.spending.amount\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4453, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "62048:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4454, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "62048:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62048:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4452, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "62038:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62038:104:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62025:117:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4467, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4451, + "src": "62176:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4464, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4443, + "src": "62155:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "62155:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "62155:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62155:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4449, + "id": 4469, + "nodeType": "Return", + "src": "62148:31:8" + } + ] + }, + "documentation": "@notice Return the amount spent during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount spent by the account during the current period\"}", + "id": 4471, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4443, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4471, + "src": "61947:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4442, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "61947:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4445, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4471, + "src": "61966:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "61966:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "61946:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4448, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4471, + "src": "62006:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "62006:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62005:13:8" + }, + "scope": 4606, + "src": "61913:271:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4491, + "nodeType": "Block", + "src": "62667:101:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4486, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4473, + "src": "62748:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4487, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4475, + "src": "62754:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4485, + "name": "getAccountSpendingAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4471, + "src": "62723:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62723:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4481, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4473, + "src": "62704:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4482, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4475, + "src": "62710:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4480, + "name": "getAccountSpendingLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4318, + "src": "62680:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62680:38:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 259, + "src": "62680:42:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62680:83:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4479, + "id": 4490, + "nodeType": "Return", + "src": "62673:90:8" + } + ] + }, + "documentation": "@notice Return the amount remaining during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}", + "id": 4492, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAccountSpendingRemaining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4473, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4492, + "src": "62587:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4472, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "62587:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4475, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 4492, + "src": "62606:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4474, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "62606:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62586:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4479, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4478, + "name": "remainingLimit", + "nodeType": "VariableDeclaration", + "scope": 4492, + "src": "62646:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4477, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "62646:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62645:21:8" + }, + "scope": 4606, + "src": "62550:218:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4525, + "nodeType": "Block", + "src": "63361:207:8", + "statements": [ + { + "assignments": [ + 4504 + ], + "declarations": [ + { + "constant": false, + "id": 4504, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63367:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4503, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "63367:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4512, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66782e7573642e72617465", + "id": 4508, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63407:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + "value": "fx.usd.rate" + }, + { + "argumentTypes": null, + "id": 4509, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4496, + "src": "63422:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "63390:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "63390:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63390:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4505, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "63380:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63380:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63367:65:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4517, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "63474:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 4518, + "name": "bpsRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4498, + "src": "63478:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4514, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4494, + "src": "63453:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4515, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "63453:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 4970, + "src": "63453:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes32,uint256) external returns (bool)" + } + }, + "id": 4519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63453:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", + "id": 4520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63494:50:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + }, + "value": "Error: Unable to update account spending period." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", + "typeString": "literal_string \"Error: Unable to update account spending period.\"" + } + ], + "id": 4513, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "63438:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63438:107:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4522, + "nodeType": "ExpressionStatement", + "src": "63438:107:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "63559:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4502, + "id": 4524, + "nodeType": "Return", + "src": "63552:11:8" + } + ] + }, + "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@return { \"success\": \"Returns true if successfully called from another contract\"}", + "id": 4526, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setFxUSDBPSRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4499, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4494, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63279:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4493, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "63279:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4496, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63298:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4495, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "63298:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4498, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63315:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4497, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "63315:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63278:50:8" + }, + "payable": false, + "returnParameters": { + "id": 4502, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4501, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4526, + "src": "63347:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4500, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "63347:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63346:14:8" + }, + "scope": 4606, + "src": "63254:314:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4551, + "nodeType": "Block", + "src": "63974:113:8", + "statements": [ + { + "assignments": [ + 4536 + ], + "declarations": [ + { + "constant": false, + "id": 4536, + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 4552, + "src": "63980:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4535, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "63980:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4544, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66782e7573642e72617465", + "id": 4540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64020:13:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + "value": "fx.usd.rate" + }, + { + "argumentTypes": null, + "id": 4541, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "64035:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", + "typeString": "literal_string \"fx.usd.rate\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4538, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5227, + "src": "64003:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "64003:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64003:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4537, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5234, + "src": "63993:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 4543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63993:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63980:65:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4548, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "64079:2:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4545, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4528, + "src": "64058:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + "id": 4546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "64058:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5176, + "src": "64058:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view external returns (uint256)" + } + }, + "id": 4549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64058:24:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4534, + "id": 4550, + "nodeType": "Return", + "src": "64051:31:8" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount in basis points\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", + "id": 4552, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDBPSRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4528, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4552, + "src": "63901:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4527, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "63901:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4530, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4552, + "src": "63920:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "63920:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63900:36:8" + }, + "payable": false, + "returnParameters": { + "id": 4534, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4533, + "name": "bpsRate", + "nodeType": "VariableDeclaration", + "scope": 4552, + "src": "63960:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4532, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "63960:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63959:14:8" + }, + "scope": 4606, + "src": "63876:211:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 4604, + "nodeType": "Block", + "src": "64556:330:8", + "statements": [ + { + "assignments": [ + 4564 + ], + "declarations": [ + { + "constant": false, + "id": 4564, + "name": "usdDecimals", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64562:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4563, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64562:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4569, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4566, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4554, + "src": "64598:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "hexValue": "55534478", + "id": 4567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64604:6:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", + "typeString": "literal_string \"USDx\"" + }, + "value": "USDx" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", + "typeString": "literal_string \"USDx\"" + } + ], + "id": 4565, + "name": "getTokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2496, + "src": "64581:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64581:30:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64562:49:8" + }, + { + "assignments": [ + 4571 + ], + "declarations": [ + { + "constant": false, + "id": 4571, + "name": "fxDecimals", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64617:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4570, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64617:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4576, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4573, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4554, + "src": "64652:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4574, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4556, + "src": "64658:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4572, + "name": "getTokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2496, + "src": "64635:16:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64635:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64617:50:8" + }, + { + "assignments": [ + 4578 + ], + "declarations": [ + { + "constant": false, + "id": 4578, + "name": "usdAmount", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64741:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4577, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64741:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4601, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64844:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 4598, + "name": "fxDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4571, + "src": "64848:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64844:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64822:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 4592, + "name": "usdDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4564, + "src": "64826:11:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64822:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 4587, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64810:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4582, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4554, + "src": "64789:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4583, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4556, + "src": "64795:8:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data storage pointer" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4581, + "name": "getFxUSDBPSRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4552, + "src": "64773:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" + } + }, + "id": 4584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64773:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4579, + "name": "fxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4558, + "src": "64760:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "64760:12:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64760:45:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "64760:49:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64760:56:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4589, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64759:58:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 220, + "src": "64759:62:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64759:79:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4595, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64758:81:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 238, + "src": "64758:85:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64758:101:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64741:118:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 4602, + "name": "usdAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4578, + "src": "64872:9:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4562, + "id": 4603, + "nodeType": "Return", + "src": "64865:16:8" + } + ] + }, + "documentation": "@notice Return the foreign currency USD exchanged amount\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"amount\" : \"Returns the foreign currency amount in USD\"}", + "id": 4605, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFxUSDAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4554, + "name": "self", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64469:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4553, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "64469:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4556, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64488:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4555, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "64488:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4558, + "name": "fxAmount", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64505:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4557, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64505:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64468:51:8" + }, + "payable": false, + "returnParameters": { + "id": 4562, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4561, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4605, + "src": "64543:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4560, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "64543:4:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64542:13:8" + }, + "scope": 4606, + "src": "64445:441:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 4607, + "src": "898:63992:8" + } + ], + "src": "0:64891:8" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0xc418e6ebf1bdf0063b2c91128fd89b653d9f0a6a", + "transactionHash": "0xf109fddc82f116988d60142b52a85aa379162a6ce98139a08a1f7edfb786abfc" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0xf25186b5081ff5ce73482ad761db0eb0d25abfbf", + "transactionHash": "0xc4608ab1e3304d6d0bfca4f8267084ed8c4facc883347950bd99b1dd6a24f0c0" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:02:25.571Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOMerchant.json b/deployed/mainnet-v1.0.1/TokenIOMerchant.json new file mode 100644 index 0000000..dc65972 --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIOMerchant.json @@ -0,0 +1,7204 @@ +{ + "contractName": "TokenIOMerchant", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "feeContract", + "type": "address" + } + ], + "name": "setParams", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getFeeParams", + "outputs": [ + { + "name": "bps", + "type": "uint256" + }, + { + "name": "min", + "type": "uint256" + }, + { + "name": "max", + "type": "uint256" + }, + { + "name": "flat", + "type": "uint256" + }, + { + "name": "feeMsg", + "type": "bytes" + }, + { + "name": "feeAccount", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateFees", + "outputs": [ + { + "name": "fees", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "currency", + "type": "string" + }, + { + "name": "merchant", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "merchantPaysFees", + "type": "bool" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "pay", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051602080612e2b833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a039094169390931783558154169091179055612db590819061007690396000f3006080604052600436106100745763ffffffff60e060020a6000350416634bbc142c81146100795780634e49acac146100ae57806352238fdd146100cf578063666a3427146100f9578063666e1b391461011a5780636db31c251461013b578063be6fc181146101ef578063f2fde38b146102b1575b600080fd5b34801561008557600080fd5b5061009a600160a060020a03600435166102d2565b604080519115158252519081900360200190f35b3480156100ba57600080fd5b5061009a600160a060020a036004351661038e565b3480156100db57600080fd5b506100e76004356104b4565b60408051918252519081900360200190f35b34801561010557600080fd5b5061009a600160a060020a03600435166104df565b34801561012657600080fd5b5061009a600160a060020a0360043516610598565b34801561014757600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261009a94369492936024939284019190819084018382808284375050604080516020601f60608a01358b0180359182018390048302840183018552818452989b600160a060020a038b35169b838c01359b9586013515159a9199509750608090940195509193509182019181908401838280828437509497506105ad9650505050505050565b3480156101fb57600080fd5b50610204610855565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b83811015610271578181015183820152602001610259565b50505050905090810190601f16801561029e5780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3480156102bd57600080fd5b5061009a600160a060020a036004351661092b565b3360009081526020819052604081205460ff16151561033d576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff1615156103f9576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b61040a60018363ffffffff610a6516565b15156104ac576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a20556e61626c6520746f207365742066656520636f6e7472616360448201527f742e20456e7375726520636f6e747261637420697320616c6c6f77656420627960648201527f2073746f7261676520636f6e74726163742e0000000000000000000000000000608482015290519081900360a40190fd5b506001919050565b60006104d96104ca60013063ffffffff610c6816565b6001908463ffffffff610de316565b92915050565b3360009081526020819052604081205460ff16151561054a576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60008060006105bb866104b4565b91506105e2336105d360018b8a63ffffffff6112d416565b6001919063ffffffff61136c16565b151561065e576040805160e560020a62461bcd02815260206004820152602d60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073706560448201527f6e64696e6720616d6f756e742e00000000000000000000000000000000000000606482015290519081900360840190fd5b610673600189338a8a8963ffffffff6116b016565b15156106ef576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e7400000000000000000000000000000000000000000000606482015290519081900360840190fd5b61070060013063ffffffff610c6816565b905084156107b3576107328888838561072060018363ffffffff611e3416565b6001949392919063ffffffff6116b016565b15156107ae576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b610847565b6107cb8833838561072060018363ffffffff611e3416565b1515610847576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b506001979650505050505050565b600080808060608161087f61087160013063ffffffff610c6816565b60019063ffffffff611fe716565b6108a161089360013063ffffffff610c6816565b60019063ffffffff61213a16565b6108c36108b560013063ffffffff610c6816565b60019063ffffffff6121cb16565b6108e56108d760013063ffffffff610c6816565b60019063ffffffff61225c16565b6109076108f960013063ffffffff610c6816565b60019063ffffffff611e3416565b61091860013063ffffffff610c6816565b949b939a50919850965094509092509050565b3360009081526020819052604081205460ff161515610996576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a03821615156109f6576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b604080517f6665652e6163636f756e74000000000000000000000000000000000000000000602080830191909152606060020a3002602b8301528251601f818403018152603f909201928390528151600093849392909182918401908083835b60208310610ae45780518252601f199092019160209182019101610ac5565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b158015610b7a57600080fd5b505af1158015610b8e573d6000803e3d6000fd5b505050506040513d6020811015610ba457600080fd5b50511515610c5c576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b600191505b5092915050565b60008060008360405160200180807f6665652e6163636f756e74000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310610cfc5780518252601f199092019160209182019101610cdd565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015610d8957600080fd5b505af1158015610d9d573d6000803e3d6000fd5b505050506040513d6020811015610db357600080fd5b50519050600160a060020a0381161515610dd757610dd0856122ed565b9250610ddb565b8092505b505092915050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b60208310610e7e5780518252601f199092019160209182019101610e5f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015610edf57600080fd5b505af1158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b60208310610f9f5780518252601f199092019160209182019101610f80565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561100057600080fd5b505af1158015611014573d6000803e3d6000fd5b505050506040513d602081101561102a57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106110c05780518252601f1990920191602091820191016110a1565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561112157600080fd5b505af1158015611135573d6000803e3d6000fd5b505050506040513d602081101561114b57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106111e15780518252601f1990920191602091820191016111c2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561124257600080fd5b505af1158015611256573d6000803e3d6000fd5b505050506040513d602081101561126c57600080fd5b505191506112a28261129661271061128a8b8863ffffffff61241f16565b9063ffffffff6124c516565b9063ffffffff6124dc16565b9050848111156112b4578495506112c8565b838110156112c4578395506112c8565b8095505b50505050509392505050565b600080600080611319876040805190810160405280600481526020017f555344780000000000000000000000000000000000000000000000000000000081525061255f565b9250611325878761255f565b915061136182600a0a61128a85600a0a61135561271061128a6113488e8e61261f565b8c9063ffffffff61241f16565b9063ffffffff61241f16565b979650505050505050565b600080600061137b868661267c565b15156113f7576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b61140584611296888861275f565b9150816114128787612801565b101561148e576040805160e560020a62461bcd02815260206004820152603360248201527f4572726f723a204163636f756e742063616e6e6f74206578636565642069747360448201527f206461696c79207370656e64206c696d69742e00000000000000000000000000606482015290519081900360840190fd5b846114998787612892565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061152e5780518252601f19909201916020918201910161150f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018a90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b1580156115c257600080fd5b505af11580156115d6573d6000803e3d6000fd5b505050506040513d60208110156115ec57600080fd5b505115156116a4576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b50600195945050505050565b60008080600160a060020a038616151561173a576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876117458a89612923565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061179f5780518252601f199092019160209182019101611780565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106118215780518252601f199092019160209182019101611802565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902091508761185b8a88612923565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106118b55780518252601f199092019160209182019101611896565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106119375780518252601f199092019160209182019101611918565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018a90529451909750600160a060020a03909416955063e2a4853a94508793611a0893508b92879263bd02d0f5926024808401938290030181600087803b1580156119d057600080fd5b505af11580156119e4573d6000803e3d6000fd5b505050506040513d60208110156119fa57600080fd5b50519063ffffffff612a9116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015611a5057600080fd5b505af1158015611a64573d6000803e3d6000fd5b505050506040513d6020811015611a7a57600080fd5b50511515611b32576040805160e560020a62461bcd0281526020600482015260696024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8854604080517fbd02d0f5000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163e2a4853a918491611bdf918a91869163bd02d0f59160248083019260209291908290030181600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050506040513d6020811015611bd157600080fd5b50519063ffffffff6124dc16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015611c2757600080fd5b505af1158015611c3b573d6000803e3d6000fd5b505050506040513d6020811015611c5157600080fd5b50511515611d09576040805160e560020a62461bcd0281526020600482015260696024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b83811015611d88578181015183820152602001611d70565b50505050905090810190601f168015611db55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611de8578181015183820152602001611dd0565b50505050905090810190601f168015611e155780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ec75780518252601f199092019160209182019101611ea8565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f9457600080fd5b810190808051640100000000811115611fac57600080fd5b82016020810184811115611fbf57600080fd5b8151640100000000811182820187101715611fd957600080fd5b509098975050505050505050565b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106120795780518252601f19909201916020918201910161205a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561210657600080fd5b505af115801561211a573d6000803e3d6000fd5b505050506040513d602081101561213057600080fd5b5051949350505050565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b6020831061235f5780518252601f199092019160209182019101612340565b51815160209384036101000a60001901801990921691161790526040805192909401829003822089547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b1580156123ec57600080fd5b505af1158015612400573d6000803e3d6000fd5b505050506040513d602081101561241657600080fd5b50519392505050565b6000808315156124325760009150610c61565b5082820282848281151561244257fe5b04146124be576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b60008082848115156124d357fe5b04949350505050565b6000828201838110156124be576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e0182805190602001908083835b602083106125bd5780518252601f19909201916020918201910161259e565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b018280519060200190808383602083106125bd5780518252601f19909201916020918201910161259e565b600080600061268b8585612892565b91504282111561269e5760019250610ddb565b50620151806126da85856126d56126c88561135560016112968361128a428d63ffffffff612a9116565b869063ffffffff6124dc16565b612b16565b1515612756576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b60019250610ddb565b6000808261276d8585612892565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a02815260140182815260200192505050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106129b75780518252601f199092019160209182019101612998565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015612a4457600080fd5b505af1158015612a58573d6000803e3d6000fd5b505050506040513d6020811015612a6e57600080fd5b50519050600160a060020a03811615612a8957809250610ddb565b839250610ddb565b600082821115612b10576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310612ba85780518252601f199092019160209182019101612b89565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612c3c57600080fd5b505af1158015612c50573d6000803e3d6000fd5b505050506040513d6020811015612c6657600080fd5b50511515612d1e576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742073746f726167652076616c4572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a723058201db28dac1d03a32ffcd5545f7d0479d1bf52011d0a29675bf682a8fdf395fae40029", + "deployedBytecode": "0x6080604052600436106100745763ffffffff60e060020a6000350416634bbc142c81146100795780634e49acac146100ae57806352238fdd146100cf578063666a3427146100f9578063666e1b391461011a5780636db31c251461013b578063be6fc181146101ef578063f2fde38b146102b1575b600080fd5b34801561008557600080fd5b5061009a600160a060020a03600435166102d2565b604080519115158252519081900360200190f35b3480156100ba57600080fd5b5061009a600160a060020a036004351661038e565b3480156100db57600080fd5b506100e76004356104b4565b60408051918252519081900360200190f35b34801561010557600080fd5b5061009a600160a060020a03600435166104df565b34801561012657600080fd5b5061009a600160a060020a0360043516610598565b34801561014757600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261009a94369492936024939284019190819084018382808284375050604080516020601f60608a01358b0180359182018390048302840183018552818452989b600160a060020a038b35169b838c01359b9586013515159a9199509750608090940195509193509182019181908401838280828437509497506105ad9650505050505050565b3480156101fb57600080fd5b50610204610855565b604051808781526020018681526020018581526020018481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b83811015610271578181015183820152602001610259565b50505050905090810190601f16801561029e5780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3480156102bd57600080fd5b5061009a600160a060020a036004351661092b565b3360009081526020819052604081205460ff16151561033d576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff1615156103f9576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b61040a60018363ffffffff610a6516565b15156104ac576040805160e560020a62461bcd02815260206004820152605260248201527f4572726f723a20556e61626c6520746f207365742066656520636f6e7472616360448201527f742e20456e7375726520636f6e747261637420697320616c6c6f77656420627960648201527f2073746f7261676520636f6e74726163742e0000000000000000000000000000608482015290519081900360a40190fd5b506001919050565b60006104d96104ca60013063ffffffff610c6816565b6001908463ffffffff610de316565b92915050565b3360009081526020819052604081205460ff16151561054a576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b60008060006105bb866104b4565b91506105e2336105d360018b8a63ffffffff6112d416565b6001919063ffffffff61136c16565b151561065e576040805160e560020a62461bcd02815260206004820152602d60248201527f4572726f723a20556e61626c6520746f20736574206163636f756e742073706560448201527f6e64696e6720616d6f756e742e00000000000000000000000000000000000000606482015290519081900360840190fd5b610673600189338a8a8963ffffffff6116b016565b15156106ef576040805160e560020a62461bcd02815260206004820152602a60248201527f4572726f723a20556e61626c6520746f207472616e736665722066756e64732060448201527f746f206163636f756e7400000000000000000000000000000000000000000000606482015290519081900360840190fd5b61070060013063ffffffff610c6816565b905084156107b3576107328888838561072060018363ffffffff611e3416565b6001949392919063ffffffff6116b016565b15156107ae576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b610847565b6107cb8833838561072060018363ffffffff611e3416565b1515610847576040805160e560020a62461bcd02815260206004820152602f60248201527f4572726f723a20556e61626c6520746f207472616e736665722066656573207460448201527f6f2066656520636f6e74726163742e0000000000000000000000000000000000606482015290519081900360840190fd5b506001979650505050505050565b600080808060608161087f61087160013063ffffffff610c6816565b60019063ffffffff611fe716565b6108a161089360013063ffffffff610c6816565b60019063ffffffff61213a16565b6108c36108b560013063ffffffff610c6816565b60019063ffffffff6121cb16565b6108e56108d760013063ffffffff610c6816565b60019063ffffffff61225c16565b6109076108f960013063ffffffff610c6816565b60019063ffffffff611e3416565b61091860013063ffffffff610c6816565b949b939a50919850965094509092509050565b3360009081526020819052604081205460ff161515610996576040805160e560020a62461bcd0281526020600482015260396024820152600080516020612d6a8339815191526044820152600080516020612d2a833981519152606482015290519081900360840190fd5b600160a060020a03821615156109f6576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b604080517f6665652e6163636f756e74000000000000000000000000000000000000000000602080830191909152606060020a3002602b8301528251601f818403018152603f909201928390528151600093849392909182918401908083835b60208310610ae45780518252601f199092019160209182019101610ac5565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fca446dd900000000000000000000000000000000000000000000000000000000845260048401829052600160a060020a038b81166024860152955191985094909416955063ca446dd9945060448083019491935090918290030181600087803b158015610b7a57600080fd5b505af1158015610b8e573d6000803e3d6000fd5b505050506040513d6020811015610ba457600080fd5b50511515610c5c576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b600191505b5092915050565b60008060008360405160200180807f6665652e6163636f756e74000000000000000000000000000000000000000000815250600b0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310610cfc5780518252601f199092019160209182019101610cdd565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015610d8957600080fd5b505af1158015610d9d573d6000803e3d6000fd5b505050506040513d6020811015610db357600080fd5b50519050600160a060020a0381161515610dd757610dd0856122ed565b9250610ddb565b8092505b505092915050565b8254604080517f6665652e6d617800000000000000000000000000000000000000000000000000602080830191909152600160a060020a03868116606060020a0260278401528351808403601b018152603b9093019384905282516000958695869586958695869594169363bd02d0f593918291908401908083835b60208310610e7e5780518252601f199092019160209182019101610e5f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015610edf57600080fd5b505af1158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b50518954604080517f6665652e6d696e00000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b909301938490528251959a509093169363bd02d0f5939192918291908401908083835b60208310610f9f5780518252601f199092019160209182019101610f80565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561100057600080fd5b505af1158015611014573d6000803e3d6000fd5b505050506040513d602081101561102a57600080fd5b50518954604080517f6665652e62707300000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260278401528351808403601b018152603b9093019384905282519599509093169363bd02d0f5939192918291908401908083835b602083106110c05780518252601f1990920191602091820191016110a1565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561112157600080fd5b505af1158015611135573d6000803e3d6000fd5b505050506040513d602081101561114b57600080fd5b50518954604080517f6665652e666c6174000000000000000000000000000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260288401528351808403601c018152603c9093019384905282519598509093169363bd02d0f5939192918291908401908083835b602083106111e15780518252601f1990920191602091820191016111c2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561124257600080fd5b505af1158015611256573d6000803e3d6000fd5b505050506040513d602081101561126c57600080fd5b505191506112a28261129661271061128a8b8863ffffffff61241f16565b9063ffffffff6124c516565b9063ffffffff6124dc16565b9050848111156112b4578495506112c8565b838110156112c4578395506112c8565b8095505b50505050509392505050565b600080600080611319876040805190810160405280600481526020017f555344780000000000000000000000000000000000000000000000000000000081525061255f565b9250611325878761255f565b915061136182600a0a61128a85600a0a61135561271061128a6113488e8e61261f565b8c9063ffffffff61241f16565b9063ffffffff61241f16565b979650505050505050565b600080600061137b868661267c565b15156113f7576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b61140584611296888861275f565b9150816114128787612801565b101561148e576040805160e560020a62461bcd02815260206004820152603360248201527f4572726f723a204163636f756e742063616e6e6f74206578636565642069747360448201527f206461696c79207370656e64206c696d69742e00000000000000000000000000606482015290519081900360840190fd5b846114998787612892565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061152e5780518252601f19909201916020918201910161150f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208c547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018a90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b1580156115c257600080fd5b505af11580156115d6573d6000803e3d6000fd5b505050506040513d60208110156115ec57600080fd5b505115156116a4576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b50600195945050505050565b60008080600160a060020a038616151561173a576040805160e560020a62461bcd02815260206004820152602560248201527f4572726f723a2060746f602061646472657373206d757374206e6f742062652060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b876117458a89612923565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b6020831061179f5780518252601f199092019160209182019101611780565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106118215780518252601f199092019160209182019101611802565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902091508761185b8a88612923565b60405160200180807f746f6b656e2e62616c616e636500000000000000000000000000000000000000815250600d0183805190602001908083835b602083106118b55780518252601f199092019160209182019101611896565b6001836020036101000a03801982511681845116808217855250505050505090500182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106119375780518252601f199092019160209182019101611918565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208f547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018a90529451909750600160a060020a03909416955063e2a4853a94508793611a0893508b92879263bd02d0f5926024808401938290030181600087803b1580156119d057600080fd5b505af11580156119e4573d6000803e3d6000fd5b505050506040513d60208110156119fa57600080fd5b50519063ffffffff612a9116565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015611a5057600080fd5b505af1158015611a64573d6000803e3d6000fd5b505050506040513d6020811015611a7a57600080fd5b50511515611b32576040805160e560020a62461bcd0281526020600482015260696024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b8854604080517fbd02d0f5000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163e2a4853a918491611bdf918a91869163bd02d0f59160248083019260209291908290030181600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050506040513d6020811015611bd157600080fd5b50519063ffffffff6124dc16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050602060405180830381600087803b158015611c2757600080fd5b505af1158015611c3b573d6000803e3d6000fd5b505050506040513d6020811015611c5157600080fd5b50511515611d09576040805160e560020a62461bcd0281526020600482015260696024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420686173206160648201527f6c6c6f776564207065726d697373696f6e7320776974682073746f726167652060848201527f636f6e74726163742e000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b85600160a060020a031687600160a060020a03167f6f3dcde00ed34d4f404b335a65d18fb4adf74f5b817aa46f5d7c4f05c6d1e96e8a8888604051808060200184815260200180602001838103835286818151815260200191508051906020019080838360005b83811015611d88578181015183820152602001611d70565b50505050905090810190601f168015611db55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611de8578181015183820152602001611dd0565b50505050905090810190601f168015611e155780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a350600198975050505050505050565b606060008260405160200180807f6665652e6d73670000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310611ec75780518252601f199092019160209182019101611ea8565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812089547fc031a180000000000000000000000000000000000000000000000000000000008352600483018290529351909650600160a060020a03909316945063c031a1809350602480820193600093509182900301818387803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f9457600080fd5b810190808051640100000000811115611fac57600080fd5b82016020810184811115611fbf57600080fd5b8151640100000000811182820187101715611fd957600080fd5b509098975050505050505050565b6000808260405160200180807f6665652e6270730000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106120795780518252601f19909201916020918201910161205a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547fbd02d0f5000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a03909416955063bd02d0f5945060248083019491935090918290030181600087803b15801561210657600080fd5b505af115801561211a573d6000803e3d6000fd5b505050506040513d602081101561213057600080fd5b5051949350505050565b6000808260405160200180807f6665652e6d696e0000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6665652e6d61780000000000000000000000000000000000000000000000000081525060070182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6665652e666c617400000000000000000000000000000000000000000000000081525060080182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b60008060405160200180807f6665652e636f6e74726163742e6d61737465720000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b6020831061235f5780518252601f199092019160209182019101612340565b51815160209384036101000a60001901801990921691161790526040805192909401829003822089547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b1580156123ec57600080fd5b505af1158015612400573d6000803e3d6000fd5b505050506040513d602081101561241657600080fd5b50519392505050565b6000808315156124325760009150610c61565b5082820282848281151561244257fe5b04146124be576040805160e560020a62461bcd02815260206004820152602760248201527f4572726f723a20556e73616665206d756c7469706c69636174696f6e206f706560448201527f726174696f6e2100000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b60008082848115156124d357fe5b04949350505050565b6000828201838110156124be576040805160e560020a62461bcd02815260206004820152602160248201527f4572726f723a20556e73616665206164646974696f6e206f7065726174696f6e60448201527f2100000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000808260405160200180807f746f6b656e2e646563696d616c73000000000000000000000000000000000000815250600e0182805190602001908083835b602083106125bd5780518252601f19909201916020918201910161259e565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f66782e7573642e72617465000000000000000000000000000000000000000000815250600b018280519060200190808383602083106125bd5780518252601f19909201916020918201910161259e565b600080600061268b8585612892565b91504282111561269e5760019250610ddb565b50620151806126da85856126d56126c88561135560016112968361128a428d63ffffffff612a9116565b869063ffffffff6124dc16565b612b16565b1515612756576040805160e560020a62461bcd02815260206004820152603060248201527f4572726f723a20556e61626c6520746f20757064617465206163636f756e742060448201527f7370656e64696e6720706572696f642e00000000000000000000000000000000606482015290519081900360840190fd5b60019250610ddb565b6000808261276d8585612892565b60405160200180807f6163636f756e742e7370656e64696e672e616d6f756e7400000000000000000081525060170183600160a060020a0316600160a060020a0316606060020a02815260140182815260200192505050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6163636f756e742e7370656e64696e672e6c696d69740000000000000000000081525060160182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b6000808260405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a028152601401915050604051602081830303815290604052604051808280519060200190808383602083106120795780518252601f19909201916020918201910161205a565b60008060008360405160200180807f6d61737465722e6163636f756e74000000000000000000000000000000000000815250600e0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106129b75780518252601f199092019160209182019101612998565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909850600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b158015612a4457600080fd5b505af1158015612a58573d6000803e3d6000fd5b505050506040513d6020811015612a6e57600080fd5b50519050600160a060020a03811615612a8957809250610ddb565b839250610ddb565b600082821115612b10576040805160e560020a62461bcd028152602060048201526024808201527f4572726f723a20556e73616665207375627472616374696f6e206f706572617460448201527f696f6e2100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50900390565b6000808360405160200180807f6c696d69742e7370656e64696e672e706572696f64000000000000000000000081525060150182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b60208310612ba85780518252601f199092019160209182019101612b89565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208b547fe2a4853a00000000000000000000000000000000000000000000000000000000845260048401829052602484018b90529451909750600160a060020a03909416955063e2a4853a945060448083019491935090918290030181600087803b158015612c3c57600080fd5b505af1158015612c50573d6000803e3d6000fd5b505050506040513d6020811015612c6657600080fd5b50511515612d1e576040805160e560020a62461bcd0281526020600482015260686024820152600080516020612d4a83398151915260448201527f75652e20506c6561736520656e7375726520636f6e747261637420696e74657260648201527f6661636520697320616c6c6f776564206279207468652073746f72616765206360848201527f6f6e74726163742e00000000000000000000000000000000000000000000000060a482015290519081900360c40190fd5b506001949350505050560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a20556e61626c6520746f207365742073746f726167652076616c4572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a723058201db28dac1d03a32ffcd5545f7d0479d1bf52011d0a29675bf682a8fdf395fae40029", + "sourceMap": "874:4078:9:-;;;1215:515;8:9:-1;5:2;;;30:1;27;20:12;5:2;1215:515:9;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1215:515:9;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1593:46:9;;-1:-1:-1;;;;;;1593:46:9;-1:-1:-1;;;;;1593:46:9;;;;;;;;;1699:24;;;;;;;;874:4078;;;;;;;;", + "deployedSourceMap": "874:4078:9:-;;;;;;;;;-1:-1:-1;;;874:4078:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;;;;;;;;;;;;;;;;;;;1937:260:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1937:260:9;-1:-1:-1;;;;;1937:260:9;;;;;3177:150;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3177:150:9;;;;;;;;;;;;;;;;;;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;3861:1088:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3861:1088:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3861:1088:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3861:1088:9;;;;;;;;;;;;;;;;;;-1:-1:-1;3861:1088:9;-1:-1:-1;3861:1088:9;;;;;-1:-1:-1;3861:1088:9;;-1:-1:-1;3861:1088:9;;;;;;;;;;;;;;-1:-1:-1;3861:1088:9;;-1:-1:-1;3861:1088:9;;-1:-1:-1;;;;;;;3861:1088:9;2462:484;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2462:484:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2462:484:9;-1:-1:-1;;;;;2462:484:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2462:484:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2127:185;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;1937:260:9:-;1261:10:1;2015:12:9;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;2045:31:9;:3;2064:11;2045:31;:18;:31;:::i;:::-;2037:134;;;;;;;-1:-1:-1;;;;;2037:134:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2186:4:9;1937:260;;;:::o;3177:150::-;3234:9;3260:60;3278:33;:3;3305:4;3278:33;:18;:33;:::i;:::-;3260:3;;3313:6;3260:60;:17;:60;:::i;:::-;3253:67;3177:150;-1:-1:-1;;3177:150:9:o;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;3861:1088:9:-;3973:12;3995:9;4386:19;4007:21;4021:6;4007:13;:21::i;:::-;3995:33;-1:-1:-1;4107:78:9;4136:10;4148:36;:3;4167:8;4177:6;4148:36;:18;:36;:::i;:::-;4107:3;;:78;;:28;:78;:::i;:::-;4099:144;;;;;;;-1:-1:-1;;;;;4099:144:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4259:63;:3;4277:8;4287:10;4299:8;4309:6;4317:4;4259:63;:17;:63;:::i;:::-;4251:126;;;;;;;-1:-1:-1;;;;;4251:126:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4408:33;:3;4435:4;4408:33;:18;:33;:::i;:::-;4386:55;;4549:16;4545:378;;;4585:84;4603:8;4613;4623:11;4636:4;4642:26;:3;4623:11;4642:26;:13;:26;:::i;:::-;4585:3;;:84;;;;;:17;:84;:::i;:::-;4577:154;;;;;;;-1:-1:-1;;;;;4577:154:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4545:378;;;4765:86;4783:8;4793:10;4805:11;4818:4;4824:26;:3;4805:11;4824:26;:13;:26;:::i;4765:86::-;4757:156;;;;;;;-1:-1:-1;;;;;4757:156:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4938:4:9;;3861:1088;-1:-1:-1;;;;;;;3861:1088:9:o;2462:484::-;2507:8;;;;2548:12;2507:8;2607:48;2621:33;:3;2648:4;2621:33;:18;:33;:::i;:::-;2607:3;;:48;:13;:48;:::i;:::-;2665;2679:33;:3;2706:4;2679:33;:18;:33;:::i;:::-;2665:3;;:48;:13;:48;:::i;:::-;2723;2737:33;:3;2764:4;2737:33;:18;:33;:::i;:::-;2723:3;;:48;:13;:48;:::i;:::-;2781:49;2796:33;:3;2823:4;2796:33;:18;:33;:::i;:::-;2781:3;;:49;:14;:49;:::i;:::-;2840:48;2854:33;:3;2881:4;2854:33;:18;:33;:::i;:::-;2840:3;;:48;:13;:48;:::i;:::-;2898:33;:3;2925:4;2898:33;:18;:33;:::i;:::-;2590:349;;;;-1:-1:-1;2590:349:9;;-1:-1:-1;2590:349:9;-1:-1:-1;2590:349:9;-1:-1:-1;2590:349:9;;-1:-1:-1;2462:484:9;-1:-1:-1;2462:484:9:o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;11025:375:8:-;11150:46;;;;;;;;;;;;-1:-1:-1;;;11190:4:8;11150:46;;;;;;;22:32:-1;26:21;;;22:32;6:49;;11150:46:8;;;;;;;;11140:57;;11107:12;;;;11150:46;;;;;11140:57;;;;11150:46;11140:57;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;11140:57:8;;;;;;;;;;;;11218:12;;:40;;;;;;;;;-1:-1:-1;;;;;11218:40:8;;;;;;;;;11140:57;;-1:-1:-1;11218:12:8;;;;;-1:-1:-1;11218:23:8;;-1:-1:-1;11218:40:8;;;;;263:2:-1;;-1:-1;11218:40:8;;;;;;;-1:-1:-1;11218:12:8;:40;;;5:2:-1;;;;30:1;27;20:12;5:2;11218:40:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11218:40:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11218:40:8;11203:175;;;;;;;-1:-1:-1;;;;;11203:175:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11203:175:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11391:4;11384:11;;11025:375;;;;;;:::o;26724:364::-;26815:19;26842:10;26921:18;26897:15;26865:48;;;;;;;;;;;;;-1:-1:-1;;;;;26865:48:8;-1:-1:-1;;;;;26865:48:8;-1:-1:-1;;;26865:48:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;26865:48:8;;;26855:59;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26855:59:8;;;;;;;;;;;;26942:12;;:27;;;;;;;;;;;26855:59;;-1:-1:-1;;;;;;26942:12:8;;;;-1:-1:-1;26942:23:8;;-1:-1:-1;26942:27:8;;;;;263:2:-1;;-1:-1;26942:27:8;;;;;;;-1:-1:-1;26942:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;26942:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26942:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26942:27:8;;-1:-1:-1;;;;;;26979:17:8;;;26975:109;;;27013:26;27034:4;27013:20;:26::i;:::-;27006:33;;;;26975:109;27067:10;27060:17;;26975:109;26724:364;;;;;;:::o;31066:722::-;31211:12;;31242:44;;;;;;;;;;;;-1:-1:-1;;;;;31242:44:8;;;-1:-1:-1;;;31242:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31242:44:8;;;;;;;;31232:55;;-1:-1:-1;;;;;;;;;;;;31211:12:8;;;:20;;31242:44;;;31232:55;;;;;31242:44;31232:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31232:55:8;;;;;;;;;;;;31211:77;;;-1:-1:-1;;;31211:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31211:77:8;;;;;;;-1:-1:-1;31211:77:8;-1:-1:-1;31211:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31211:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31211:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31211:77:8;31308:12;;31339:44;;;;31211:77;31339:44;;;;;;;-1:-1:-1;;;;;31339:44:8;;;-1:-1:-1;;;31339:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31339:44:8;;;;;;;;31329:55;;31211:77;;-1:-1:-1;31308:12:8;;;;:20;;31339:44;;;;;31329:55;;;;;31339:44;31329:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31329:55:8;;;;;;;;;;;;31308:77;;;-1:-1:-1;;;31308:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31308:77:8;;;;;;;-1:-1:-1;31308:77:8;-1:-1:-1;31308:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31308:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31308:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31308:77:8;31405:12;;31436:44;;;;31308:77;31436:44;;;;;;;-1:-1:-1;;;;;31436:44:8;;;-1:-1:-1;;;31436:44:8;;;;;;;26:21:-1;;;22:32;;6:49;;31436:44:8;;;;;;;;31426:55;;31308:77;;-1:-1:-1;31405:12:8;;;;:20;;31436:44;;;;;31426:55;;;;;31436:44;31426:55;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31426:55:8;;;;;;;;;;;;31405:77;;;-1:-1:-1;;;31405:77:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31405:77:8;;;;;;;-1:-1:-1;31405:77:8;-1:-1:-1;31405:77:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31405:77:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31405:77:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31405:77:8;31503:12;;31534:45;;;;31405:77;31534:45;;;;;;;-1:-1:-1;;;;;31534:45:8;;;-1:-1:-1;;;31534:45:8;;;;;;;26:21:-1;;;22:32;;6:49;;31534:45:8;;;;;;;;31524:56;;31405:77;;-1:-1:-1;31503:12:8;;;;:20;;31534:45;;;;;31524:56;;;;;31534:45;31524:56;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;31524:56:8;;;;;;;;;;;;31503:78;;;-1:-1:-1;;;31503:78:8;;;;;;;;;;;;;;-1:-1:-1;263:2;;-1:-1;31503:78:8;;;;;;;-1:-1:-1;31503:78:8;-1:-1:-1;31503:78:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;31503:78:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31503:78:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31503:78:8;;-1:-1:-1;31599:46:8;31503:78;31600:31;31625:5;31601:18;:6;31612;31601:18;:10;:18;:::i;:::-;31600:24;:31;:24;:31;:::i;:::-;31599:37;:46;:37;:46;:::i;:::-;31587:58;;31663:6;31656:4;:13;31652:132;;;31686:6;31679:13;;;;31652:132;31716:6;31709:4;:13;31705:79;;;31739:6;31732:13;;;;31705:79;31773:4;31766:11;;31705:79;31066:722;;;;;;;;;;:::o;64445:441::-;64543:11;64562:16;64617:15;64741:14;64581:30;64598:4;64581:30;;;;;;;;;;;;;;;;;;:16;:30::i;:::-;64562:49;;64635:32;64652:4;64658:8;64635:16;:32::i;:::-;64617:50;;64758:101;64848:10;64844:2;:14;64759:79;64826:11;64822:2;:15;64760:56;64810:5;64760:45;64773:31;64789:4;64795:8;64773:15;:31::i;:::-;64760:8;;:45;:12;:45;:::i;:56::-;64759:62;:79;:62;:79;:::i;64758:101::-;64741:118;64445:441;-1:-1:-1;;;;;;;64445:441:8:o;59595:1002::-;59696:12;59924:18;60289:10;59816:42;59844:4;59850:7;59816:27;:42::i;:::-;59808:109;;;;;;;-1:-1:-1;;;;;59808:109:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59945:51;59989:6;59945:39;59970:4;59976:7;59945:24;:39::i;:51::-;59924:72;;60144:13;60102:38;60126:4;60132:7;60102:23;:38::i;:::-;:55;;60087:132;;;;;-1:-1:-1;;;;;60087:132:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60356:7;60365:39;60390:4;60396:7;60365:24;:39::i;:::-;60312:93;;;;;;;;;;;;;-1:-1:-1;;;;;60312:93:8;-1:-1:-1;;;;;60312:93:8;-1:-1:-1;;;60312:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;60312:93:8;;;60302:104;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;60302:104:8;;;;;;;;;;;;60420:12;;:39;;;;;;;;;;;;;;;;;60302:104;;-1:-1:-1;;;;;;60420:12:8;;;;-1:-1:-1;60420:20:8;;-1:-1:-1;60420:39:8;;;;;263:2:-1;;-1:-1;60420:39:8;;;;;;;-1:-1:-1;60420:12:8;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;60420:39:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;60420:39:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;60420:39:8;60412:162;;;;;;;-1:-1:-1;;;;;60412:162:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;60412:162:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;60588:4:8;;59595:1002;-1:-1:-1;;;;;59595:1002:8:o;38207:943::-;38335:12;;;-1:-1:-1;;;;;38370:18:8;;;;38355:86;;;;;-1:-1:-1;;;;;38355:86:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38507:8;38517:31;38537:4;38543;38517:19;:31::i;:::-;38473:76;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38473:76:8;;;;;;;-1:-1:-1;;;;;38473:76:8;-1:-1:-1;;;;;38473:76:8;-1:-1:-1;;;38473:76:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38473:76:8;;;38463:87;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38463:87:8;;;;;;;;;;;;;;;;38448:102;;38615:8;38625:29;38645:4;38651:2;38625:19;:29::i;:::-;38581:74;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;38581:74:8;;;;;;;-1:-1:-1;;;;;38581:74:8;-1:-1:-1;;;;;38581:74:8;-1:-1:-1;;;38581:74:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;38581:74:8;;;38571:85;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;38571:85:8;;;;;;;;;;;;38678:12;;38705:26;;;;;;;;;;;38571:85;;-1:-1:-1;;;;;;38678:12:8;;;;-1:-1:-1;38678:20:8;;-1:-1:-1;38705:26:8;;:38;;-1:-1:-1;38736:6:8;;38678:12;;38705:20;;:26;;;;;;;;;;-1:-1:-1;38678:12:8;38705:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38705:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38705:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38705:26:8;;:38;:30;:38;:::i;:::-;38678:66;;;;;-1:-1:-1;;;38678:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38678:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38678:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38678:66:8;38663:202;;;;;;;-1:-1:-1;;;;;38663:202:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;38663:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38886:12;;38913:26;;;;;;;;;;;;;;-1:-1:-1;;;;;38886:12:8;;;;:20;;38907:4;;38913:38;;38944:6;;38886:12;;38913:20;;:26;;;;;;;;;;;;;;38886:12;;38913:26;;;5:2:-1;;;;30:1;27;20:12;5:2;38913:26:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38913:26:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38913:26:8;;:38;:30;:38;:::i;:::-;38886:66;;;;;-1:-1:-1;;;38886:66:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;38886:66:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38886:66:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;38886:66:8;38871:202;;;;;;;-1:-1:-1;;;;;38871:202:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;38871:202:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39110:2;-1:-1:-1;;;;;39085:42:8;39104:4;-1:-1:-1;;;;;39085:42:8;;39094:8;39114:6;39122:4;39085:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39085:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39085:42:8;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;39085:42:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39141:4:8;;38207:943;-1:-1:-1;;;;;;;;38207:943:8:o;24580:217::-;24666:12;24686:10;24737:15;24709:44;;;;;;;;;;;;;-1:-1:-1;;;;;24709:44:8;-1:-1:-1;;;;;24709:44:8;-1:-1:-1;;;24709:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24709:44:8;;;24699:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;24699:55:8;;;;;;;;;;;;24767:12;;:25;;;;;;;;;;;24699:55;;-1:-1:-1;;;;;;24767:12:8;;;;-1:-1:-1;24767:21:8;;-1:-1:-1;24767:25:8;;;;;-1:-1:-1;;;24767:25:8;;;;;;-1:-1:-1;24767:12:8;:25;;;5:2:-1;;;;30:1;27;20:12;5:2;24767:25:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;24767:25:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;24767:25:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;24767:25:8;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;-1:-1;24767:25:8;;24580:217;-1:-1:-1;;;;;;;;24580:217:8:o;22194:215::-;22280:11;22299:10;22350:15;22322:44;;;;;;;;;;;;;-1:-1:-1;;;;;22322:44:8;-1:-1:-1;;;;;22322:44:8;-1:-1:-1;;;22322:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22322:44:8;;;22312:55;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;22312:55:8;;;;;;;;;;;;22380:12;;:24;;;;;;;;;;;22312:55;;-1:-1:-1;;;;;;22380:12:8;;;;-1:-1:-1;22380:20:8;;-1:-1:-1;22380:24:8;;;;;263:2:-1;;-1:-1;22380:24:8;;;;;;;-1:-1:-1;22380:12:8;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;22380:24:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;22380:24:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22380:24:8;;22194:215;-1:-1:-1;;;;22194:215:8:o;22789:::-;22875:11;22894:10;22945:15;22917:44;;;;;;;;;;;;;-1:-1:-1;;;;;22917:44:8;-1:-1:-1;;;;;22917:44:8;-1:-1:-1;;;22917:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;22917:44:8;;;22907:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23384:215:8;23470:11;23489:10;23540:15;23512:44;;;;;;;;;;;;;-1:-1:-1;;;;;23512:44:8;-1:-1:-1;;;;;23512:44:8;-1:-1:-1;;;23512:44:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;23512:44:8;;;23502:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;23974:218:8;24061:12;24081:10;24133:15;24104:45;;;;;;;;;;;;;-1:-1:-1;;;;;24104:45:8;-1:-1:-1;;;;;24104:45:8;-1:-1:-1;;;24104:45:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24104:45:8;;;24094:56;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;25924:213:8;25996:25;26029:10;26052:39;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;26052:39:8;;;26042:50;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26042:50:8;;;;;;;;;;;;26105:12;;:27;;;;;;;;;;;26042:50;;-1:-1:-1;;;;;;26105:12:8;;;;-1:-1:-1;26105:23:8;;-1:-1:-1;26105:27:8;;;;;263:2:-1;;-1:-1;26105:27:8;;;;;;;-1:-1:-1;26105:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;26105:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26105:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26105:27:8;;25924:213;-1:-1:-1;;;25924:213:8:o;301:224:2:-;359:14;;385:6;;381:35;;;408:1;401:8;;;;381:35;-1:-1:-1;433:5:2;;;437:1;433;:5;452;;;;;;;;:10;444:62;;;;;-1:-1:-1;;;;;444:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;519:1;301:224;-1:-1:-1;;;301:224:2:o;697:284::-;755:14;857:9;873:1;869;:5;;;;;;;;;697:284;-1:-1:-1;;;;697:284:2:o;1540:174::-;1598:14;1632:5;;;1651:6;;;;1643:52;;;;;-1:-1:-1;;;;;1643:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21583:221:8;21668:18;21694:10;21752:8;21717:44;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;21717:44:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;21717:44:8;;;21707:55;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;63876:211:8;63960:12;63980:10;64035:8;64003:41;;;;;;;;;;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;61052:503:8;61143:12;61163;61282:13;61178:39;61203:4;61209:7;61178:24;:39::i;:::-;61163:54;;61237:3;61227:7;:13;61223:328;;;61257:4;61250:11;;;;61223:328;-1:-1:-1;61298:5:8;61354:109;61379:4;61385:7;61394:68;61406:55;61298:5;61407:39;61444:1;61407:32;61298:5;61408:16;:3;61416:7;61408:16;:7;:16;:::i;61406:55::-;61394:7;;:68;:11;:68;:::i;:::-;61354:24;:109::i;:::-;61337:187;;;;;;;-1:-1:-1;;;;;61337:187:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61540:4;61533:11;;;;61913:271;62006:11;62025:10;62092:7;62101:39;62126:4;62132:7;62101:24;:39::i;:::-;62048:93;;;;;;;;;;;;;-1:-1:-1;;;;;62048:93:8;-1:-1:-1;;;;;62048:93:8;-1:-1:-1;;;62048:93:8;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;62048:93:8;;;62038:104;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;58783:227:8;58875:10;58893;58959:7;58916:51;;;;;;;;;;;;;-1:-1:-1;;;;;58916:51:8;-1:-1:-1;;;;;58916:51:8;-1:-1:-1;;;58916:51:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;58916:51:8;;;58906:62;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;57484:228:8;57577:11;57596:10;57661:7;57619:50;;;;;;;;;;;;;-1:-1:-1;;;;;57619:50:8;-1:-1:-1;;;;;57619:50:8;-1:-1:-1;;;57619:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;57619:50:8;;;57609:61;;;;;;;;;;;;;66:2:-1;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;16400:357:8;16488:25;16521:10;16594:23;16579:7;16544:43;;;;;;;;;;;;;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;;;16544:43:8;-1:-1:-1;;;16544:43:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16544:43:8;;;16534:54;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;16534:54:8;;;;;;;;;;;;16620:12;;:27;;;;;;;;;;;16534:54;;-1:-1:-1;;;;;;16620:12:8;;;;-1:-1:-1;16620:23:8;;-1:-1:-1;16620:27:8;;;;;263:2:-1;;-1:-1;16620:27:8;;;;;;;-1:-1:-1;16620:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;16620:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16620:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16620:27:8;;-1:-1:-1;;;;;;16657:22:8;;;16653:100;;16696:15;16689:22;;;;16653:100;16739:7;16732:14;;;;1143:234:2;1201:14;1307:6;;;;1299:55;;;;;-1:-1:-1;;;;;1299:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1367:5:2;;;1143:234::o;56626:379:8:-;56727:12;56747:10;56812:7;56770:50;;;;;;;;;;;;;-1:-1:-1;;;;;56770:50:8;-1:-1:-1;;;;;56770:50:8;-1:-1:-1;;;56770:50:8;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;56770:50:8;;;56760:61;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;56760:61:8;;;;;;;;;;;;56835:12;;:32;;;;;;;;;;;;;;;;;56760:61;;-1:-1:-1;;;;;;56835:12:8;;;;-1:-1:-1;56835:20:8;;-1:-1:-1;56835:32:8;;;;;263:2:-1;;-1:-1;56835:32:8;;;;;;;-1:-1:-1;56835:12:8;:32;;;5:2:-1;;;;30:1;27;20:12;5:2;56835:32:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;56835:32:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;56835:32:8;56827:155;;;;;;;-1:-1:-1;;;;;56827:155:8;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;56827:155:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;56996:4:8;;56626:379;-1:-1:-1;;;;56626:379:8:o", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\n/*\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title TokenIOMerchant - Merchant Interface Smart Contract for Token, Inc.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n*/\n\n\ncontract TokenIOMerchant is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n * @notice Constructor method for Merchant contract\n * @param _storageContract Ethereum Address of TokenIOStorage contract\n */\n constructor(address _storageContract) public {\n /*\n * @notice Set the storage contract for the interface\n * @dev This contract will be unable to use the storage constract until\n * @dev contract address is authorized with the storage contract\n * @dev Once authorized, you can setRegisteredFirm and setRegisteredAuthority\n */\n lib.Storage = TokenIOStorage(_storageContract);\n\n /// @dev set owner to contract initiator\n owner[msg.sender] = true;\n }\n\n /**\n @notice Sets Merchant globals and fee paramters\n @param feeContract Address of fee contract\n @return { \"success\" : \"Returns true if successfully called from another contract\"}\n */\n function setParams(\n address feeContract\n ) onlyOwner public returns (bool success) {\n require(lib.setFeeContract(feeContract),\n \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\");\n return true;\n }\n\n /**\n * @notice Gets fee parameters\n * @return {\n \"bps\":\"Fee amount as a mesuare of basis points\",\n \"min\":\"Minimum fee amount\",\n \"max\":\"Maximum fee amount\",\n \"flat\":\"Flat fee amount\",\n \"contract\":\"Address of fee contract\"\n }\n */\n function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) {\n return (\n lib.getFeeBPS(lib.getFeeContract(address(this))),\n lib.getFeeMin(lib.getFeeContract(address(this))),\n lib.getFeeMax(lib.getFeeContract(address(this))),\n lib.getFeeFlat(lib.getFeeContract(address(this))),\n lib.getFeeMsg(lib.getFeeContract(address(this))),\n lib.getFeeContract(address(this))\n );\n }\n\n /**\n * @notice Calculates fee of a given transfer amount\n * @param amount Amount to calculcate fee value\n * @return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}\n */\n function calculateFees(uint amount) public view returns (uint fees) {\n return lib.calculateFees(lib.getFeeContract(address(this)), amount);\n }\n\n /**\n * @notice Pay method for merchant interface\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param merchant Ethereum address of merchant\n * @param amount Amount of currency to send to merchant\n * @param merchantPaysFees Provide option for merchant to pay the transaction fees\n * @param data Optional data to be included when paying the merchant (e.g. item receipt)\n * @return { \"success\" : \"Returns true if successfully called from another contract\"}\n */\n function pay(string currency, address merchant, uint amount, bool merchantPaysFees, bytes data) public returns (bool success) {\n uint fees = calculateFees(amount);\n /// @dev note the spending amount limit is gross of fees\n require(lib.setAccountSpendingAmount(msg.sender, lib.getFxUSDAmount(currency, amount)),\n \"Error: Unable to set account spending amount.\");\n require(lib.forceTransfer(currency, msg.sender, merchant, amount, data),\n \"Error: Unable to transfer funds to account\");\n\n address feeContract = lib.getFeeContract(address(this));\n /// @dev If merchantPaysFees == true, the merchant will pay the fees to the fee contract;\n if (merchantPaysFees) {\n require(lib.forceTransfer(currency, merchant, feeContract, fees, lib.getFeeMsg(feeContract)),\n \"Error: Unable to transfer fees to fee contract.\");\n\n } else {\n require(lib.forceTransfer(currency, msg.sender, feeContract, fees, lib.getFeeMsg(feeContract)),\n \"Error: Unable to transfer fees to fee contract.\");\n\n }\n\n return true;\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOMerchant.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOMerchant.sol", + "exportedSymbols": { + "TokenIOMerchant": [ + 4843 + ] + }, + "id": 4844, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4608, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:9" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4609, + "nodeType": "ImportDirective", + "scope": 4844, + "sourceUnit": 185, + "src": "25:23:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 4610, + "nodeType": "ImportDirective", + "scope": 4844, + "sourceUnit": 5226, + "src": "49:30:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 4611, + "nodeType": "ImportDirective", + "scope": 4844, + "sourceUnit": 4607, + "src": "80:26:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4612, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "902:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4613, + "nodeType": "InheritanceSpecifier", + "src": "902:7:9" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4843, + "linearizedBaseContracts": [ + 4843, + 184 + ], + "name": "TokenIOMerchant", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4616, + "libraryName": { + "contractScope": null, + "id": 4614, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1006:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1000:37:9", + "typeName": { + "contractScope": null, + "id": 4615, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1021:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 4618, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 4843, + "src": "1042:19:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4617, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1042:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4638, + "nodeType": "Block", + "src": "1260:470:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4623, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "1593:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4625, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1593:11:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4627, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4620, + "src": "1622:16:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4626, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1607:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 4628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1607:32:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1593:46:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4630, + "nodeType": "ExpressionStatement", + "src": "1593:46:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4631, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1699:5:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4634, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4632, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1705:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1705:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1699:17:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1719:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1699:24:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4637, + "nodeType": "ExpressionStatement", + "src": "1699:24:9" + } + ] + }, + "documentation": "@notice Constructor method for Merchant contract\n@param _storageContract Ethereum Address of TokenIOStorage contract", + "id": 4639, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4620, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 4639, + "src": "1227:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4619, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1227:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1226:26:9" + }, + "payable": false, + "returnParameters": { + "id": 4622, + "nodeType": "ParameterList", + "parameters": [], + "src": "1260:0:9" + }, + "scope": 4843, + "src": "1215:515:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4658, + "nodeType": "Block", + "src": "2029:168:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4651, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4641, + "src": "2064:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4649, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2045:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4650, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2086, + "src": "2045:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2045:31:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742e20456e7375726520636f6e747261637420697320616c6c6f7765642062792073746f7261676520636f6e74726163742e", + "id": 4653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2086:84:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e05a6836836cb77baea52eb421ebbf742058dce5c126f5d3343064b07960fe4", + "typeString": "literal_string \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\"" + }, + "value": "Error: Unable to set fee contract. Ensure contract is allowed by storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e05a6836836cb77baea52eb421ebbf742058dce5c126f5d3343064b07960fe4", + "typeString": "literal_string \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\"" + } + ], + "id": 4648, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2037:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2037:134:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4655, + "nodeType": "ExpressionStatement", + "src": "2037:134:9" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2186:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4647, + "id": 4657, + "nodeType": "Return", + "src": "2179:11:9" + } + ] + }, + "documentation": "@notice Sets Merchant globals and fee paramters\n@param feeContract Address of fee contract\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4644, + "modifierName": { + "argumentTypes": null, + "id": 4643, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1989:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1989:9:9" + } + ], + "name": "setParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4641, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 4659, + "src": "1963:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1963:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1955:33:9" + }, + "payable": false, + "returnParameters": { + "id": 4647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4646, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4659, + "src": "2015:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4645, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2015:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2014:14:9" + }, + "scope": 4843, + "src": "1937:260:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4727, + "nodeType": "Block", + "src": "2582:364:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4679, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2648:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2640:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2640:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4676, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2621:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4677, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2621:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4674, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2607:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4675, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2522, + "src": "2607:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2607:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4688, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2706:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2698:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2698:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4685, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2679:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4686, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2679:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2679:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4683, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2665:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4684, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2548, + "src": "2665:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2665:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4697, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2764:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2756:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2756:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4694, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2737:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4695, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2737:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2737:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4692, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2723:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "2723:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2723:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4706, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2823:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2815:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2815:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4703, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2796:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2796:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2796:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4701, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2781:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4702, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2600, + "src": "2781:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2781:49:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4715, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2881:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4714, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2873:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2873:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4712, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2854:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4713, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2854:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2854:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4710, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2840:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4711, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "2840:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2840:48:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4722, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2925:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2917:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2917:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4719, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2898:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4720, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2898:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2898:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 4725, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2597:342:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 4673, + "id": 4726, + "nodeType": "Return", + "src": "2590:349:9" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Fee amount as a mesuare of basis points\",\n\"min\":\"Minimum fee amount\",\n\"max\":\"Maximum fee amount\",\n\"flat\":\"Flat fee amount\",\n\"contract\":\"Address of fee contract\"\n}", + "id": 4728, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4660, + "nodeType": "ParameterList", + "parameters": [], + "src": "2483:2:9" + }, + "payable": false, + "returnParameters": { + "id": 4673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4662, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2507:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4661, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2507:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4664, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2517:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4663, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2517:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4666, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2527:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2527:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4668, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2537:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4667, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2537:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4670, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2548:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4669, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2548:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4672, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2562:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4671, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2562:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2506:75:9" + }, + "scope": 4843, + "src": "2462:484:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4746, + "nodeType": "Block", + "src": "3245:82:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4740, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "3305:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3297:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3297:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4737, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "3278:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4738, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "3278:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3278:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4743, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4730, + "src": "3313:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4735, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "3260:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 2988, + "src": "3260:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 4744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3260:60:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4734, + "id": 4745, + "nodeType": "Return", + "src": "3253:67:9" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount Amount to calculcate fee value\n@return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}", + "id": 4747, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4730, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4747, + "src": "3200:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4729, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3200:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3199:13:9" + }, + "payable": false, + "returnParameters": { + "id": 4734, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4733, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 4747, + "src": "3234:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4732, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3234:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3233:11:9" + }, + "scope": 4843, + "src": "3177:150:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4841, + "nodeType": "Block", + "src": "3987:962:9", + "statements": [ + { + "assignments": [ + 4763 + ], + "declarations": [ + { + "constant": false, + "id": 4763, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3995:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4762, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3995:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4767, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4753, + "src": "4021:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4764, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4747, + "src": "4007:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 4766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4007:21:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3995:33:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4771, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "4136:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4136:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4775, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4749, + "src": "4167:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4776, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4753, + "src": "4177:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4773, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4148:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4774, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFxUSDAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4605, + "src": "4148:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 4777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4148:36:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4769, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4107:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4384, + "src": "4107:28:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 4778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4107:78:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", + "id": 4779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4195:47:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + }, + "value": "Error: Unable to set account spending amount." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + } + ], + "id": 4768, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4099:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4099:144:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4781, + "nodeType": "ExpressionStatement", + "src": "4099:144:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4785, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4749, + "src": "4277:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4786, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "4287:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4287:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4788, + "name": "merchant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4751, + "src": "4299:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4789, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4753, + "src": "4309:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4790, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4757, + "src": "4317:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4783, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4259:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3335, + "src": "4259:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4259:63:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e74", + "id": 4792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4332:44:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bbf466ef45b7ce75995210021820dc27f441a75c62bed33c09723390eec8e030", + "typeString": "literal_string \"Error: Unable to transfer funds to account\"" + }, + "value": "Error: Unable to transfer funds to account" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bbf466ef45b7ce75995210021820dc27f441a75c62bed33c09723390eec8e030", + "typeString": "literal_string \"Error: Unable to transfer funds to account\"" + } + ], + "id": 4782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4251:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4251:126:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4794, + "nodeType": "ExpressionStatement", + "src": "4251:126:9" + }, + { + "assignments": [ + 4796 + ], + "declarations": [ + { + "constant": false, + "id": 4796, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "4386:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4386:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4803, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4800, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "4435:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4427:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4427:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4797, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4408:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "4408:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4408:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4386:55:9" + }, + { + "condition": { + "argumentTypes": null, + "id": 4804, + "name": "merchantPaysFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4755, + "src": "4549:16:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4837, + "nodeType": "Block", + "src": "4747:176:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4824, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4749, + "src": "4783:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4825, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "4793:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4793:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4827, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "4805:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4828, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "4818:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4831, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "4838:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4829, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4824:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4830, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "4824:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4824:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4822, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4765:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4823, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3335, + "src": "4765:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4765:86:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 4834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4863:49:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 4821, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4757:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4757:156:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4836, + "nodeType": "ExpressionStatement", + "src": "4757:156:9" + } + ] + }, + "id": 4838, + "nodeType": "IfStatement", + "src": "4545:378:9", + "trueBody": { + "id": 4820, + "nodeType": "Block", + "src": "4567:174:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4808, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4749, + "src": "4603:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4809, + "name": "merchant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4751, + "src": "4613:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4810, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "4623:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4811, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "4636:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4814, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "4656:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4812, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4642:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4813, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "4642:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4642:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4806, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4585:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3335, + "src": "4585:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:84:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 4817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4681:49:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 4805, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4577:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4577:154:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4819, + "nodeType": "ExpressionStatement", + "src": "4577:154:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4938:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4761, + "id": 4840, + "nodeType": "Return", + "src": "4931:11:9" + } + ] + }, + "documentation": "@notice Pay method for merchant interface\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param merchant Ethereum address of merchant\n@param amount Amount of currency to send to merchant\n@param merchantPaysFees Provide option for merchant to pay the transaction fees\n@param data Optional data to be included when paying the merchant (e.g. item receipt)\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4842, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "pay", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4758, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4749, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3874:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4748, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3874:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4751, + "name": "merchant", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3891:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4750, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3891:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4753, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3909:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4752, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3909:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4755, + "name": "merchantPaysFees", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3922:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4754, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3922:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4757, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3945:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4756, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3945:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3873:83:9" + }, + "payable": false, + "returnParameters": { + "id": 4761, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4760, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3973:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4759, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3973:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3972:14:9" + }, + "scope": 4843, + "src": "3861:1088:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 4844, + "src": "874:4078:9" + } + ], + "src": "0:4953:9" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOMerchant.sol", + "exportedSymbols": { + "TokenIOMerchant": [ + 4843 + ] + }, + "id": 4844, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4608, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:9" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4609, + "nodeType": "ImportDirective", + "scope": 4844, + "sourceUnit": 185, + "src": "25:23:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 4610, + "nodeType": "ImportDirective", + "scope": 4844, + "sourceUnit": 5226, + "src": "49:30:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 4611, + "nodeType": "ImportDirective", + "scope": 4844, + "sourceUnit": 4607, + "src": "80:26:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4612, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "902:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4613, + "nodeType": "InheritanceSpecifier", + "src": "902:7:9" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4843, + "linearizedBaseContracts": [ + 4843, + 184 + ], + "name": "TokenIOMerchant", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4616, + "libraryName": { + "contractScope": null, + "id": 4614, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1006:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1000:37:9", + "typeName": { + "contractScope": null, + "id": 4615, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1021:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 4618, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 4843, + "src": "1042:19:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4617, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1042:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4638, + "nodeType": "Block", + "src": "1260:470:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4623, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "1593:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4625, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1593:11:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4627, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4620, + "src": "1622:16:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4626, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1607:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 4628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1607:32:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1593:46:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4630, + "nodeType": "ExpressionStatement", + "src": "1593:46:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4631, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1699:5:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4634, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4632, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1705:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1705:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1699:17:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1719:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1699:24:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4637, + "nodeType": "ExpressionStatement", + "src": "1699:24:9" + } + ] + }, + "documentation": "@notice Constructor method for Merchant contract\n@param _storageContract Ethereum Address of TokenIOStorage contract", + "id": 4639, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4620, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 4639, + "src": "1227:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4619, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1227:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1226:26:9" + }, + "payable": false, + "returnParameters": { + "id": 4622, + "nodeType": "ParameterList", + "parameters": [], + "src": "1260:0:9" + }, + "scope": 4843, + "src": "1215:515:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4658, + "nodeType": "Block", + "src": "2029:168:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4651, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4641, + "src": "2064:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4649, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2045:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4650, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2086, + "src": "2045:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" + } + }, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2045:31:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207365742066656520636f6e74726163742e20456e7375726520636f6e747261637420697320616c6c6f7765642062792073746f7261676520636f6e74726163742e", + "id": 4653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2086:84:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e05a6836836cb77baea52eb421ebbf742058dce5c126f5d3343064b07960fe4", + "typeString": "literal_string \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\"" + }, + "value": "Error: Unable to set fee contract. Ensure contract is allowed by storage contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e05a6836836cb77baea52eb421ebbf742058dce5c126f5d3343064b07960fe4", + "typeString": "literal_string \"Error: Unable to set fee contract. Ensure contract is allowed by storage contract.\"" + } + ], + "id": 4648, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "2037:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2037:134:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4655, + "nodeType": "ExpressionStatement", + "src": "2037:134:9" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2186:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4647, + "id": 4657, + "nodeType": "Return", + "src": "2179:11:9" + } + ] + }, + "documentation": "@notice Sets Merchant globals and fee paramters\n@param feeContract Address of fee contract\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4644, + "modifierName": { + "argumentTypes": null, + "id": 4643, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1989:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1989:9:9" + } + ], + "name": "setParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4641, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 4659, + "src": "1963:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1963:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1955:33:9" + }, + "payable": false, + "returnParameters": { + "id": 4647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4646, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4659, + "src": "2015:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4645, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2015:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2014:14:9" + }, + "scope": 4843, + "src": "1937:260:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4727, + "nodeType": "Block", + "src": "2582:364:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4679, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2648:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2640:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2640:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4676, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2621:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4677, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2621:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4674, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2607:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4675, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeBPS", + "nodeType": "MemberAccess", + "referencedDeclaration": 2522, + "src": "2607:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2607:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4688, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2706:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2698:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2698:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4685, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2679:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4686, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2679:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2679:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4683, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2665:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4684, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2548, + "src": "2665:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2665:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4697, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2764:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2756:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2756:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4694, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2737:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4695, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2737:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2737:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4692, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2723:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMax", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "2723:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2723:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4706, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2823:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2815:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2815:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4703, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2796:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2796:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2796:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4701, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2781:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4702, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeFlat", + "nodeType": "MemberAccess", + "referencedDeclaration": 2600, + "src": "2781:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" + } + }, + "id": 4709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2781:49:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4715, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2881:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4714, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2873:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2873:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4712, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2854:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4713, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2854:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2854:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4710, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2840:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4711, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "2840:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2840:48:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4722, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "2925:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2917:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2917:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4719, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "2898:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4720, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "2898:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2898:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 4725, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2597:342:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_address_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,bytes memory,address)" + } + }, + "functionReturnParameters": 4673, + "id": 4726, + "nodeType": "Return", + "src": "2590:349:9" + } + ] + }, + "documentation": "@notice Gets fee parameters\n@return {\n\"bps\":\"Fee amount as a mesuare of basis points\",\n\"min\":\"Minimum fee amount\",\n\"max\":\"Maximum fee amount\",\n\"flat\":\"Flat fee amount\",\n\"contract\":\"Address of fee contract\"\n}", + "id": 4728, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getFeeParams", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4660, + "nodeType": "ParameterList", + "parameters": [], + "src": "2483:2:9" + }, + "payable": false, + "returnParameters": { + "id": 4673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4662, + "name": "bps", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2507:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4661, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2507:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4664, + "name": "min", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2517:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4663, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2517:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4666, + "name": "max", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2527:8:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2527:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4668, + "name": "flat", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2537:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4667, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2537:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4670, + "name": "feeMsg", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2548:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4669, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2548:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4672, + "name": "feeAccount", + "nodeType": "VariableDeclaration", + "scope": 4728, + "src": "2562:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4671, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2562:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2506:75:9" + }, + "scope": 4843, + "src": "2462:484:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4746, + "nodeType": "Block", + "src": "3245:82:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4740, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "3305:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3297:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3297:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4737, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "3278:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4738, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "3278:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3278:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4743, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4730, + "src": "3313:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4735, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "3260:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 2988, + "src": "3260:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" + } + }, + "id": 4744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3260:60:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4734, + "id": 4745, + "nodeType": "Return", + "src": "3253:67:9" + } + ] + }, + "documentation": "@notice Calculates fee of a given transfer amount\n@param amount Amount to calculcate fee value\n@return {\"fees\": \"Returns the calculated transaction fees based on the fee contract parameters\"}", + "id": 4747, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateFees", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4730, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4747, + "src": "3200:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4729, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3200:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3199:13:9" + }, + "payable": false, + "returnParameters": { + "id": 4734, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4733, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 4747, + "src": "3234:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4732, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3234:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3233:11:9" + }, + "scope": 4843, + "src": "3177:150:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4841, + "nodeType": "Block", + "src": "3987:962:9", + "statements": [ + { + "assignments": [ + 4763 + ], + "declarations": [ + { + "constant": false, + "id": 4763, + "name": "fees", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3995:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4762, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3995:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4767, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4753, + "src": "4021:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4764, + "name": "calculateFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4747, + "src": "4007:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 4766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4007:21:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3995:33:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4771, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "4136:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4136:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4775, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4749, + "src": "4167:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4776, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4753, + "src": "4177:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4773, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4148:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4774, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFxUSDAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4605, + "src": "4148:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" + } + }, + "id": 4777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4148:36:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4769, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4107:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "setAccountSpendingAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4384, + "src": "4107:28:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" + } + }, + "id": 4778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4107:78:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", + "id": 4779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4195:47:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + }, + "value": "Error: Unable to set account spending amount." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", + "typeString": "literal_string \"Error: Unable to set account spending amount.\"" + } + ], + "id": 4768, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4099:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4099:144:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4781, + "nodeType": "ExpressionStatement", + "src": "4099:144:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4785, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4749, + "src": "4277:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4786, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "4287:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4287:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4788, + "name": "merchant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4751, + "src": "4299:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4789, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4753, + "src": "4309:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4790, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4757, + "src": "4317:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4783, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4259:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3335, + "src": "4259:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4259:63:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e74", + "id": 4792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4332:44:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bbf466ef45b7ce75995210021820dc27f441a75c62bed33c09723390eec8e030", + "typeString": "literal_string \"Error: Unable to transfer funds to account\"" + }, + "value": "Error: Unable to transfer funds to account" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bbf466ef45b7ce75995210021820dc27f441a75c62bed33c09723390eec8e030", + "typeString": "literal_string \"Error: Unable to transfer funds to account\"" + } + ], + "id": 4782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4251:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4251:126:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4794, + "nodeType": "ExpressionStatement", + "src": "4251:126:9" + }, + { + "assignments": [ + 4796 + ], + "declarations": [ + { + "constant": false, + "id": 4796, + "name": "feeContract", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "4386:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4386:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4803, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4800, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5273, + "src": "4435:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenIOMerchant_$4843", + "typeString": "contract TokenIOMerchant" + } + ], + "id": 4799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4427:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4427:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4797, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4408:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2720, + "src": "4408:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" + } + }, + "id": 4802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4408:33:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4386:55:9" + }, + { + "condition": { + "argumentTypes": null, + "id": 4804, + "name": "merchantPaysFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4755, + "src": "4549:16:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4837, + "nodeType": "Block", + "src": "4747:176:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4824, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4749, + "src": "4783:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4825, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "4793:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4793:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4827, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "4805:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4828, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "4818:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4831, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "4838:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4829, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4824:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4830, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "4824:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4824:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4822, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4765:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4823, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3335, + "src": "4765:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4765:86:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 4834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4863:49:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 4821, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4757:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4757:156:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4836, + "nodeType": "ExpressionStatement", + "src": "4757:156:9" + } + ] + }, + "id": 4838, + "nodeType": "IfStatement", + "src": "4545:378:9", + "trueBody": { + "id": 4820, + "nodeType": "Block", + "src": "4567:174:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4808, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4749, + "src": "4603:8:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 4809, + "name": "merchant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4751, + "src": "4613:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4810, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "4623:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4811, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "4636:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4814, + "name": "feeContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "4656:11:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4812, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4642:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4813, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getFeeMsg", + "nodeType": "MemberAccess", + "referencedDeclaration": 2626, + "src": "4642:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" + } + }, + "id": 4815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4642:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4806, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4618, + "src": "4585:3:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "forceTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3335, + "src": "4585:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 4816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:84:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", + "id": 4817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4681:49:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + }, + "value": "Error: Unable to transfer fees to fee contract." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", + "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" + } + ], + "id": 4805, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5243, + 5244 + ], + "referencedDeclaration": 5244, + "src": "4577:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4577:154:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4819, + "nodeType": "ExpressionStatement", + "src": "4577:154:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4938:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4761, + "id": 4840, + "nodeType": "Return", + "src": "4931:11:9" + } + ] + }, + "documentation": "@notice Pay method for merchant interface\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param merchant Ethereum address of merchant\n@param amount Amount of currency to send to merchant\n@param merchantPaysFees Provide option for merchant to pay the transaction fees\n@param data Optional data to be included when paying the merchant (e.g. item receipt)\n@return { \"success\" : \"Returns true if successfully called from another contract\"}", + "id": 4842, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "pay", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4758, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4749, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3874:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4748, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3874:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4751, + "name": "merchant", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3891:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4750, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3891:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4753, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3909:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4752, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3909:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4755, + "name": "merchantPaysFees", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3922:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4754, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3922:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4757, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3945:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4756, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3945:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3873:83:9" + }, + "payable": false, + "returnParameters": { + "id": 4761, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4760, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4842, + "src": "3973:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4759, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3973:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3972:14:9" + }, + "scope": 4843, + "src": "3861:1088:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 4844, + "src": "874:4078:9" + } + ], + "src": "0:4953:9" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": {}, + "links": {}, + "address": "0x6ea17fb5e650da5ffcf959786ee30ee157c6ea22", + "transactionHash": "0xd7915684c88def6cb2cfeb27b14a6d4f5cc0d4d75817ad011892973e036bc07d" + }, + "4447": { + "events": {}, + "links": {}, + "address": "0x13274fe19c0178208bcbee397af8167a7be27f6f", + "transactionHash": "0xc06537934a5d657d933dcaf348488c54a1c3997a172e6efd422dfc6613826714" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:29:03.360Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIONameSpace.json b/deployed/mainnet-v1.0.1/TokenIONameSpace.json new file mode 100644 index 0000000..184bf83 --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIONameSpace.json @@ -0,0 +1,1297 @@ +{ + "contractName": "TokenIONameSpace", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_storageContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "currency", + "type": "string" + } + ], + "name": "getTokenNameSpace", + "outputs": [ + { + "name": "contractAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506040516020806106eb833981016040908152905133600090815260208190529182208054600160ff19918216811783558054600160a060020a031916600160a060020a03909416939093178355815416909117905561067590819061007690396000f30060806040526004361061006c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663394387b181146100715780634bbc142c146100e6578063666a34271461011b578063666e1b391461013c578063f2fde38b1461015d575b600080fd5b34801561007d57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100ca94369492936024939284019190819084018382808284375094975061017e9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b3480156100f257600080fd5b50610107600160a060020a0360043516610197565b604080519115158252519081900360200190f35b34801561012757600080fd5b50610107600160a060020a0360043516610277565b34801561014857600080fd5b50610107600160a060020a0360043516610354565b34801561016957600080fd5b50610107600160a060020a0360043516610369565b600061019160018363ffffffff6104c716565b92915050565b3360009081526020819052604081205460ff161515610226576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610306576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff1615156103f8576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515610458576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b6000808260405160200180807f746f6b656e2e6e616d6573706163650000000000000000000000000000000000815250600f0182805190602001908083835b602083106105255780518252601f199092019160209182019101610506565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106105885780518252601f199092019160209182019101610569565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d602081101561063f57600080fd5b50519493505050505600a165627a7a723058209fcd53ffea422196530e7f8d1ecf7c3e85b79a5ff60b736957e69e6c4b8b0dd60029", + "deployedBytecode": "0x60806040526004361061006c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663394387b181146100715780634bbc142c146100e6578063666a34271461011b578063666e1b391461013c578063f2fde38b1461015d575b600080fd5b34801561007d57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100ca94369492936024939284019190819084018382808284375094975061017e9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b3480156100f257600080fd5b50610107600160a060020a0360043516610197565b604080519115158252519081900360200190f35b34801561012757600080fd5b50610107600160a060020a0360043516610277565b34801561014857600080fd5b50610107600160a060020a0360043516610354565b34801561016957600080fd5b50610107600160a060020a0360043516610369565b600061019160018363ffffffff6104c716565b92915050565b3360009081526020819052604081205460ff161515610226576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610306576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff1615156103f8576040805160e560020a62461bcd02815260206004820152603960248201527f4572726f723a205472616e73616374696f6e2073656e646572206973206e6f7460448201527f20616c6c6f7765642062792074686520636f6e74726163742e00000000000000606482015290519081900360840190fd5b600160a060020a0382161515610458576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b6000808260405160200180807f746f6b656e2e6e616d6573706163650000000000000000000000000000000000815250600f0182805190602001908083835b602083106105255780518252601f199092019160209182019101610506565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106105885780518252601f199092019160209182019101610569565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a547f21f8a721000000000000000000000000000000000000000000000000000000008452600484018290529451909750600160a060020a0390941695506321f8a721945060248083019491935090918290030181600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d602081101561063f57600080fd5b50519493505050505600a165627a7a723058209fcd53ffea422196530e7f8d1ecf7c3e85b79a5ff60b736957e69e6c4b8b0dd60029", + "sourceMap": "1076:1347:10:-;;;1414:474;8:9:-1;5:2;;;30:1;27;20:12;5:2;1414:474:10;;;;;;;;;;;;;;;;1117:10:1;1111:5;:17;;;1414:474:10;1111:17:1;;;;;;:24;;1131:4;-1:-1:-1;;1111:24:1;;;;;;;1758:46:10;;-1:-1:-1;;;;;;1758:46:10;-1:-1:-1;;;;;1758:46:10;;;;;;;;;1858:24;;;;;;;;1076:1347;;;;;;;;", + "deployedSourceMap": "1076:1347:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2275:145;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2275:145:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2275:145:10;;-1:-1:-1;2275:145:10;;-1:-1:-1;;;;;;;2275:145:10;;;;;-1:-1:-1;;;;;2275:145:10;;;;;;;;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;;;;;;;;;;;;;;;;;;;2571:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;1589:291;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;2275:145:10;2340:23;2382:31;:3;2404:8;2382:31;:21;:31;:::i;:::-;2375:38;2275:145;-1:-1:-1;;2275:145:10:o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;2571:188::-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;1589:291::-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;18422:231:8:-;18508:23;18539:10;18598:8;18562:45;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;18562:45:8;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;18562:45:8;;;18552:56;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;18552:56:8;;;;;;;;;;;;18621:12;;:27;;;;;;;;;;;18552:56;;-1:-1:-1;;;;;;18621:12:8;;;;-1:-1:-1;18621:23:8;;-1:-1:-1;18621:27:8;;;;;263:2:-1;;-1:-1;18621:27:8;;;;;;;-1:-1:-1;18621:12:8;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;18621:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;18621:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;18621:27:8;;18422:231;-1:-1:-1;;;;18422:231:8:o", + "source": "pragma solidity 0.4.24;\n\n\n/**\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n@title Token Name Space Interface for Token, Inc. Smart Money System\n\n@author Ryan Tate , Sean Pollock \n\n@notice Contract uses generalized storage contract, `TokenIOStorage`, for\nupgradeability of interface contract.\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n\n*/\n\nimport \"./Ownable.sol\";\nimport \"./TokenIOStorage.sol\";\nimport \"./TokenIOLib.sol\";\n\ncontract TokenIONameSpace is Ownable {\n\n /// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage\n using TokenIOLib for TokenIOLib.Data;\n TokenIOLib.Data lib;\n\n /**\n \t* @notice Constructor method for TokenIONameSpace contract\n \t* @param _storageContract address of TokenIOStorage contract\n \t*/\n \tconstructor(address _storageContract) public {\n \t\t\t/// @dev Set the storage contract for the interface\n \t\t\t/// @dev NOTE: This contract will be unable to use the storage constract until\n \t\t\t/// @dev contract address is authorized with the storage contract\n \t\t\t/// @dev Once authorized, Use the `setParams` method to set storage values\n \t\t\tlib.Storage = TokenIOStorage(_storageContract);\n\n \t\t\t/// @dev set owner to contract initiator\n \t\t\towner[msg.sender] = true;\n \t}\n\n /**\n * @notice Returns the address of the contract associated with the currency symbol\n * @notice This method may be deprecated or refactored to allow for multiple interfaces\n * @param currency string Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"contractAddress\": \"Returns the token contract address associated with the currency\"}\n */\n function getTokenNameSpace(string currency) public view returns (address contractAddress) {\n return lib.getTokenNameSpace(currency);\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIONameSpace.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIONameSpace.sol", + "exportedSymbols": { + "TokenIONameSpace": [ + 4890 + ] + }, + "id": 4891, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4845, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:10" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4846, + "nodeType": "ImportDirective", + "scope": 4891, + "sourceUnit": 185, + "src": "993:23:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 4847, + "nodeType": "ImportDirective", + "scope": 4891, + "sourceUnit": 5226, + "src": "1017:30:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 4848, + "nodeType": "ImportDirective", + "scope": 4891, + "sourceUnit": 4607, + "src": "1048:26:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4849, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1105:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4850, + "nodeType": "InheritanceSpecifier", + "src": "1105:7:10" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4890, + "linearizedBaseContracts": [ + 4890, + 184 + ], + "name": "TokenIONameSpace", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4853, + "libraryName": { + "contractScope": null, + "id": 4851, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1209:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1203:37:10", + "typeName": { + "contractScope": null, + "id": 4852, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1224:15:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 4855, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 4890, + "src": "1245:19:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4854, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1245:15:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4875, + "nodeType": "Block", + "src": "1459:429:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4860, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4855, + "src": "1758:3:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4862, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1758:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4864, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4857, + "src": "1787:16:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4863, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1772:14:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 4865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1772:32:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1758:46:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4867, + "nodeType": "ExpressionStatement", + "src": "1758:46:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4868, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1858:5:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4871, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4869, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1864:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1864:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1858:17:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1878:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1858:24:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4874, + "nodeType": "ExpressionStatement", + "src": "1858:24:10" + } + ] + }, + "documentation": "@notice Constructor method for TokenIONameSpace contract\n@param _storageContract address of TokenIOStorage contract", + "id": 4876, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4858, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4857, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 4876, + "src": "1426:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4856, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1426:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1425:26:10" + }, + "payable": false, + "returnParameters": { + "id": 4859, + "nodeType": "ParameterList", + "parameters": [], + "src": "1459:0:10" + }, + "scope": 4890, + "src": "1414:474:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4888, + "nodeType": "Block", + "src": "2365:55:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4885, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4878, + "src": "2404:8:10", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4883, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4855, + "src": "2382:3:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenNameSpace", + "nodeType": "MemberAccess", + "referencedDeclaration": 2366, + "src": "2382:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (address)" + } + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2382:31:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4882, + "id": 4887, + "nodeType": "Return", + "src": "2375:38:10" + } + ] + }, + "documentation": "@notice Returns the address of the contract associated with the currency symbol\n@notice This method may be deprecated or refactored to allow for multiple interfaces\n@param currency string Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"contractAddress\": \"Returns the token contract address associated with the currency\"}", + "id": 4889, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4878, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4889, + "src": "2302:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4877, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2302:6:10", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2301:17:10" + }, + "payable": false, + "returnParameters": { + "id": 4882, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4881, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4889, + "src": "2340:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2340:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2339:25:10" + }, + "scope": 4890, + "src": "2275:145:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 4891, + "src": "1076:1347:10" + } + ], + "src": "0:2424:10" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIONameSpace.sol", + "exportedSymbols": { + "TokenIONameSpace": [ + 4890 + ] + }, + "id": 4891, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4845, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:10" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4846, + "nodeType": "ImportDirective", + "scope": 4891, + "sourceUnit": 185, + "src": "993:23:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "file": "./TokenIOStorage.sol", + "id": 4847, + "nodeType": "ImportDirective", + "scope": 4891, + "sourceUnit": 5226, + "src": "1017:30:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", + "file": "./TokenIOLib.sol", + "id": 4848, + "nodeType": "ImportDirective", + "scope": 4891, + "sourceUnit": 4607, + "src": "1048:26:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4849, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1105:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4850, + "nodeType": "InheritanceSpecifier", + "src": "1105:7:10" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4890, + "linearizedBaseContracts": [ + 4890, + 184 + ], + "name": "TokenIONameSpace", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4853, + "libraryName": { + "contractScope": null, + "id": 4851, + "name": "TokenIOLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4606, + "src": "1209:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOLib_$4606", + "typeString": "library TokenIOLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1203:37:10", + "typeName": { + "contractScope": null, + "id": 4852, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1224:15:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + } + }, + { + "constant": false, + "id": 4855, + "name": "lib", + "nodeType": "VariableDeclaration", + "scope": 4890, + "src": "1245:19:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data" + }, + "typeName": { + "contractScope": null, + "id": 4854, + "name": "TokenIOLib.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1630, + "src": "1245:15:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", + "typeString": "struct TokenIOLib.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4875, + "nodeType": "Block", + "src": "1459:429:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4860, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4855, + "src": "1758:3:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4862, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "Storage", + "nodeType": "MemberAccess", + "referencedDeclaration": 1629, + "src": "1758:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4864, + "name": "_storageContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4857, + "src": "1787:16:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4863, + "name": "TokenIOStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5225, + "src": "1772:14:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TokenIOStorage_$5225_$", + "typeString": "type(contract TokenIOStorage)" + } + }, + "id": 4865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1772:32:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "src": "1758:46:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenIOStorage_$5225", + "typeString": "contract TokenIOStorage" + } + }, + "id": 4867, + "nodeType": "ExpressionStatement", + "src": "1758:46:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4868, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1858:5:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4871, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4869, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "1864:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1864:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1858:17:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1878:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1858:24:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4874, + "nodeType": "ExpressionStatement", + "src": "1858:24:10" + } + ] + }, + "documentation": "@notice Constructor method for TokenIONameSpace contract\n@param _storageContract address of TokenIOStorage contract", + "id": 4876, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4858, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4857, + "name": "_storageContract", + "nodeType": "VariableDeclaration", + "scope": 4876, + "src": "1426:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4856, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1426:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1425:26:10" + }, + "payable": false, + "returnParameters": { + "id": 4859, + "nodeType": "ParameterList", + "parameters": [], + "src": "1459:0:10" + }, + "scope": 4890, + "src": "1414:474:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4888, + "nodeType": "Block", + "src": "2365:55:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4885, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4878, + "src": "2404:8:10", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4883, + "name": "lib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4855, + "src": "2382:3:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$1630_storage", + "typeString": "struct TokenIOLib.Data storage ref" + } + }, + "id": 4884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenNameSpace", + "nodeType": "MemberAccess", + "referencedDeclaration": 2366, + "src": "2382:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_address_$bound_to$_t_struct$_Data_$1630_storage_ptr_$", + "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (address)" + } + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2382:31:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4882, + "id": 4887, + "nodeType": "Return", + "src": "2375:38:10" + } + ] + }, + "documentation": "@notice Returns the address of the contract associated with the currency symbol\n@notice This method may be deprecated or refactored to allow for multiple interfaces\n@param currency string Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"contractAddress\": \"Returns the token contract address associated with the currency\"}", + "id": 4889, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getTokenNameSpace", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4878, + "name": "currency", + "nodeType": "VariableDeclaration", + "scope": 4889, + "src": "2302:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4877, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2302:6:10", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2301:17:10" + }, + "payable": false, + "returnParameters": { + "id": 4882, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4881, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 4889, + "src": "2340:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2340:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2339:25:10" + }, + "scope": 4890, + "src": "2275:145:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 4891, + "src": "1076:1347:10" + } + ], + "src": "0:2424:10" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-22T22:56:14.042Z" +} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOStorage.json b/deployed/mainnet-v1.0.1/TokenIOStorage.json new file mode 100644 index 0000000..8ce7044 --- /dev/null +++ b/deployed/mainnet-v1.0.1/TokenIOStorage.json @@ -0,0 +1,8280 @@ +{ + "contractName": "TokenIOStorage", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "allowOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "allowedAddress", + "type": "address" + } + ], + "name": "removeOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "address" + } + ], + "name": "setAddress", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "setUint", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "string" + } + ], + "name": "setString", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "bytes" + } + ], + "name": "setBytes", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "bool" + } + ], + "name": "setBool", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + }, + { + "name": "_value", + "type": "int256" + } + ], + "name": "setInt", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteAddress", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteUint", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteString", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteBytes", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteBool", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "deleteInt", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getAddress", + "outputs": [ + { + "name": "_value", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getUint", + "outputs": [ + { + "name": "_value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getString", + "outputs": [ + { + "name": "_value", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getBytes", + "outputs": [ + { + "name": "_value", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getBool", + "outputs": [ + { + "name": "_value", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "bytes32" + } + ], + "name": "getInt", + "outputs": [ + { + "name": "_value", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50336000908152602081905260409020805460ff1990811660019081179091161790556110b2806100426000396000f3006080604052600436106101275763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630e14a376811461012c57806321f8a721146101585780632c62ff2d1461018c5780632e28d084146101a45780633e49bed0146102025780634bbc142c1461021d578063616b59f61461023e578063666a342714610256578063666e1b39146102775780636e899550146102985780637ae1cfca146102f65780638c1600951461030e578063986e791a14610326578063abfdcced146103b3578063bd02d0f5146103d0578063c031a180146103fa578063ca446dd914610412578063dc97d96214610436578063e2a4853a1461044e578063e2b202bf14610469578063f2fde38b14610481578063f6bb3cc4146104a2575b600080fd5b34801561013857600080fd5b506101446004356104ba565b604080519115158252519081900360200190f35b34801561016457600080fd5b50610170600435610554565b60408051600160a060020a039092168252519081900360200190f35b34801561019857600080fd5b5061014460043561056f565b3480156101b057600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101449583359536956044949193909101919081908401838280828437509497506105f69650505050505050565b34801561020e57600080fd5b5061014460043560243561068a565b34801561022957600080fd5b50610144600160a060020a036004351661070b565b34801561024a57600080fd5b506101446004356107c7565b34801561026257600080fd5b50610144600160a060020a0360043516610851565b34801561028357600080fd5b50610144600160a060020a036004351661090a565b3480156102a457600080fd5b5060408051602060046024803582810135601f810185900485028601850190965285855261014495833595369560449491939091019190819084018382808284375094975061091f9650505050505050565b34801561030257600080fd5b506101446004356109a9565b34801561031a57600080fd5b506101446004356109be565b34801561033257600080fd5b5061033e600435610a3e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610378578181015183820152602001610360565b50505050905090810190601f1680156103a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103bf57600080fd5b506101446004356024351515610add565b3480156103dc57600080fd5b506103e8600435610b6c565b60408051918252519081900360200190f35b34801561040657600080fd5b5061033e600435610b7e565b34801561041e57600080fd5b50610144600435600160a060020a0360243516610be8565b34801561044257600080fd5b506103e8600435610c92565b34801561045a57600080fd5b50610144600435602435610ca4565b34801561047557600080fd5b50610144600435610d25565b34801561048d57600080fd5b50610144600160a060020a0360043516610da8565b3480156104ae57600080fd5b50610144600435610ee2565b3360009081526020819052604081205460ff161515610525576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b506000908152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19169055600190565b600090815260036020526040902054600160a060020a031690565b3360009081526020819052604081205460ff1615156105da576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b506000908152600560205260409020805460ff19169055600190565b3360009081526020819052604081205460ff161515610661576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b6000838152600460209081526040909120835161068092850190610f64565b5060019392505050565b3360009081526020819052604081205460ff1615156106f5576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060009182526006602052604090912055600190565b3360009081526020819052604081205460ff161515610776576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610832576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600082815260046020526040812061084991610fe2565b506001919050565b3360009081526020819052604081205460ff1615156108bc576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff16151561098a576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b6000838152600260209081526040909120835161068092850190610f64565b60009081526005602052604090205460ff1690565b3360009081526020819052604081205460ff161515610a29576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600090815260066020526040812055600190565b600081815260026020818152604092839020805484516000196001831615610100020190911693909304601f81018390048302840183019094528383526060939091830182828015610ad15780601f10610aa657610100808354040283529160200191610ad1565b820191906000526020600020905b815481529060010190602001808311610ab457829003601f168201915b50505050509050919050565b3360009081526020819052604081205460ff161515610b48576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600091825260056020526040909120805460ff1916911515919091179055600190565b60009081526001602052604090205490565b60008181526004602090815260409182902080548351601f6002610100600185161502600019019093169290920491820184900484028101840190945280845260609392830182828015610ad15780601f10610aa657610100808354040283529160200191610ad1565b3360009081526020819052604081205460ff161515610c53576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060008281526003602052604090208054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116179055600192915050565b60009081526006602052604090205490565b3360009081526020819052604081205460ff161515610d0f576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060009182526001602081905260409092205590565b3360009081526020819052604081205460ff161515610d90576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600090815260016020819052604082209190915590565b3360009081526020819052604081205460ff161515610e13576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a0382161515610e73576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b3360009081526020819052604081205460ff161515610f4d576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600082815260026020526040812061084991610fe2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610fa557805160ff1916838001178555610fd2565b82800160010185558215610fd2579182015b82811115610fd2578251825591602001919060010190610fb7565b50610fde929150611029565b5090565b50805460018160011615610100020316600290046000825580601f106110085750611026565b601f0160209004906000526020600020908101906110269190611029565b50565b61104391905b80821115610fde576000815560010161102f565b90560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820056cfbd62230040e00d890ea4ea35df860cfed498efc9f987cffb80ffc91f0c50029", + "deployedBytecode": "0x6080604052600436106101275763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630e14a376811461012c57806321f8a721146101585780632c62ff2d1461018c5780632e28d084146101a45780633e49bed0146102025780634bbc142c1461021d578063616b59f61461023e578063666a342714610256578063666e1b39146102775780636e899550146102985780637ae1cfca146102f65780638c1600951461030e578063986e791a14610326578063abfdcced146103b3578063bd02d0f5146103d0578063c031a180146103fa578063ca446dd914610412578063dc97d96214610436578063e2a4853a1461044e578063e2b202bf14610469578063f2fde38b14610481578063f6bb3cc4146104a2575b600080fd5b34801561013857600080fd5b506101446004356104ba565b604080519115158252519081900360200190f35b34801561016457600080fd5b50610170600435610554565b60408051600160a060020a039092168252519081900360200190f35b34801561019857600080fd5b5061014460043561056f565b3480156101b057600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101449583359536956044949193909101919081908401838280828437509497506105f69650505050505050565b34801561020e57600080fd5b5061014460043560243561068a565b34801561022957600080fd5b50610144600160a060020a036004351661070b565b34801561024a57600080fd5b506101446004356107c7565b34801561026257600080fd5b50610144600160a060020a0360043516610851565b34801561028357600080fd5b50610144600160a060020a036004351661090a565b3480156102a457600080fd5b5060408051602060046024803582810135601f810185900485028601850190965285855261014495833595369560449491939091019190819084018382808284375094975061091f9650505050505050565b34801561030257600080fd5b506101446004356109a9565b34801561031a57600080fd5b506101446004356109be565b34801561033257600080fd5b5061033e600435610a3e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610378578181015183820152602001610360565b50505050905090810190601f1680156103a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103bf57600080fd5b506101446004356024351515610add565b3480156103dc57600080fd5b506103e8600435610b6c565b60408051918252519081900360200190f35b34801561040657600080fd5b5061033e600435610b7e565b34801561041e57600080fd5b50610144600435600160a060020a0360243516610be8565b34801561044257600080fd5b506103e8600435610c92565b34801561045a57600080fd5b50610144600435602435610ca4565b34801561047557600080fd5b50610144600435610d25565b34801561048d57600080fd5b50610144600160a060020a0360043516610da8565b3480156104ae57600080fd5b50610144600435610ee2565b3360009081526020819052604081205460ff161515610525576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b506000908152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19169055600190565b600090815260036020526040902054600160a060020a031690565b3360009081526020819052604081205460ff1615156105da576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b506000908152600560205260409020805460ff19169055600190565b3360009081526020819052604081205460ff161515610661576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b6000838152600460209081526040909120835161068092850190610f64565b5060019392505050565b3360009081526020819052604081205460ff1615156106f5576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060009182526006602052604090912055600190565b3360009081526020819052604081205460ff161515610776576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19166001179055517f1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c59190a2506001919050565b3360009081526020819052604081205460ff161515610832576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600082815260046020526040812061084991610fe2565b506001919050565b3360009081526020819052604081205460ff1615156108bc576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a038216600081815260208190526040808220805460ff19169055517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad989190a2506001919050565b60006020819052908152604090205460ff1681565b3360009081526020819052604081205460ff16151561098a576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b6000838152600260209081526040909120835161068092850190610f64565b60009081526005602052604090205460ff1690565b3360009081526020819052604081205460ff161515610a29576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600090815260066020526040812055600190565b600081815260026020818152604092839020805484516000196001831615610100020190911693909304601f81018390048302840183019094528383526060939091830182828015610ad15780601f10610aa657610100808354040283529160200191610ad1565b820191906000526020600020905b815481529060010190602001808311610ab457829003601f168201915b50505050509050919050565b3360009081526020819052604081205460ff161515610b48576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600091825260056020526040909120805460ff1916911515919091179055600190565b60009081526001602052604090205490565b60008181526004602090815260409182902080548351601f6002610100600185161502600019019093169290920491820184900484028101840190945280845260609392830182828015610ad15780601f10610aa657610100808354040283529160200191610ad1565b3360009081526020819052604081205460ff161515610c53576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060008281526003602052604090208054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116179055600192915050565b60009081526006602052604090205490565b3360009081526020819052604081205460ff161515610d0f576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b5060009182526001602081905260409092205590565b3360009081526020819052604081205460ff161515610d90576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b50600090815260016020819052604082209190915590565b3360009081526020819052604081205460ff161515610e13576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600160a060020a0382161515610e73576040805160e560020a62461bcd02815260206004820152601f60248201527f4572726f723a206e65774f776e65722063616e6e6f74206265206e756c6c2100604482015290519081900360640190fd5b604051600160a060020a0383169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350600160a060020a03166000908152602081905260408082208054600160ff199182168117909255338452919092208054909116905590565b3360009081526020819052604081205460ff161515610f4d576040805160e560020a62461bcd02815260206004820152603960248201526000805160206110678339815191526044820152600080516020611047833981519152606482015290519081900360840190fd5b600082815260026020526040812061084991610fe2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610fa557805160ff1916838001178555610fd2565b82800160010185558215610fd2579182015b82811115610fd2578251825591602001919060010190610fb7565b50610fde929150611029565b5090565b50805460018160011615610100020316600290046000825580601f106110085750611026565b601f0160209004906000526020600020908101906110269190611029565b50565b61104391905b80821115610fde576000815560010161102f565b90560020616c6c6f7765642062792074686520636f6e74726163742e000000000000004572726f723a205472616e73616374696f6e2073656e646572206973206e6f74a165627a7a72305820056cfbd62230040e00d890ea4ea35df860cfed498efc9f987cffb80ffc91f0c50029", + "sourceMap": "1972:8029:11:-;;;2669:207;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1117:10:1;1111:5;:17;;;;;;;;;;:24;;-1:-1:-1;;1111:24:1;;;1131:4;1111:24;;;2845::11;;;;;;1972:8029;;;;;;", + "deployedSourceMap": "1972:8029:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5901:142;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5901:142:11;;;;;;;;;;;;;;;;;;;;;;;8203:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8203:115:11;;;;;;;;;-1:-1:-1;;;;;8203:115:11;;;;;;;;;;;;;;7428:136;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7428:136:11;;;;;4517:151;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4517:151:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4517:151:11;;-1:-1:-1;4517:151:11;;-1:-1:-1;;;;;;;4517:151:11;5384:145;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5384:145:11;;;;;;;2127:185:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2127:185:1;-1:-1:-1;;;;;2127:185:1;;;;;7048:138:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7048:138:11;;;;;2571:188:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2571:188:1;-1:-1:-1;;;;;2571:188:1;;;;;725:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:37:1;-1:-1:-1;;;;;725:37:1;;;;;4076:154:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4076:154:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4076:154:11;;-1:-1:-1;4076:154:11;;-1:-1:-1;;;;;;;4076:154:11;9563:106;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9563:106:11;;;;;7805:134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7805:134:11;;;;;8884:112;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8884:112:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;8884:112:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4953:148;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4953:148:11;;;;;;;;;8546:106;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8546:106:11;;;;;;;;;;;;;;;;;;;;;9226:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9226:109:11;;;;;3197:157;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3197:157:11;;;-1:-1:-1;;;;;3197:157:11;;;;;9895:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9895:103:11;;;;;3639:148;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3639:148:11;;;;;;;6285:136;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6285:136:11;;;;;1589:291:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1589:291:1;-1:-1:-1;;;;;1589:291:1;;;;;6665:140:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6665:140:11;;;;;5901:142;1261:10:1;5964:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;5995:20:11;;;;:14;:20;;;;;5988:27;;-1:-1:-1;;5988:27:11;;;-1:-1:-1;;5901:142:11:o;8203:115::-;8258:14;8291:20;;;:14;:20;;;;;;-1:-1:-1;;;;;8291:20:11;;8203:115::o;7428:136::-;1261:10:1;7488:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;7519:17:11;;;;:11;:17;;;;;7512:24;;-1:-1:-1;;7512:24:11;;;-1:-1:-1;;7428:136:11:o;4517:151::-;1261:10:1;4589:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;4613:18:11;;;;:12;:18;;;;;;;;:27;;;;;;;;:::i;:::-;-1:-1:-1;4657:4:11;;4517:151;-1:-1:-1;;;4517:151:11:o;5384:145::-;1261:10:1;5452:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;5476:16:11;;;;:10;:16;;;;;;:25;5518:4;;5384:145::o;2127:185:1:-;1261:10;2201:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2221:21:1;;:5;:21;;;;;;;;;;;:28;;-1:-1:-1;;2221:28:1;2245:4;2221:28;;;2260:30;;;2221:5;2260:30;-1:-1:-1;2303:4:1;2127:185;;;:::o;7048:138:11:-;1261:10:1;7109:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;7140:18:11;;;;:12;:18;;;;;7133:25;;;:::i;:::-;-1:-1:-1;7175:4:11;7048:138;;;:::o;2571:188:1:-;1261:10;2646:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2666:21:1;;2690:5;2666:21;;;;;;;;;;;:29;;-1:-1:-1;;2666:29:1;;;2706:31;;;2690:5;2706:31;-1:-1:-1;2750:4:1;2571:188;;;:::o;725:37::-;;;;;;;;;;;;;;;;:::o;4076:154:11:-;1261:10:1;4150:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;4174:19:11;;;;:13;:19;;;;;;;;:28;;;;;;;;:::i;9563:106::-;9615:11;9645:17;;;:11;:17;;;;;;;;;9563:106::o;7805:134::-;1261:10:1;7864:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;7895:16:11;;;;:10;:16;;;;;7888:23;7928:4;;7805:134::o;8884:112::-;8970:19;;;;:13;:19;;;;;;;;;8963:26;;;;-1:-1:-1;;8963:26:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8938:13;;8970:19;;8963:26;;8970:19;8963:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8884:112;;;:::o;4953:148::-;1261:10:1;5023:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;5047:17:11;;;;:11;:17;;;;;;:26;;-1:-1:-1;;5047:26:11;;;;;;;;;;-1:-1:-1;;4953:148:11:o;8546:106::-;8598:11;8628:17;;;:11;:17;;;;;;;8546:106::o;9226:109::-;9310:18;;;;:12;:18;;;;;;;;;9303:25;;;;;;;;;;;;-1:-1:-1;;9303:25:11;;;;;;;;;;;;;;;;;;;;;;;;;;9279:12;;9303:25;;;9310:18;9303:25;;;;;;;;;;;;;;;;;;;;;;;;3197:157;1261:10:1;3273:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;3297:20:11;;;;:14;:20;;;;;:29;;-1:-1:-1;;;;;3297:29:11;;-1:-1:-1;;3297:29:11;;;;;;;3197:157;;;;:::o;9895:103::-;9946:10;9975:16;;;:10;:16;;;;;;;9895:103::o;3639:148::-;1261:10:1;3709:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;3733:17:11;;;;:11;:17;;;;;;;;:26;:11;3639:148::o;6285:136::-;1261:10:1;6345:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;6376:17:11;;;;:11;:17;;;;;;;6369:24;;;;6376:11;6285:136::o;1589:291:1:-;1261:10;1660:12;1255:17;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;1688:22:1;;;;1680:66;;;;;-1:-1:-1;;;;;1680:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;1757:42;;-1:-1:-1;;;;;1757:42:1;;;1778:10;;1757:42;;;;;-1:-1:-1;;;;;;1805:15:1;:5;:15;;;;;;;;;;;:22;;1823:4;-1:-1:-1;;1805:22:1;;;;;;;;1839:10;1833:17;;;;;;:25;;;;;;;1823:4;1589:291::o;6665:140:11:-;1261:10:1;6727:12:11;1255:17:1;;;;;;;;;;;;;1247:87;;;;;;;-1:-1:-1;;;;;1247:87:1;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;-1:-1:-1;;;;;;;;;;;1247:87:1;;;;;;;;;;;;;;;6758:19:11;;;;:13;:19;;;;;6751:26;;;:::i;1972:8029::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1972:8029:11;;;-1:-1:-1;1972:8029:11;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity 0.4.24;\n\nimport \"./Ownable.sol\";\n\n/**\n\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title TokenIOStorage - Serves as derived contract for TokenIO contract and\nis used to upgrade interfaces in the event of deprecating the main contract.\n\n@author Ryan Tate , Sean Pollock \n\n@notice Storage contract\n\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n\n@notice NOTE: This contract is based on the RocketPool Storage Contract,\nfound here: https://github.com/rocket-pool/rocketpool/blob/master/contracts/RocketStorage.sol\nAnd this medium article: https://medium.com/rocket-pool/upgradable-solidity-contract-design-54789205276d\n\nChanges:\n - setting primitive mapping view to internal;\n - setting method views to public;\n\n @dev NOTE: When deprecating the main TokenIO contract, the upgraded contract\n must take ownership of the TokenIO contract, it will require using the public methods\n to update changes to the underlying data. The updated contract must use a\n standard call to original TokenIO contract such that the request is made from\n the upgraded contract and not the transaction origin (tx.origin) of the signing\n account.\n\n\n @dev NOTE: The reasoning for using the storage contract is to abstract the interface\n from the data of the contract on chain, limiting the need to migrate data to\n new contracts.\n\n*/\ncontract TokenIOStorage is Ownable {\n\n\n /// @dev mapping for Primitive Data Types;\n\t\t/// @notice primitive data mappings have `internal` view;\n\t\t/// @dev only the derived contract can use the internal methods;\n\t\t/// @dev key == `keccak256(param1, param2...)`\n\t\t/// @dev Nested mapping can be achieved using multiple params in keccak256 hash;\n mapping(bytes32 => uint256) internal uIntStorage;\n mapping(bytes32 => string) internal stringStorage;\n mapping(bytes32 => address) internal addressStorage;\n mapping(bytes32 => bytes) internal bytesStorage;\n mapping(bytes32 => bool) internal boolStorage;\n mapping(bytes32 => int256) internal intStorage;\n\n constructor() public {\n\t\t\t\t/// @notice owner is set to msg.sender by default\n\t\t\t\t/// @dev consider removing in favor of setting ownership in inherited\n\t\t\t\t/// contract\n owner[msg.sender] = true;\n }\n\n /// @dev Set Key Methods\n\n /**\n * @notice Set value for Address associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Address value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setAddress(bytes32 _key, address _value) public onlyOwner returns (bool success) {\n addressStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for Uint associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Uint value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setUint(bytes32 _key, uint _value) public onlyOwner returns (bool success) {\n uIntStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for String associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The String value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setString(bytes32 _key, string _value) public onlyOwner returns (bool success) {\n stringStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for Bytes associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Bytes value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setBytes(bytes32 _key, bytes _value) public onlyOwner returns (bool success) {\n bytesStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for Bool associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Bool value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setBool(bytes32 _key, bool _value) public onlyOwner returns (bool success) {\n boolStorage[_key] = _value;\n return true;\n }\n\n /**\n * @notice Set value for Int associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @param _value The Int value to be set\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function setInt(bytes32 _key, int _value) public onlyOwner returns (bool success) {\n intStorage[_key] = _value;\n return true;\n }\n\n /// @dev Delete Key Methods\n\t\t/// @dev delete methods may be unnecessary; Use set methods to set values\n\t\t/// to default?\n\n /**\n * @notice Delete value for Address associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteAddress(bytes32 _key) public onlyOwner returns (bool success) {\n delete addressStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for Uint associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteUint(bytes32 _key) public onlyOwner returns (bool success) {\n delete uIntStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for String associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteString(bytes32 _key) public onlyOwner returns (bool success) {\n delete stringStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for Bytes associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteBytes(bytes32 _key) public onlyOwner returns (bool success) {\n delete bytesStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for Bool associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteBool(bytes32 _key) public onlyOwner returns (bool success) {\n delete boolStorage[_key];\n return true;\n }\n\n /**\n * @notice Delete value for Int associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"success\" : \"Returns true when successfully called from another contract\" }\n */\n function deleteInt(bytes32 _key) public onlyOwner returns (bool success) {\n delete intStorage[_key];\n return true;\n }\n\n /// @dev Get Key Methods\n\n /**\n * @notice Get value for Address associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Address value associated with the id key\" }\n */\n function getAddress(bytes32 _key) public view returns (address _value) {\n return addressStorage[_key];\n }\n\n /**\n * @notice Get value for Uint associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Uint value associated with the id key\" }\n */\n function getUint(bytes32 _key) public view returns (uint _value) {\n return uIntStorage[_key];\n }\n\n /**\n * @notice Get value for String associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the String value associated with the id key\" }\n */\n function getString(bytes32 _key) public view returns (string _value) {\n return stringStorage[_key];\n }\n\n /**\n * @notice Get value for Bytes associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Bytes value associated with the id key\" }\n */\n function getBytes(bytes32 _key) public view returns (bytes _value) {\n return bytesStorage[_key];\n }\n\n /**\n * @notice Get value for Bool associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Bool value associated with the id key\" }\n */\n function getBool(bytes32 _key) public view returns (bool _value) {\n return boolStorage[_key];\n }\n\n /**\n * @notice Get value for Int associated with bytes32 id key\n * @param _key Pointer identifier for value in storage\n * @return { \"_value\" : \"Returns the Int value associated with the id key\" }\n */\n function getInt(bytes32 _key) public view returns (int _value) {\n return intStorage[_key];\n }\n\n}\n", + "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "ast": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "exportedSymbols": { + "TokenIOStorage": [ + 5225 + ] + }, + "id": 5226, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4892, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:11" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4893, + "nodeType": "ImportDirective", + "scope": 5226, + "sourceUnit": 185, + "src": "25:23:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4894, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1999:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4895, + "nodeType": "InheritanceSpecifier", + "src": "1999:7:11" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title TokenIOStorage - Serves as derived contract for TokenIO contract and\nis used to upgrade interfaces in the event of deprecating the main contract.\n@author Ryan Tate , Sean Pollock \n@notice Storage contract\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n@notice NOTE: This contract is based on the RocketPool Storage Contract,\nfound here: https://github.com/rocket-pool/rocketpool/blob/master/contracts/RocketStorage.sol\nAnd this medium article: https://medium.com/rocket-pool/upgradable-solidity-contract-design-54789205276d\nChanges:\n- setting primitive mapping view to internal;\n- setting method views to public;\n@dev NOTE: When deprecating the main TokenIO contract, the upgraded contract\nmust take ownership of the TokenIO contract, it will require using the public methods\nto update changes to the underlying data. The updated contract must use a\nstandard call to original TokenIO contract such that the request is made from\nthe upgraded contract and not the transaction origin (tx.origin) of the signing\naccount.\n@dev NOTE: The reasoning for using the storage contract is to abstract the interface\nfrom the data of the contract on chain, limiting the need to migrate data to\nnew contracts.", + "fullyImplemented": true, + "id": 5225, + "linearizedBaseContracts": [ + 5225, + 184 + ], + "name": "TokenIOStorage", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4899, + "name": "uIntStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2321:51:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 4898, + "keyType": { + "id": 4896, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2329:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2321:27:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 4897, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2340:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4903, + "name": "stringStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2378:53:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string)" + }, + "typeName": { + "id": 4902, + "keyType": { + "id": 4900, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2386:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2378:26:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string)" + }, + "valueType": { + "id": 4901, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2397:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4907, + "name": "addressStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2437:54:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "typeName": { + "id": 4906, + "keyType": { + "id": 4904, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2445:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2437:27:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "valueType": { + "id": 4905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2456:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4911, + "name": "bytesStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2497:52:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes)" + }, + "typeName": { + "id": 4910, + "keyType": { + "id": 4908, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2505:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2497:25:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes)" + }, + "valueType": { + "id": 4909, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2516:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4915, + "name": "boolStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2555:51:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 4914, + "keyType": { + "id": 4912, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2563:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2555:24:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 4913, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2574:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4919, + "name": "intStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2612:50:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + }, + "typeName": { + "id": 4918, + "keyType": { + "id": 4916, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2620:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2612:26:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + }, + "valueType": { + "id": 4917, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "2631:6:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4929, + "nodeType": "Block", + "src": "2690:186:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4922, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2845:5:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4925, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4923, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "2851:3:11", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2851:10:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2845:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2865:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2845:24:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4928, + "nodeType": "ExpressionStatement", + "src": "2845:24:11" + } + ] + }, + "documentation": null, + "id": 4930, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4920, + "nodeType": "ParameterList", + "parameters": [], + "src": "2680:2:11" + }, + "payable": false, + "returnParameters": { + "id": 4921, + "nodeType": "ParameterList", + "parameters": [], + "src": "2690:0:11" + }, + "scope": 5225, + "src": "2669:207:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4949, + "nodeType": "Block", + "src": "3287:67:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4941, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4907, + "src": "3297:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 4943, + "indexExpression": { + "argumentTypes": null, + "id": 4942, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4932, + "src": "3312:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3297:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4944, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4934, + "src": "3320:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3297:29:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4946, + "nodeType": "ExpressionStatement", + "src": "3297:29:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3343:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4940, + "id": 4948, + "nodeType": "Return", + "src": "3336:11:11" + } + ] + }, + "documentation": "@notice Set value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Address value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4950, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4937, + "modifierName": { + "argumentTypes": null, + "id": 4936, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "3254:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3254:9:11" + } + ], + "name": "setAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4932, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4950, + "src": "3217:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4931, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3217:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4934, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4950, + "src": "3231:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4933, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3231:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3216:30:11" + }, + "payable": false, + "returnParameters": { + "id": 4940, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4939, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4950, + "src": "3273:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4938, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3273:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3272:14:11" + }, + "scope": 5225, + "src": "3197:157:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4969, + "nodeType": "Block", + "src": "3723:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4961, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4899, + "src": "3733:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 4963, + "indexExpression": { + "argumentTypes": null, + "id": 4962, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "3745:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3733:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4954, + "src": "3753:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3733:26:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4966, + "nodeType": "ExpressionStatement", + "src": "3733:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3776:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4960, + "id": 4968, + "nodeType": "Return", + "src": "3769:11:11" + } + ] + }, + "documentation": "@notice Set value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Uint value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4970, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4957, + "modifierName": { + "argumentTypes": null, + "id": 4956, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "3690:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3690:9:11" + } + ], + "name": "setUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4952, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4970, + "src": "3656:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4951, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3656:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4954, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4970, + "src": "3670:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4953, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3670:4:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3655:27:11" + }, + "payable": false, + "returnParameters": { + "id": 4960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4959, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4970, + "src": "3709:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4958, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3709:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3708:14:11" + }, + "scope": 5225, + "src": "3639:148:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4989, + "nodeType": "Block", + "src": "4164:66:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4981, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "4174:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 4983, + "indexExpression": { + "argumentTypes": null, + "id": 4982, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "4188:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4174:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4984, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4974, + "src": "4196:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4174:28:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 4986, + "nodeType": "ExpressionStatement", + "src": "4174:28:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4219:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4980, + "id": 4988, + "nodeType": "Return", + "src": "4212:11:11" + } + ] + }, + "documentation": "@notice Set value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The String value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4990, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4977, + "modifierName": { + "argumentTypes": null, + "id": 4976, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4131:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4131:9:11" + } + ], + "name": "setString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4975, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4972, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4990, + "src": "4095:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4971, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4095:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4974, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4990, + "src": "4109:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4973, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4109:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4094:29:11" + }, + "payable": false, + "returnParameters": { + "id": 4980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4979, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4990, + "src": "4150:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4978, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4150:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4149:14:11" + }, + "scope": 5225, + "src": "4076:154:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5009, + "nodeType": "Block", + "src": "4603:65:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5001, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4911, + "src": "4613:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5003, + "indexExpression": { + "argumentTypes": null, + "id": 5002, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4992, + "src": "4626:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4613:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5004, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4994, + "src": "4634:6:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "src": "4613:27:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "id": 5006, + "nodeType": "ExpressionStatement", + "src": "4613:27:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4657:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5000, + "id": 5008, + "nodeType": "Return", + "src": "4650:11:11" + } + ] + }, + "documentation": "@notice Set value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Bytes value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5010, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4997, + "modifierName": { + "argumentTypes": null, + "id": 4996, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4570:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4570:9:11" + } + ], + "name": "setBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4992, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5010, + "src": "4535:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4535:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4994, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5010, + "src": "4549:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4993, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4549:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4534:28:11" + }, + "payable": false, + "returnParameters": { + "id": 5000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4999, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5010, + "src": "4589:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4998, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4589:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:14:11" + }, + "scope": 5225, + "src": "4517:151:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5029, + "nodeType": "Block", + "src": "5037:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5021, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "5047:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5023, + "indexExpression": { + "argumentTypes": null, + "id": 5022, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "5059:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5047:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5024, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5014, + "src": "5067:6:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5047:26:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5026, + "nodeType": "ExpressionStatement", + "src": "5047:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5090:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5020, + "id": 5028, + "nodeType": "Return", + "src": "5083:11:11" + } + ] + }, + "documentation": "@notice Set value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Bool value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5030, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5017, + "modifierName": { + "argumentTypes": null, + "id": 5016, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5004:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5004:9:11" + } + ], + "name": "setBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5012, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5030, + "src": "4970:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5011, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4970:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5014, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5030, + "src": "4984:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5013, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4984:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4969:27:11" + }, + "payable": false, + "returnParameters": { + "id": 5020, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5019, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5030, + "src": "5023:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5018, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5023:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5022:14:11" + }, + "scope": 5225, + "src": "4953:148:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5049, + "nodeType": "Block", + "src": "5466:63:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5041, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "5476:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5043, + "indexExpression": { + "argumentTypes": null, + "id": 5042, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "5487:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5476:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5044, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5034, + "src": "5495:6:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5476:25:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 5046, + "nodeType": "ExpressionStatement", + "src": "5476:25:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5518:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5040, + "id": 5048, + "nodeType": "Return", + "src": "5511:11:11" + } + ] + }, + "documentation": "@notice Set value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Int value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5050, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5037, + "modifierName": { + "argumentTypes": null, + "id": 5036, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5433:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5433:9:11" + } + ], + "name": "setInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5032, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5050, + "src": "5400:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5031, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5400:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5034, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5050, + "src": "5414:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5033, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5414:3:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5399:26:11" + }, + "payable": false, + "returnParameters": { + "id": 5040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5039, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5050, + "src": "5452:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5038, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5452:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5451:14:11" + }, + "scope": 5225, + "src": "5384:145:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5066, + "nodeType": "Block", + "src": "5978:65:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "5988:27:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5059, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4907, + "src": "5995:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 5061, + "indexExpression": { + "argumentTypes": null, + "id": 5060, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5052, + "src": "6010:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5995:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5063, + "nodeType": "ExpressionStatement", + "src": "5988:27:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6032:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5058, + "id": 5065, + "nodeType": "Return", + "src": "6025:11:11" + } + ] + }, + "documentation": "@notice Delete value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5067, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5055, + "modifierName": { + "argumentTypes": null, + "id": 5054, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5945:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5945:9:11" + } + ], + "name": "deleteAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5052, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5067, + "src": "5924:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5051, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5924:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5923:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5058, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5057, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5067, + "src": "5964:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5056, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5964:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5963:14:11" + }, + "scope": 5225, + "src": "5901:142:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5083, + "nodeType": "Block", + "src": "6359:62:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6369:24:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5076, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4899, + "src": "6376:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 5078, + "indexExpression": { + "argumentTypes": null, + "id": 5077, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5069, + "src": "6388:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6376:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5080, + "nodeType": "ExpressionStatement", + "src": "6369:24:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6410:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5075, + "id": 5082, + "nodeType": "Return", + "src": "6403:11:11" + } + ] + }, + "documentation": "@notice Delete value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5084, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5072, + "modifierName": { + "argumentTypes": null, + "id": 5071, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "6326:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6326:9:11" + } + ], + "name": "deleteUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5070, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5069, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5084, + "src": "6305:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5068, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6305:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6304:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5074, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5084, + "src": "6345:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5073, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6345:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6344:14:11" + }, + "scope": 5225, + "src": "6285:136:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5100, + "nodeType": "Block", + "src": "6741:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6751:26:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5093, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "6758:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 5095, + "indexExpression": { + "argumentTypes": null, + "id": 5094, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5086, + "src": "6772:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6758:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5097, + "nodeType": "ExpressionStatement", + "src": "6751:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6794:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5092, + "id": 5099, + "nodeType": "Return", + "src": "6787:11:11" + } + ] + }, + "documentation": "@notice Delete value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5101, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5089, + "modifierName": { + "argumentTypes": null, + "id": 5088, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "6708:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6708:9:11" + } + ], + "name": "deleteString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5086, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5101, + "src": "6687:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5085, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6687:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6686:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5092, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5091, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5101, + "src": "6727:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5090, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6727:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6726:14:11" + }, + "scope": 5225, + "src": "6665:140:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5117, + "nodeType": "Block", + "src": "7123:63:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7133:25:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5110, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4911, + "src": "7140:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5112, + "indexExpression": { + "argumentTypes": null, + "id": 5111, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5103, + "src": "7153:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7140:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5114, + "nodeType": "ExpressionStatement", + "src": "7133:25:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7175:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5109, + "id": 5116, + "nodeType": "Return", + "src": "7168:11:11" + } + ] + }, + "documentation": "@notice Delete value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5118, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5106, + "modifierName": { + "argumentTypes": null, + "id": 5105, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7090:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7090:9:11" + } + ], + "name": "deleteBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5103, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5118, + "src": "7069:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5102, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7069:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7068:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5108, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5118, + "src": "7109:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5107, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7109:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7108:14:11" + }, + "scope": 5225, + "src": "7048:138:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5134, + "nodeType": "Block", + "src": "7502:62:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7512:24:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5127, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "7519:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5129, + "indexExpression": { + "argumentTypes": null, + "id": 5128, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5120, + "src": "7531:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7519:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5131, + "nodeType": "ExpressionStatement", + "src": "7512:24:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7553:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5126, + "id": 5133, + "nodeType": "Return", + "src": "7546:11:11" + } + ] + }, + "documentation": "@notice Delete value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5135, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5123, + "modifierName": { + "argumentTypes": null, + "id": 5122, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7469:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7469:9:11" + } + ], + "name": "deleteBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5120, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5135, + "src": "7448:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5119, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7448:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7447:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5125, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5135, + "src": "7488:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5124, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7488:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7487:14:11" + }, + "scope": 5225, + "src": "7428:136:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5151, + "nodeType": "Block", + "src": "7878:61:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7888:23:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5144, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "7895:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5146, + "indexExpression": { + "argumentTypes": null, + "id": 5145, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5137, + "src": "7906:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7895:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5148, + "nodeType": "ExpressionStatement", + "src": "7888:23:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7928:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5143, + "id": 5150, + "nodeType": "Return", + "src": "7921:11:11" + } + ] + }, + "documentation": "@notice Delete value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5152, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5140, + "modifierName": { + "argumentTypes": null, + "id": 5139, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7845:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7845:9:11" + } + ], + "name": "deleteInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5137, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5152, + "src": "7824:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5136, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7824:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7823:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5143, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5142, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5152, + "src": "7864:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5141, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7864:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7863:14:11" + }, + "scope": 5225, + "src": "7805:134:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5163, + "nodeType": "Block", + "src": "8274:44:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5159, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4907, + "src": "8291:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 5161, + "indexExpression": { + "argumentTypes": null, + "id": 5160, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5154, + "src": "8306:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8291:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5158, + "id": 5162, + "nodeType": "Return", + "src": "8284:27:11" + } + ] + }, + "documentation": "@notice Get value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Address value associated with the id key\" }", + "id": 5164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5154, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5164, + "src": "8223:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5153, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8223:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8222:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5157, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5164, + "src": "8258:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5156, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8258:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8257:16:11" + }, + "scope": 5225, + "src": "8203:115:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5175, + "nodeType": "Block", + "src": "8611:41:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5171, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4899, + "src": "8628:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 5173, + "indexExpression": { + "argumentTypes": null, + "id": 5172, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5166, + "src": "8640:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8628:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5170, + "id": 5174, + "nodeType": "Return", + "src": "8621:24:11" + } + ] + }, + "documentation": "@notice Get value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Uint value associated with the id key\" }", + "id": 5176, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5167, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5166, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5176, + "src": "8563:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5165, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8563:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8562:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5169, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5176, + "src": "8598:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5168, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8598:4:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8597:13:11" + }, + "scope": 5225, + "src": "8546:106:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5187, + "nodeType": "Block", + "src": "8953:43:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5183, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "8970:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 5185, + "indexExpression": { + "argumentTypes": null, + "id": 5184, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5178, + "src": "8984:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8970:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 5182, + "id": 5186, + "nodeType": "Return", + "src": "8963:26:11" + } + ] + }, + "documentation": "@notice Get value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the String value associated with the id key\" }", + "id": 5188, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5178, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5188, + "src": "8903:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5177, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8903:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8902:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5181, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5188, + "src": "8938:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5180, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8938:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8937:15:11" + }, + "scope": 5225, + "src": "8884:112:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5199, + "nodeType": "Block", + "src": "9293:42:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5195, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4911, + "src": "9310:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5197, + "indexExpression": { + "argumentTypes": null, + "id": 5196, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5190, + "src": "9323:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9310:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "functionReturnParameters": 5194, + "id": 5198, + "nodeType": "Return", + "src": "9303:25:11" + } + ] + }, + "documentation": "@notice Get value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Bytes value associated with the id key\" }", + "id": 5200, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5190, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5200, + "src": "9244:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5189, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9244:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9243:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5193, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5200, + "src": "9279:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5192, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9279:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9278:14:11" + }, + "scope": 5225, + "src": "9226:109:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5211, + "nodeType": "Block", + "src": "9628:41:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5207, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "9645:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5209, + "indexExpression": { + "argumentTypes": null, + "id": 5208, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "9657:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9645:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5206, + "id": 5210, + "nodeType": "Return", + "src": "9638:24:11" + } + ] + }, + "documentation": "@notice Get value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Bool value associated with the id key\" }", + "id": 5212, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5202, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5212, + "src": "9580:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9580:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9579:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5206, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5205, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5212, + "src": "9615:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5204, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9615:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9614:13:11" + }, + "scope": 5225, + "src": "9563:106:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5223, + "nodeType": "Block", + "src": "9958:40:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5219, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "9975:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5221, + "indexExpression": { + "argumentTypes": null, + "id": 5220, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5214, + "src": "9986:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9975:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 5218, + "id": 5222, + "nodeType": "Return", + "src": "9968:23:11" + } + ] + }, + "documentation": "@notice Get value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Int value associated with the id key\" }", + "id": 5224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5214, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5224, + "src": "9911:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9911:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9910:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5217, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5224, + "src": "9946:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5216, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9946:3:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9945:12:11" + }, + "scope": 5225, + "src": "9895:103:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 5226, + "src": "1972:8029:11" + } + ], + "src": "0:10002:11" + }, + "legacyAST": { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", + "exportedSymbols": { + "TokenIOStorage": [ + 5225 + ] + }, + "id": 5226, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4892, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:11" + }, + { + "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/Ownable.sol", + "file": "./Ownable.sol", + "id": 4893, + "nodeType": "ImportDirective", + "scope": 5226, + "sourceUnit": 185, + "src": "25:23:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4894, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "1999:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$184", + "typeString": "contract Ownable" + } + }, + "id": 4895, + "nodeType": "InheritanceSpecifier", + "src": "1999:7:11" + } + ], + "contractDependencies": [ + 184 + ], + "contractKind": "contract", + "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title TokenIOStorage - Serves as derived contract for TokenIO contract and\nis used to upgrade interfaces in the event of deprecating the main contract.\n@author Ryan Tate , Sean Pollock \n@notice Storage contract\n@dev In the event that the main contract becomes deprecated, the upgraded contract\nwill be set as the owner of this contract, and use this contract's storage to\nmaintain data consistency between contract.\n@notice NOTE: This contract is based on the RocketPool Storage Contract,\nfound here: https://github.com/rocket-pool/rocketpool/blob/master/contracts/RocketStorage.sol\nAnd this medium article: https://medium.com/rocket-pool/upgradable-solidity-contract-design-54789205276d\nChanges:\n- setting primitive mapping view to internal;\n- setting method views to public;\n@dev NOTE: When deprecating the main TokenIO contract, the upgraded contract\nmust take ownership of the TokenIO contract, it will require using the public methods\nto update changes to the underlying data. The updated contract must use a\nstandard call to original TokenIO contract such that the request is made from\nthe upgraded contract and not the transaction origin (tx.origin) of the signing\naccount.\n@dev NOTE: The reasoning for using the storage contract is to abstract the interface\nfrom the data of the contract on chain, limiting the need to migrate data to\nnew contracts.", + "fullyImplemented": true, + "id": 5225, + "linearizedBaseContracts": [ + 5225, + 184 + ], + "name": "TokenIOStorage", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4899, + "name": "uIntStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2321:51:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 4898, + "keyType": { + "id": 4896, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2329:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2321:27:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 4897, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2340:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4903, + "name": "stringStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2378:53:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string)" + }, + "typeName": { + "id": 4902, + "keyType": { + "id": 4900, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2386:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2378:26:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string)" + }, + "valueType": { + "id": 4901, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2397:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4907, + "name": "addressStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2437:54:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "typeName": { + "id": 4906, + "keyType": { + "id": 4904, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2445:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2437:27:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "valueType": { + "id": 4905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2456:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4911, + "name": "bytesStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2497:52:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes)" + }, + "typeName": { + "id": 4910, + "keyType": { + "id": 4908, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2505:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2497:25:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes)" + }, + "valueType": { + "id": 4909, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2516:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4915, + "name": "boolStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2555:51:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 4914, + "keyType": { + "id": 4912, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2563:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2555:24:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 4913, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2574:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4919, + "name": "intStorage", + "nodeType": "VariableDeclaration", + "scope": 5225, + "src": "2612:50:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + }, + "typeName": { + "id": 4918, + "keyType": { + "id": 4916, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2620:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2612:26:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + }, + "valueType": { + "id": 4917, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "2631:6:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 4929, + "nodeType": "Block", + "src": "2690:186:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4922, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "2845:5:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4925, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4923, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "2851:3:11", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2851:10:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2845:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2865:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2845:24:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4928, + "nodeType": "ExpressionStatement", + "src": "2845:24:11" + } + ] + }, + "documentation": null, + "id": 4930, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4920, + "nodeType": "ParameterList", + "parameters": [], + "src": "2680:2:11" + }, + "payable": false, + "returnParameters": { + "id": 4921, + "nodeType": "ParameterList", + "parameters": [], + "src": "2690:0:11" + }, + "scope": 5225, + "src": "2669:207:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4949, + "nodeType": "Block", + "src": "3287:67:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4941, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4907, + "src": "3297:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 4943, + "indexExpression": { + "argumentTypes": null, + "id": 4942, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4932, + "src": "3312:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3297:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4944, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4934, + "src": "3320:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3297:29:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4946, + "nodeType": "ExpressionStatement", + "src": "3297:29:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3343:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4940, + "id": 4948, + "nodeType": "Return", + "src": "3336:11:11" + } + ] + }, + "documentation": "@notice Set value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Address value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4950, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4937, + "modifierName": { + "argumentTypes": null, + "id": 4936, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "3254:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3254:9:11" + } + ], + "name": "setAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4932, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4950, + "src": "3217:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4931, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3217:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4934, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4950, + "src": "3231:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4933, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3231:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3216:30:11" + }, + "payable": false, + "returnParameters": { + "id": 4940, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4939, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4950, + "src": "3273:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4938, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3273:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3272:14:11" + }, + "scope": 5225, + "src": "3197:157:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4969, + "nodeType": "Block", + "src": "3723:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4961, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4899, + "src": "3733:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 4963, + "indexExpression": { + "argumentTypes": null, + "id": 4962, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "3745:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3733:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4954, + "src": "3753:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3733:26:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4966, + "nodeType": "ExpressionStatement", + "src": "3733:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3776:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4960, + "id": 4968, + "nodeType": "Return", + "src": "3769:11:11" + } + ] + }, + "documentation": "@notice Set value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Uint value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4970, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4957, + "modifierName": { + "argumentTypes": null, + "id": 4956, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "3690:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3690:9:11" + } + ], + "name": "setUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4952, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4970, + "src": "3656:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4951, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3656:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4954, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4970, + "src": "3670:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4953, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3670:4:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3655:27:11" + }, + "payable": false, + "returnParameters": { + "id": 4960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4959, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4970, + "src": "3709:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4958, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3709:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3708:14:11" + }, + "scope": 5225, + "src": "3639:148:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4989, + "nodeType": "Block", + "src": "4164:66:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4981, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "4174:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 4983, + "indexExpression": { + "argumentTypes": null, + "id": 4982, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "4188:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4174:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4984, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4974, + "src": "4196:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4174:28:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 4986, + "nodeType": "ExpressionStatement", + "src": "4174:28:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4219:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4980, + "id": 4988, + "nodeType": "Return", + "src": "4212:11:11" + } + ] + }, + "documentation": "@notice Set value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The String value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 4990, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4977, + "modifierName": { + "argumentTypes": null, + "id": 4976, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4131:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4131:9:11" + } + ], + "name": "setString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4975, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4972, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 4990, + "src": "4095:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4971, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4095:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4974, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4990, + "src": "4109:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4973, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4109:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4094:29:11" + }, + "payable": false, + "returnParameters": { + "id": 4980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4979, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 4990, + "src": "4150:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4978, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4150:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4149:14:11" + }, + "scope": 5225, + "src": "4076:154:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5009, + "nodeType": "Block", + "src": "4603:65:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5001, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4911, + "src": "4613:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5003, + "indexExpression": { + "argumentTypes": null, + "id": 5002, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4992, + "src": "4626:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4613:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5004, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4994, + "src": "4634:6:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "src": "4613:27:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "id": 5006, + "nodeType": "ExpressionStatement", + "src": "4613:27:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4657:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5000, + "id": 5008, + "nodeType": "Return", + "src": "4650:11:11" + } + ] + }, + "documentation": "@notice Set value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Bytes value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5010, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 4997, + "modifierName": { + "argumentTypes": null, + "id": 4996, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "4570:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4570:9:11" + } + ], + "name": "setBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4992, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5010, + "src": "4535:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4535:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4994, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5010, + "src": "4549:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4993, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4549:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4534:28:11" + }, + "payable": false, + "returnParameters": { + "id": 5000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4999, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5010, + "src": "4589:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4998, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4589:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:14:11" + }, + "scope": 5225, + "src": "4517:151:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5029, + "nodeType": "Block", + "src": "5037:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5021, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "5047:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5023, + "indexExpression": { + "argumentTypes": null, + "id": 5022, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "5059:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5047:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5024, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5014, + "src": "5067:6:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5047:26:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5026, + "nodeType": "ExpressionStatement", + "src": "5047:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5090:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5020, + "id": 5028, + "nodeType": "Return", + "src": "5083:11:11" + } + ] + }, + "documentation": "@notice Set value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Bool value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5030, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5017, + "modifierName": { + "argumentTypes": null, + "id": 5016, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5004:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5004:9:11" + } + ], + "name": "setBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5012, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5030, + "src": "4970:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5011, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4970:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5014, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5030, + "src": "4984:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5013, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4984:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4969:27:11" + }, + "payable": false, + "returnParameters": { + "id": 5020, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5019, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5030, + "src": "5023:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5018, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5023:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5022:14:11" + }, + "scope": 5225, + "src": "4953:148:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5049, + "nodeType": "Block", + "src": "5466:63:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5041, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "5476:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5043, + "indexExpression": { + "argumentTypes": null, + "id": 5042, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "5487:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5476:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5044, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5034, + "src": "5495:6:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5476:25:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 5046, + "nodeType": "ExpressionStatement", + "src": "5476:25:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5518:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5040, + "id": 5048, + "nodeType": "Return", + "src": "5511:11:11" + } + ] + }, + "documentation": "@notice Set value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@param _value The Int value to be set\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5050, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5037, + "modifierName": { + "argumentTypes": null, + "id": 5036, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5433:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5433:9:11" + } + ], + "name": "setInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5032, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5050, + "src": "5400:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5031, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5400:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5034, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5050, + "src": "5414:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5033, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5414:3:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5399:26:11" + }, + "payable": false, + "returnParameters": { + "id": 5040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5039, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5050, + "src": "5452:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5038, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5452:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5451:14:11" + }, + "scope": 5225, + "src": "5384:145:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5066, + "nodeType": "Block", + "src": "5978:65:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "5988:27:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5059, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4907, + "src": "5995:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 5061, + "indexExpression": { + "argumentTypes": null, + "id": 5060, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5052, + "src": "6010:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5995:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5063, + "nodeType": "ExpressionStatement", + "src": "5988:27:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6032:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5058, + "id": 5065, + "nodeType": "Return", + "src": "6025:11:11" + } + ] + }, + "documentation": "@notice Delete value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5067, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5055, + "modifierName": { + "argumentTypes": null, + "id": 5054, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "5945:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5945:9:11" + } + ], + "name": "deleteAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5052, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5067, + "src": "5924:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5051, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5924:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5923:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5058, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5057, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5067, + "src": "5964:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5056, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5964:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5963:14:11" + }, + "scope": 5225, + "src": "5901:142:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5083, + "nodeType": "Block", + "src": "6359:62:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6369:24:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5076, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4899, + "src": "6376:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 5078, + "indexExpression": { + "argumentTypes": null, + "id": 5077, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5069, + "src": "6388:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6376:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5080, + "nodeType": "ExpressionStatement", + "src": "6369:24:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6410:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5075, + "id": 5082, + "nodeType": "Return", + "src": "6403:11:11" + } + ] + }, + "documentation": "@notice Delete value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5084, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5072, + "modifierName": { + "argumentTypes": null, + "id": 5071, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "6326:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6326:9:11" + } + ], + "name": "deleteUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5070, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5069, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5084, + "src": "6305:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5068, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6305:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6304:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5074, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5084, + "src": "6345:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5073, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6345:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6344:14:11" + }, + "scope": 5225, + "src": "6285:136:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5100, + "nodeType": "Block", + "src": "6741:64:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6751:26:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5093, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "6758:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 5095, + "indexExpression": { + "argumentTypes": null, + "id": 5094, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5086, + "src": "6772:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6758:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5097, + "nodeType": "ExpressionStatement", + "src": "6751:26:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6794:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5092, + "id": 5099, + "nodeType": "Return", + "src": "6787:11:11" + } + ] + }, + "documentation": "@notice Delete value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5101, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5089, + "modifierName": { + "argumentTypes": null, + "id": 5088, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "6708:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6708:9:11" + } + ], + "name": "deleteString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5086, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5101, + "src": "6687:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5085, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6687:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6686:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5092, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5091, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5101, + "src": "6727:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5090, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6727:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6726:14:11" + }, + "scope": 5225, + "src": "6665:140:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5117, + "nodeType": "Block", + "src": "7123:63:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7133:25:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5110, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4911, + "src": "7140:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5112, + "indexExpression": { + "argumentTypes": null, + "id": 5111, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5103, + "src": "7153:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7140:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5114, + "nodeType": "ExpressionStatement", + "src": "7133:25:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7175:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5109, + "id": 5116, + "nodeType": "Return", + "src": "7168:11:11" + } + ] + }, + "documentation": "@notice Delete value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5118, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5106, + "modifierName": { + "argumentTypes": null, + "id": 5105, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7090:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7090:9:11" + } + ], + "name": "deleteBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5103, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5118, + "src": "7069:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5102, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7069:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7068:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5108, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5118, + "src": "7109:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5107, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7109:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7108:14:11" + }, + "scope": 5225, + "src": "7048:138:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5134, + "nodeType": "Block", + "src": "7502:62:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7512:24:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5127, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "7519:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5129, + "indexExpression": { + "argumentTypes": null, + "id": 5128, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5120, + "src": "7531:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7519:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5131, + "nodeType": "ExpressionStatement", + "src": "7512:24:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7553:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5126, + "id": 5133, + "nodeType": "Return", + "src": "7546:11:11" + } + ] + }, + "documentation": "@notice Delete value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5135, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5123, + "modifierName": { + "argumentTypes": null, + "id": 5122, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7469:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7469:9:11" + } + ], + "name": "deleteBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5120, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5135, + "src": "7448:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5119, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7448:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7447:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5125, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5135, + "src": "7488:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5124, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7488:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7487:14:11" + }, + "scope": 5225, + "src": "7428:136:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5151, + "nodeType": "Block", + "src": "7878:61:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "7888:23:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5144, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "7895:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5146, + "indexExpression": { + "argumentTypes": null, + "id": 5145, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5137, + "src": "7906:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7895:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5148, + "nodeType": "ExpressionStatement", + "src": "7888:23:11" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7928:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5143, + "id": 5150, + "nodeType": "Return", + "src": "7921:11:11" + } + ] + }, + "documentation": "@notice Delete value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"success\" : \"Returns true when successfully called from another contract\" }", + "id": 5152, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 5140, + "modifierName": { + "argumentTypes": null, + "id": 5139, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "7845:9:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7845:9:11" + } + ], + "name": "deleteInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5137, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5152, + "src": "7824:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5136, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7824:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7823:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5143, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5142, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 5152, + "src": "7864:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5141, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7864:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7863:14:11" + }, + "scope": 5225, + "src": "7805:134:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5163, + "nodeType": "Block", + "src": "8274:44:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5159, + "name": "addressStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4907, + "src": "8291:14:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 5161, + "indexExpression": { + "argumentTypes": null, + "id": 5160, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5154, + "src": "8306:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8291:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5158, + "id": 5162, + "nodeType": "Return", + "src": "8284:27:11" + } + ] + }, + "documentation": "@notice Get value for Address associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Address value associated with the id key\" }", + "id": 5164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5154, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5164, + "src": "8223:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5153, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8223:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8222:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5157, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5164, + "src": "8258:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5156, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8258:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8257:16:11" + }, + "scope": 5225, + "src": "8203:115:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5175, + "nodeType": "Block", + "src": "8611:41:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5171, + "name": "uIntStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4899, + "src": "8628:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 5173, + "indexExpression": { + "argumentTypes": null, + "id": 5172, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5166, + "src": "8640:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8628:17:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5170, + "id": 5174, + "nodeType": "Return", + "src": "8621:24:11" + } + ] + }, + "documentation": "@notice Get value for Uint associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Uint value associated with the id key\" }", + "id": 5176, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5167, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5166, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5176, + "src": "8563:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5165, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8563:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8562:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5169, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5176, + "src": "8598:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5168, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8598:4:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8597:13:11" + }, + "scope": 5225, + "src": "8546:106:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5187, + "nodeType": "Block", + "src": "8953:43:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5183, + "name": "stringStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "8970:13:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_string_storage_$", + "typeString": "mapping(bytes32 => string storage ref)" + } + }, + "id": 5185, + "indexExpression": { + "argumentTypes": null, + "id": 5184, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5178, + "src": "8984:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8970:19:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 5182, + "id": 5186, + "nodeType": "Return", + "src": "8963:26:11" + } + ] + }, + "documentation": "@notice Get value for String associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the String value associated with the id key\" }", + "id": 5188, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getString", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5178, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5188, + "src": "8903:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5177, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8903:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8902:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5181, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5188, + "src": "8938:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5180, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8938:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8937:15:11" + }, + "scope": 5225, + "src": "8884:112:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5199, + "nodeType": "Block", + "src": "9293:42:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5195, + "name": "bytesStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4911, + "src": "9310:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes_storage_$", + "typeString": "mapping(bytes32 => bytes storage ref)" + } + }, + "id": 5197, + "indexExpression": { + "argumentTypes": null, + "id": 5196, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5190, + "src": "9323:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9310:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "functionReturnParameters": 5194, + "id": 5198, + "nodeType": "Return", + "src": "9303:25:11" + } + ] + }, + "documentation": "@notice Get value for Bytes associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Bytes value associated with the id key\" }", + "id": 5200, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBytes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5190, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5200, + "src": "9244:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5189, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9244:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9243:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5193, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5200, + "src": "9279:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5192, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9279:5:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9278:14:11" + }, + "scope": 5225, + "src": "9226:109:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5211, + "nodeType": "Block", + "src": "9628:41:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5207, + "name": "boolStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "9645:11:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 5209, + "indexExpression": { + "argumentTypes": null, + "id": 5208, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "9657:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9645:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5206, + "id": 5210, + "nodeType": "Return", + "src": "9638:24:11" + } + ] + }, + "documentation": "@notice Get value for Bool associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Bool value associated with the id key\" }", + "id": 5212, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5202, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5212, + "src": "9580:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9580:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9579:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5206, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5205, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5212, + "src": "9615:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5204, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9615:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9614:13:11" + }, + "scope": 5225, + "src": "9563:106:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5223, + "nodeType": "Block", + "src": "9958:40:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5219, + "name": "intStorage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4919, + "src": "9975:10:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", + "typeString": "mapping(bytes32 => int256)" + } + }, + "id": 5221, + "indexExpression": { + "argumentTypes": null, + "id": 5220, + "name": "_key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5214, + "src": "9986:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9975:16:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 5218, + "id": 5222, + "nodeType": "Return", + "src": "9968:23:11" + } + ] + }, + "documentation": "@notice Get value for Int associated with bytes32 id key\n@param _key Pointer identifier for value in storage\n@return { \"_value\" : \"Returns the Int value associated with the id key\" }", + "id": 5224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getInt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5214, + "name": "_key", + "nodeType": "VariableDeclaration", + "scope": 5224, + "src": "9911:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9911:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9910:14:11" + }, + "payable": false, + "returnParameters": { + "id": 5218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5217, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5224, + "src": "9946:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5216, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9946:3:11", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9945:12:11" + }, + "scope": 5225, + "src": "9895:103:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 5226, + "src": "1972:8029:11" + } + ], + "src": "0:10002:11" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "1": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + "0x2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad98": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + } + }, + "links": {}, + "address": "0x7395662c0379ea49c8af2275dbba6bf0e2033af4", + "transactionHash": "0xb265e9b1663a03d1efc7eb6bbcbe4f62b6a4e60f440c13d35b1e65e3c24317bd" + }, + "4447": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x1c965cca064792c08083e8746b9062155a2f163d9f9ddab08196d5b2e3a818c5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "AllowOwnership", + "type": "event" + }, + "0x2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad98": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "allowedAddress", + "type": "address" + } + ], + "name": "RevokeOwnership", + "type": "event" + } + }, + "links": {}, + "address": "0x9fbda871d559710256a2502a2517b794b482db40", + "transactionHash": "0x7ba32ab1df89a09fbad8d4bfaded7e556bafd30b97aa7bb69e262ae55fb16023" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-24T17:41:08.927Z" +} \ No newline at end of file diff --git a/migrations/10_deploy_TokenIOStableSwap.js b/migrations/10_deploy_TokenIOStableSwap.js new file mode 100644 index 0000000..2b387c6 --- /dev/null +++ b/migrations/10_deploy_TokenIOStableSwap.js @@ -0,0 +1,36 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol") +const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* fx */ + const swap = await deployer.deploy(TokenIOStableSwap, storage.address) + + await storage.allowOwnership(swap.address) + + // Allow USD asset + const usdx = await TokenIOERC20.deployed(); + const params = [ usdx.address, await usdx.tla() ] + await swap.setTokenXCurrency(...params); + + console.log('isAllowed', await swap.isAllowedAsset(...params)) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/package.json b/package.json index a33de8e..d022aaa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tokeninc-smart-contracts", - "version": "0.1.0", - "description": "Smart Contracts for Token, Inc.", + "version": "1.0.1", + "description": "Ethereum Smart Contracts for Token, Inc.", "main": "./dist/index.js", "directories": { "test": "test" diff --git a/test/TokenIOStableSwap.js b/test/TokenIOStableSwap.js new file mode 100644 index 0000000..b92f259 --- /dev/null +++ b/test/TokenIOStableSwap.js @@ -0,0 +1,78 @@ +var { Wallet, utils, SigningKey } = require('ethers'); +var Promise = require('bluebird') + +var TokenIOERC20 = artifacts.require("./TokenIOERC20.sol"); +var TokenIOStorage = artifacts.require("./TokenIOStorage.sol"); +var TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); +var TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol"); + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS +} = mode == 'production' ? production : development; + +const USDc = TOKEN_DETAILS['USDc'] + + +contract("TokenIOStableSwap", function(accounts) { + + // Globals + const DEPOSIT_AMOUNT = 1000e2; + const SWAP_AMOUNT = 100e2; + const TEST_ACCOUNT_1 = accounts[1] + + + var USDX, + USDC, + SWAP, + CA; + + before(async () => { + const storage = await TokenIOStorage.deployed() + + CA = await TokenIOCurrencyAuthority.deployed(); + SWAP = await TokenIOStableSwap.deployed(); + + USDX = await TokenIOERC20.deployed() + + USDC = await TokenIOERC20.new(storage.address) + await storage.allowOwnership(USDC.address) + await USDC.setParams(...Object.values(USDc).map((v) => { return v })) + + await SWAP.setTokenXCurrency(USDX.address, 'USD'); + await SWAP.allowAsset(USDC.address, 'USD'); + }) + + it("Should Deposit USDc into TEST_ACCOUNT_1 account", async () => { + const APPROVE_REQUESTER = await CA.approveKYC(TEST_ACCOUNT_1, true, DEPOSIT_AMOUNT, firmName) + + const DEPOSIT_REQUESTER_AMOUNT_TX = await CA.deposit((await USDC.symbol()), TEST_ACCOUNT_1, DEPOSIT_AMOUNT, firmName) + + assert.equal(DEPOSIT_REQUESTER_AMOUNT_TX['receipt']['status'], "0x1", "Transaction should be successful") + + + const TEST_ACCOUNT_1_BALANCE = +(await USDC.balanceOf(TEST_ACCOUNT_1)).toString() + assert.equal(TEST_ACCOUNT_1_BALANCE, DEPOSIT_AMOUNT, "Requester balance should equal deposit amount") + + await USDC.approve(SWAP.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) + assert.equal(+(await USDC.allowance(TEST_ACCOUNT_1, SWAP.address)), SWAP_AMOUNT, "Allowance of swap contract should equal requester deposit amount"); + + }) + + it("Should allow the swap between the requester and the contract", async () => { + + await SWAP.convert(USDC.address, USDX.address, SWAP_AMOUNT, (await USDX.tla()), { from: TEST_ACCOUNT_1 }) + console.log('SWAP_AMOUNT', SWAP_AMOUNT); + const FEES = +(await USDC.calculateFees(SWAP_AMOUNT)) + + const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDC.balanceOf(TEST_ACCOUNT_1)).toString() + assert.equal(TEST_ACCOUNT_1_USDC_BALANCE, (DEPOSIT_AMOUNT-SWAP_AMOUNT-FEES), "Requester balance should be reduced by swap amount") + + const TEST_ACCOUNT_1_USDX_BALANCE = +(await USDX.balanceOf(TEST_ACCOUNT_1)).toString() + assert.equal(TEST_ACCOUNT_1_USDX_BALANCE, SWAP_AMOUNT, "Requester balance should equal requester deposit amount for USDX contract") + + + }) + +}); diff --git a/test/TokenIOStorage.js b/test/TokenIOStorage.js index 7838870..ebc98d9 100644 --- a/test/TokenIOStorage.js +++ b/test/TokenIOStorage.js @@ -24,7 +24,7 @@ contract("TokenIOStorage", function(accounts) { const TEST_ACCOUNT_1 = accounts[0] const TEST_ACCOUNT_2 = accounts[1] const DEPOSIT_AMOUNT = 10000e2 - const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 + const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 it("Should get the token details directly from the storage contract", async () => { const storage = await TokenIOStorage.deployed() diff --git a/token.config.js b/token.config.js index 61dbbfb..47b0149 100644 --- a/token.config.js +++ b/token.config.js @@ -4,7 +4,19 @@ const USDx = { tokenName: 'TokenX USD', // tokenName tokenSymbol: 'USDx', // tokenSymbol tokenTLA: 'USD', // tokenTLA - tokenVersion: 'v0.3.0', // tokenVersion + tokenVersion: 'v1.0.1', // tokenVersion + tokenDecimals: 2, // tokenDecimals + feeContract: "0x0", // fee account + fxBPSRate: 10000 +} + +const USDc = { + // Ensure these values are ordered in the object for the respective param list + // index in the erc20 contract setPrams() method. + tokenName: 'Dummy Token For USDc', // tokenName + tokenSymbol: 'USDc', // tokenSymbol + tokenTLA: 'USD', // tokenTLA + tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 2, // tokenDecimals feeContract: "0x0", // fee account fxBPSRate: 10000 @@ -16,7 +28,7 @@ const MXNx = { tokenName: 'TokenX MXN', // tokenName tokenSymbol: 'MXNx', // tokenSymbol tokenTLA: 'MXN', // tokenTLA - tokenVersion: 'v0.3.0', // tokenVersion + tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 2, // tokenDecimals feeContract: "0x0", // fee account fxBPSRate: 510 @@ -28,7 +40,7 @@ const GBPx = { tokenName: 'TokenX GBP', // tokenName tokenSymbol: 'GBPx', // tokenSymbol tokenTLA: 'GBP', // tokenTLA - tokenVersion: 'v0.3.0', // tokenVersion + tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 2, // tokenDecimals feeContract: "0x0", // fee account fxBPSRate: 13200 @@ -40,7 +52,7 @@ const JPYx = { tokenName: 'TokenX JPY', // tokenName tokenSymbol: 'JPYx', // tokenSymbol tokenTLA: 'JPY', // tokenTLA - tokenVersion: 'v0.3.0', // tokenVersion + tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 0, // tokenDecimals feeContract: "0x0", // fee account fxBPSRate: 90 @@ -52,13 +64,14 @@ const EURx = { tokenName: 'TokenX EUR', // tokenName tokenSymbol: 'EURx', // tokenSymbol tokenTLA: 'EUR', // tokenTLA - tokenVersion: 'v0.3.0', // tokenVersion + tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 2, // tokenDecimals feeContract: "0x0", // fee account fxBPSRate: 11700 } const TOKEN_DETAILS = { + USDc, // DUMMY TOKEN, NOT FOR DEPLOYMENT, ONLY FOR TESTS USDx, EURx, // MXNx, @@ -92,12 +105,3 @@ module.exports = { FEE_PARAMS } } - - -// "Token USD", -// "USDx", -// "USD", -// "v0.1.2", -// 2, -// "0x310bd4225ecef15ba21bab3fce87289ee6568f4f", -// 10000 From 2d14bb4fe5c61518b617929c00f81acb44fa608a Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Mon, 29 Oct 2018 16:57:57 -0700 Subject: [PATCH 05/40] Adding StableSwap contract; TODO decimal normalization --- contracts/TokenIOStableSwap.sol | 156 ++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 contracts/TokenIOStableSwap.sol diff --git a/contracts/TokenIOStableSwap.sol b/contracts/TokenIOStableSwap.sol new file mode 100644 index 0000000..698c889 --- /dev/null +++ b/contracts/TokenIOStableSwap.sol @@ -0,0 +1,156 @@ +pragma solidity 0.4.24; + +import "./Ownable.sol"; +import "./TokenIOStorage.sol"; +import "./TokenIOLib.sol"; +import "./ERC20Interface.sol"; + +/* +COPYRIGHT 2018 Token, Inc. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +@title ERC20 Compliant StableCoin Swap Smart Contract for Token, Inc. + +@author Ryan Tate , Sean Pollock + +@notice Contract uses generalized storage contract, `TokenIOStorage`, for +upgradeability of interface contract. + +@dev In the event that the main contract becomes deprecated, the upgraded contract +will be set as the owner of this contract, and use this contract's storage to +maintain data consistency between contract. +*/ + + + +contract TokenIOStableSwap is Ownable { + //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage + using TokenIOLib for TokenIOLib.Data; + TokenIOLib.Data lib; + + /** + * @notice Constructor method for TokenIOStableSwap contract + * @param _storageContract address of TokenIOStorage contract + */ + constructor(address _storageContract) public { + //// @dev Set the storage contract for the interface + //// @dev This contract will be unable to use the storage constract until + //// @dev contract address is authorized with the storage contract + //// @dev Once authorized, Use the `setParams` method to set storage values + lib.Storage = TokenIOStorage(_storageContract); + + //// @dev set owner to contract initiator + owner[msg.sender] = true; + } + + /** + * @notice Allows the address of the asset to be accepted by this contract by the currency type. This method is only called by admins. + * @notice This method may be deprecated or refactored to allow for multiple interfaces + * @param asset Ethereum address of the ERC20 compliant smart contract to allow the swap + * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) + * @return {"success": "Return boolean success if able to set the allowed asset"} + */ + function allowAsset(address asset, string currency) public onlyOwner returns (bool success) { + bytes32 id = keccak256(abi.encodePacked('allowed.stable.asset', asset, currency)); + require( + lib.Storage.setBool(id, true), + "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + ); + return true; + } + + /** + * @notice Allows the address of the asset to be accepted by this contract by the currency type. This method is only called by admins. + * @notice This method may be deprecated or refactored to allow for multiple interfaces + * @param asset Ethereum address of the ERC20 compliant smart contract to allow the swap + * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) + * @return {"success": "Return boolean success if able to set the allowed asset"} + */ + function isAllowedAsset(address asset, string currency) public view returns (bool allowed) { + if (isTokenXContract(asset, currency)) { + return true; + } else { + bytes32 id = keccak256(abi.encodePacked('allowed.stable.asset', asset, currency)); + return lib.Storage.getBool(id); + } + } + + function setTokenXCurrency(address asset, string currency) public onlyOwner returns (bool success) { + bytes32 id = keccak256(abi.encodePacked('tokenx', asset, currency)); + require( + lib.Storage.setBool(id, true), + "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + ); + return true; + } + + function isTokenXContract(address asset, string currency) public view returns (bool isX) { + bytes32 id = keccak256(abi.encodePacked('tokenx', asset, currency)); + return lib.Storage.getBool(id); + } + + function convert(address fromAsset, address toAsset, uint amount, string currency) public returns (bool success) { + /// @dev Ensure assets are allowed to be swapped; + require(isAllowedAsset(fromAsset, currency), 'Unsupported asset requested. Asset must be supported by this contract and have a currency of `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK` .'); + require(isAllowedAsset(toAsset, currency), 'Unsupported asset requested. Asset must be supported by this contract and have a currency of `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK` .'); + + + /// @dev require one of the assets be equal to Token X asset; + if (isTokenXContract(toAsset, currency)) { + /// @notice This requires the erc20 transfer function to return a boolean result of true; + require( + ERC20Interface(fromAsset).transferFrom(msg.sender, address(this), amount), + /* fromAsset.call(bytes4(keccak256("transferFrom(address, address, uint256)")), msg.sender, address(this), amount), */ + 'Unable to transferFrom your asset holdings. Please ensure this contract has an approved allowance equal to or greater than the amount called in transferFrom method.' + ); + + /// @dev Deposit TokenX asset to the user; + + require( + lib.deposit(lib.getTokenSymbol(toAsset), msg.sender, amount, 'Token, Inc.'), + "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + ); + return true; + } else if(isTokenXContract(fromAsset, currency)) { + ///@dev Transfer the asset to the user; + require( + ERC20Interface(toAsset).transfer(msg.sender, amount), + 'Unable to call the requested erc20 contract.' + ); + + /// @dev Withdraw TokenX asset from the user + require( + lib.withdraw(lib.getTokenSymbol(fromAsset), msg.sender, amount, 'Token, Inc.'), + "Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn" + ); + return true; + } else { + revert('BAD_REQUEST: AT LEAST ONE ASSET REQUESTED MUST BE ISSUED BY TOKEN, INC. (TOKEN X)'); + } + } + + /** + * @notice gets currency status of contract + * @return {"deprecated" : "Returns true if deprecated, false otherwise"} + */ + function deprecateInterface() public onlyOwner returns (bool deprecated) { + require(lib.setDeprecatedContract(address(this)), + "Error: Unable to deprecate contract!"); + return true; + } + + modifier notDeprecated() { + /// @notice throws if contract is deprecated + require(!lib.isContractDeprecated(address(this)), + "Error: Contract has been deprecated, cannot perform operation!"); + _; + } + + +} From 68e227271d433abed36f999bb934e4333b5a6819 Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Wed, 31 Oct 2018 14:41:27 -0700 Subject: [PATCH 06/40] Add fee params per asset for stable swap contract; add natspec --- contracts/ERC20Interface.sol | 2 + contracts/TokenIOStableSwap.sol | 213 ++++++++++++++++++++++++++------ test/TokenIOStableSwap.js | 20 +-- token.config.js | 2 +- 4 files changed, 187 insertions(+), 50 deletions(-) diff --git a/contracts/ERC20Interface.sol b/contracts/ERC20Interface.sol index aa91250..5b583d0 100644 --- a/contracts/ERC20Interface.sol +++ b/contracts/ERC20Interface.sol @@ -8,6 +8,8 @@ pragma solidity ^0.4.24; interface ERC20Interface { function totalSupply() external view returns (uint256); + function decimals() external view returns (uint256); + function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) diff --git a/contracts/TokenIOStableSwap.sol b/contracts/TokenIOStableSwap.sol index 698c889..0858298 100644 --- a/contracts/TokenIOStableSwap.sol +++ b/contracts/TokenIOStableSwap.sol @@ -1,6 +1,7 @@ pragma solidity 0.4.24; import "./Ownable.sol"; +import "./SafeMath.sol"; import "./TokenIOStorage.sol"; import "./TokenIOLib.sol"; import "./ERC20Interface.sol"; @@ -30,10 +31,17 @@ maintain data consistency between contract. contract TokenIOStableSwap is Ownable { + /// @dev use safe math operations + using SafeMath for uint; + //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; + event StableSwap(address fromAsset, address toAsset, address requestedBy, uint amount, string currency); + event TransferredHoldings(address asset, address to, uint amount); + event AllowedERC20Asset(address asset, string currency); + /** * @notice Constructor method for TokenIOStableSwap contract * @param _storageContract address of TokenIOStorage contract @@ -54,23 +62,28 @@ contract TokenIOStableSwap is Ownable { * @notice This method may be deprecated or refactored to allow for multiple interfaces * @param asset Ethereum address of the ERC20 compliant smart contract to allow the swap * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) - * @return {"success": "Return boolean success if able to set the allowed asset"} + * @return { "success" : "Returns true if successfully called from another contract"} */ - function allowAsset(address asset, string currency) public onlyOwner returns (bool success) { + function allowAsset(address asset, string currency) public onlyOwner notDeprecated returns (bool success) { bytes32 id = keccak256(abi.encodePacked('allowed.stable.asset', asset, currency)); require( lib.Storage.setBool(id, true), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); + + /// @notice set TLA for the asset; + require(setAssetTLA(asset, currency)); + + /// @dev Log Allow ERC20 Asset + emit AllowedERC20Asset(asset, currency); return true; } /** - * @notice Allows the address of the asset to be accepted by this contract by the currency type. This method is only called by admins. - * @notice This method may be deprecated or refactored to allow for multiple interfaces - * @param asset Ethereum address of the ERC20 compliant smart contract to allow the swap + * @notice Return boolean if the asset is an allowed stable asset for the corresponding currency + * @param asset Ethereum address of the ERC20 compliant smart contract to check allowed status of * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) - * @return {"success": "Return boolean success if able to set the allowed asset"} + * @return {"allowed": "Returns true if the asset is allowed"} */ function isAllowedAsset(address asset, string currency) public view returns (bool allowed) { if (isTokenXContract(asset, currency)) { @@ -81,58 +94,176 @@ contract TokenIOStableSwap is Ownable { } } - function setTokenXCurrency(address asset, string currency) public onlyOwner returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('tokenx', asset, currency)); + /** + * Set the Three Letter Abbrevation for the currency associated to the asset + * @param asset Ethereum address of the asset to set the currency for + * @param currency string TLA of the asset + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function setAssetTLA(address asset, string currency) public onlyOwner returns (bool success) { + bytes32 id = keccak256(abi.encodePacked('asset.tla', asset)); + require( + lib.Storage.setString(id, currency), + "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + ); + return true; + } + + /** + * Get the TLA for an associated asset; + * @param asset Ethereum address of the asset to get the currency for + * @return {"tla": "Returns the TLA of the asset if the asset has been allowed."} + */ + function getAssetTLA(address asset) public view returns (string tla) { + bytes32 id = keccak256(abi.encodePacked('asset.tla', asset)); + return lib.Storage.getString(id); + } + + /** + * @notice Register the address of the asset as a Token X asset for a specific currency + * @notice This method may be deprecated or refactored to allow for multiple interfaces + * @param asset Ethereum address of the ERC20 compliant Token X asset + * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function setTokenXCurrency(address asset, string currency) public onlyOwner notDeprecated returns (bool success) { + bytes32 id = keccak256(abi.encodePacked('tokenx', asset, currency)); require( lib.Storage.setBool(id, true), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); - return true; + + /// @notice set TLA for the asset; + require(setAssetTLA(asset, currency)); + + return true; } + /** + * @notice Return boolean if the asset is a registered Token X asset for the corresponding currency + * @param asset Ethereum address of the asset to check if is a registered Token X stable coin asset + * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) + * @return {"allowed": "Returns true if the asset is allowed"} + */ function isTokenXContract(address asset, string currency) public view returns (bool isX) { bytes32 id = keccak256(abi.encodePacked('tokenx', asset, currency)); return lib.Storage.getBool(id); } - function convert(address fromAsset, address toAsset, uint amount, string currency) public returns (bool success) { - /// @dev Ensure assets are allowed to be swapped; - require(isAllowedAsset(fromAsset, currency), 'Unsupported asset requested. Asset must be supported by this contract and have a currency of `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK` .'); - require(isAllowedAsset(toAsset, currency), 'Unsupported asset requested. Asset must be supported by this contract and have a currency of `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK` .'); + /** + * @notice Set BPS, Min, Max, and Flat fee params for asset + * @param asset Ethereum address of the asset to set fees for. + * @param feeBps Basis points transaction fee + * @param feeMin Minimum transaction fees + * @param feeMax Maximum transaction fee + * @param feeFlat Flat transaction fee + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner notDeprecated returns (bool success) { + /// @dev This method bypasses the setFee library methods and directly sets the fee params for a requested asset. + /// @notice Fees can be different per asset. Some assets may have different liquidity requirements. + require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.max', asset)), feeMax), + 'Error: Failed to set fee parameters with storage contract. Please check permissions.'); + + require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.min', asset)), feeMin), + 'Error: Failed to set fee parameters with storage contract. Please check permissions.'); + + require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.bps', asset)), feeBps), + 'Error: Failed to set fee parameters with storage contract. Please check permissions.'); + + require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.flat', asset)), feeFlat), + 'Error: Failed to set fee parameters with storage contract. Please check permissions.'); + + return true; + } + + /** + * [calcAssetFees description] + * @param asset Ethereum address of the asset to calculate fees based on + * @param amount Amount to calculate fees on + * @return { "fees" : "Returns the fees for the amount associated with the asset contract"} + */ + function calcAssetFees(address asset, uint amount) public view returns (uint fees) { + return lib.calculateFees(asset, amount); + } + + /** + * @notice Return boolean if the asset is a registered Token X asset for the corresponding currency + * @notice Amounts will always be passed in according to the decimal representation of the `fromAsset` token; + * @param fromAsset Ethereum address of the asset with allowance for this contract to transfer and + * @param toAsset Ethereum address of the asset to check if is a registered Token X stable coin asset + * @param amount Amount of fromAsset to be transferred. + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function convert(address fromAsset, address toAsset, uint amount) public notDeprecated returns (bool success) { + /// @notice lookup currency from one of the assets, check if allowed by both assets. + string memory currency = getAssetTLA(fromAsset); + uint fromDecimals = ERC20Interface(fromAsset).decimals(); + uint toDecimals = ERC20Interface(toAsset).decimals(); + + /// @dev Ensure assets are allowed to be swapped; + require(isAllowedAsset(fromAsset, currency), 'Error: Unsupported asset requested. Asset must be supported by this contract and have a currency of `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK` .'); + require(isAllowedAsset(toAsset, currency), 'Error: Unsupported asset requested. Asset must be supported by this contract and have a currency of `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK` .'); /// @dev require one of the assets be equal to Token X asset; if (isTokenXContract(toAsset, currency)) { - /// @notice This requires the erc20 transfer function to return a boolean result of true; - require( - ERC20Interface(fromAsset).transferFrom(msg.sender, address(this), amount), - /* fromAsset.call(bytes4(keccak256("transferFrom(address, address, uint256)")), msg.sender, address(this), amount), */ - 'Unable to transferFrom your asset holdings. Please ensure this contract has an approved allowance equal to or greater than the amount called in transferFrom method.' - ); - - /// @dev Deposit TokenX asset to the user; - - require( - lib.deposit(lib.getTokenSymbol(toAsset), msg.sender, amount, 'Token, Inc.'), - "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" - ); - return true; + /// @notice This requires the erc20 transfer function to return a boolean result of true; + /// @dev the amount being transferred must be in the same decimal representation of the asset + /// e.g. If decimals = 6 and want to transfer $100.00 the amount passed to this contract should be 100e6 (100 * 10 ** 6) + require( + ERC20Interface(fromAsset).transferFrom(msg.sender, address(this), amount), + 'Error: Unable to transferFrom your asset holdings. Please ensure this contract has an approved allowance equal to or greater than the amount called in transferFrom method.' + ); + + /// @dev Deposit TokenX asset to the user; + /// @notice Amount received from deposit is net of fees. + uint netAmountFrom = amount.sub(calcAssetFees(fromAsset, amount)); + /// @dev Ensure amount is converted for the correct decimal representation; + uint convertedAmountFrom = (netAmountFrom.mul(10**toDecimals)).div(10**fromDecimals); + require( + lib.deposit(lib.getTokenSymbol(toAsset), msg.sender, convertedAmountFrom, 'Token, Inc.'), + "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" + ); } else if(isTokenXContract(fromAsset, currency)) { - ///@dev Transfer the asset to the user; - require( - ERC20Interface(toAsset).transfer(msg.sender, amount), - 'Unable to call the requested erc20 contract.' - ); - - /// @dev Withdraw TokenX asset from the user - require( - lib.withdraw(lib.getTokenSymbol(fromAsset), msg.sender, amount, 'Token, Inc.'), - "Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn" - ); - return true; + ///@dev Transfer the asset to the user; + /// @notice Amount received from withdraw is net of fees. + uint netAmountTo = amount.sub(calcAssetFees(toAsset, amount)); + /// @dev Ensure amount is converted for the correct decimal representation; + uint convertedAmountTo = (netAmountTo.mul(10**fromDecimals)).div(10**toDecimals); + require( + ERC20Interface(toAsset).transfer(msg.sender, convertedAmountTo), + 'Unable to call the requested erc20 contract.' + ); + + /// @dev Withdraw TokenX asset from the user + require( + lib.withdraw(lib.getTokenSymbol(fromAsset), msg.sender, amount, 'Token, Inc.'), + "Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn" + ); } else { - revert('BAD_REQUEST: AT LEAST ONE ASSET REQUESTED MUST BE ISSUED BY TOKEN, INC. (TOKEN X)'); + revert('Error: At least one asset must be issued by Token, Inc. (Token X).'); } + + /// @dev Log the swap event for event listeners + emit StableSwap(fromAsset, toAsset, msg.sender, amount, currency); + return true; + } + + /** + * Allow this contract to transfer collected fees to another contract; + * @param asset Ethereum address of asset to transfer + * @param to Transfer collected fees to the following account; + * @param amount Amount of fromAsset to be transferred. + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function transferCollectedFees(address asset, address to, uint amount) public onlyOwner notDeprecated returns (bool success) { + require( + ERC20Interface(asset).transfer(to, amount), + "Error: Unable to transfer fees to account." + ); + emit TransferredHoldings(asset, to, amount); + return true; } /** @@ -141,7 +272,7 @@ contract TokenIOStableSwap is Ownable { */ function deprecateInterface() public onlyOwner returns (bool deprecated) { require(lib.setDeprecatedContract(address(this)), - "Error: Unable to deprecate contract!"); + "Error: Unable to deprecate contract!"); return true; } diff --git a/test/TokenIOStableSwap.js b/test/TokenIOStableSwap.js index b92f259..2f3422d 100644 --- a/test/TokenIOStableSwap.js +++ b/test/TokenIOStableSwap.js @@ -9,6 +9,7 @@ var TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol"); const { mode, development, production } = require('../token.config.js'); const { AUTHORITY_DETAILS: { firmName, authorityAddress }, + FEE_PARAMS: { feeBps, feeMin, feeMax, feeFlat }, TOKEN_DETAILS } = mode == 'production' ? production : development; @@ -18,8 +19,8 @@ const USDc = TOKEN_DETAILS['USDc'] contract("TokenIOStableSwap", function(accounts) { // Globals - const DEPOSIT_AMOUNT = 1000e2; - const SWAP_AMOUNT = 100e2; + const DEPOSIT_AMOUNT = 1000e6; + const SWAP_AMOUNT = 100e6; const TEST_ACCOUNT_1 = accounts[1] @@ -42,6 +43,9 @@ contract("TokenIOStableSwap", function(accounts) { await SWAP.setTokenXCurrency(USDX.address, 'USD'); await SWAP.allowAsset(USDC.address, 'USD'); + + // feeBps, feeMin, feeMax, feeFlat + await SWAP.setAssetFeeParams(USDC.address, 10, 0, 1e12, 5e6); }) it("Should Deposit USDc into TEST_ACCOUNT_1 account", async () => { @@ -61,16 +65,16 @@ contract("TokenIOStableSwap", function(accounts) { }) it("Should allow the swap between the requester and the contract", async () => { - - await SWAP.convert(USDC.address, USDX.address, SWAP_AMOUNT, (await USDX.tla()), { from: TEST_ACCOUNT_1 }) - console.log('SWAP_AMOUNT', SWAP_AMOUNT); - const FEES = +(await USDC.calculateFees(SWAP_AMOUNT)) - + await SWAP.convert(USDC.address, USDX.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) + const FEES = +(await USDC.calculateFees(SWAP_AMOUNT)) // NOTE: These fees only apply in testing due to Token X ERC20 dummy asset + const SWAP_FEES = +(await SWAP.calcAssetFees(USDC.address, SWAP_AMOUNT)); + const NET_AMOUNT = (SWAP_AMOUNT-SWAP_FEES); + const CONVERTED_AMOUNT = (NET_AMOUNT * (10 ** 2)) / (10 ** 6) const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDC.balanceOf(TEST_ACCOUNT_1)).toString() assert.equal(TEST_ACCOUNT_1_USDC_BALANCE, (DEPOSIT_AMOUNT-SWAP_AMOUNT-FEES), "Requester balance should be reduced by swap amount") const TEST_ACCOUNT_1_USDX_BALANCE = +(await USDX.balanceOf(TEST_ACCOUNT_1)).toString() - assert.equal(TEST_ACCOUNT_1_USDX_BALANCE, SWAP_AMOUNT, "Requester balance should equal requester deposit amount for USDX contract") + assert.equal(TEST_ACCOUNT_1_USDX_BALANCE, CONVERTED_AMOUNT, "Requester balance should equal requester deposit amount for USDX contract") }) diff --git a/token.config.js b/token.config.js index 47b0149..2987635 100644 --- a/token.config.js +++ b/token.config.js @@ -17,7 +17,7 @@ const USDc = { tokenSymbol: 'USDc', // tokenSymbol tokenTLA: 'USD', // tokenTLA tokenVersion: 'v1.0.1', // tokenVersion - tokenDecimals: 2, // tokenDecimals + tokenDecimals: 6, // tokenDecimals feeContract: "0x0", // fee account fxBPSRate: 10000 } From 60d36218fa5cf6a0a313979fd17e40fb23134a87 Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Fri, 2 Nov 2018 11:29:24 -0700 Subject: [PATCH 07/40] Deployed TokenIOStableSwap w/ unit tests checking convert method in both directions. --- contracts/TokenIOERC20Unlimited.sol | 236 ++++++++++++++++++ contracts/TokenIOLib.sol | 1 + contracts/TokenIOStableSwap.sol | 60 +++-- ...eSwap.js => 10_deploy_TokenIOUnlimited.js} | 25 +- migrations/11_deploy_TokenIOStableSwap.js | 50 ++++ test/TokenIOERC20Unlimited.js | 179 +++++++++++++ test/TokenIOStableSwap.js | 41 ++- 7 files changed, 551 insertions(+), 41 deletions(-) create mode 100644 contracts/TokenIOERC20Unlimited.sol rename migrations/{10_deploy_TokenIOStableSwap.js => 10_deploy_TokenIOUnlimited.js} (53%) create mode 100644 migrations/11_deploy_TokenIOStableSwap.js create mode 100644 test/TokenIOERC20Unlimited.js diff --git a/contracts/TokenIOERC20Unlimited.sol b/contracts/TokenIOERC20Unlimited.sol new file mode 100644 index 0000000..d0fb08b --- /dev/null +++ b/contracts/TokenIOERC20Unlimited.sol @@ -0,0 +1,236 @@ +pragma solidity 0.4.24; + +import "./Ownable.sol"; +import "./TokenIOStorage.sol"; +import "./TokenIOLib.sol"; + + + +/* +COPYRIGHT 2018 Token, Inc. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +@title ERC20 Compliant Smart Contract for Token, Inc. + +@author Ryan Tate , Sean Pollock + +@notice Contract uses generalized storage contract, `TokenIOStorage`, for +upgradeability of interface contract. + +@dev In the event that the main contract becomes deprecated, the upgraded contract +will be set as the owner of this contract, and use this contract's storage to +maintain data consistency between contract. +*/ + + + +contract TokenIOERC20Unlimited is Ownable { + //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage + using TokenIOLib for TokenIOLib.Data; + TokenIOLib.Data lib; + + event Transfer(address indexed from, address indexed to, uint256 amount); + + /** + * @notice Constructor method for ERC20 contract + * @param _storageContract address of TokenIOStorage contract + */ + constructor(address _storageContract) public { + //// @dev Set the storage contract for the interface + //// @dev This contract will be unable to use the storage constract until + //// @dev contract address is authorized with the storage contract + //// @dev Once authorized, Use the `setParams` method to set storage values + lib.Storage = TokenIOStorage(_storageContract); + + //// @dev set owner to contract initiator + owner[msg.sender] = true; + } + + + /** + @notice Sets erc20 globals and fee paramters + @param _name Full token name 'USD by token.io' + @param _symbol Symbol name 'USDx' + @param _tla Three letter abbreviation 'USD' + @param _version Release version 'v0.0.1' + @param _decimals Decimal precision + @param _feeContract Address of fee contract + @return { "success" : "Returns true if successfully called from another contract"} + */ + function setParams( + string _name, + string _symbol, + string _tla, + string _version, + uint _decimals, + address _feeContract, + uint _fxUSDBPSRate + ) onlyOwner public returns (bool success) { + require(lib.setTokenName(_name), + "Error: Unable to set token name. Please check arguments."); + require(lib.setTokenSymbol(_symbol), + "Error: Unable to set token symbol. Please check arguments."); + require(lib.setTokenTLA(_tla), + "Error: Unable to set token TLA. Please check arguments."); + require(lib.setTokenVersion(_version), + "Error: Unable to set token version. Please check arguments."); + require(lib.setTokenDecimals(_symbol, _decimals), + "Error: Unable to set token decimals. Please check arguments."); + require(lib.setFeeContract(_feeContract), + "Error: Unable to set fee contract. Please check arguments."); + require(lib.setFxUSDBPSRate(_symbol, _fxUSDBPSRate), + "Error: Unable to set fx USD basis points rate. Please check arguments."); + return true; + } + + /** + * @notice Gets name of token + * @return {"_name" : "Returns name of token"} + */ + function name() public view returns (string _name) { + return lib.getTokenName(address(this)); + } + + /** + * @notice Gets symbol of token + * @return {"_symbol" : "Returns symbol of token"} + */ + function symbol() public view returns (string _symbol) { + return lib.getTokenSymbol(address(this)); + } + + /** + * @notice Gets three-letter-abbreviation of token + * @return {"_tla" : "Returns three-letter-abbreviation of token"} + */ + function tla() public view returns (string _tla) { + return lib.getTokenTLA(address(this)); + } + + /** + * @notice Gets version of token + * @return {"_version" : "Returns version of token"} + */ + function version() public view returns (string _version) { + return lib.getTokenVersion(address(this)); + } + + /** + * @notice Gets decimals of token + * @return {"_decimals" : "Returns number of decimals"} + */ + function decimals() public view returns (uint _decimals) { + return lib.getTokenDecimals(lib.getTokenSymbol(address(this))); + } + + /** + * @notice Gets total supply of token + * @return {"supply" : "Returns current total supply of token"} + */ + function totalSupply() public view returns (uint supply) { + return lib.getTokenSupply(lib.getTokenSymbol(address(this))); + } + + /** + * @notice Gets allowance that spender has with approver + * @param account Address of approver + * @param spender Address of spender + * @return {"amount" : "Returns allowance of given account and spender"} + */ + function allowance(address account, address spender) public view returns (uint amount) { + return lib.getTokenAllowance(lib.getTokenSymbol(address(this)), account, spender); + } + + /** + * @notice Gets balance of account + * @param account Address for balance lookup + * @return {"balance" : "Returns balance amount"} + */ + function balanceOf(address account) public view returns (uint balance) { + return lib.getTokenBalance(lib.getTokenSymbol(address(this)), account); + } + + /** + * @notice transfers 'amount' from msg.sender to a receiving account 'to' + * @param to Receiving address + * @param amount Transfer amount + * @return {"success" : "Returns true if transfer succeeds"} + */ + function transfer(address to, uint amount) public notDeprecated returns (bool success) { + /// @notice send transfer through library + /// @dev !!! mutates storage state + require( + lib.forceTransfer(lib.getTokenSymbol(address(this)), msg.sender, to, amount, "0x0"), + "Error: Unable to transfer funds. Please check your parameters." + ); + + /// @dev Emit Log event + emit Transfer(msg.sender, to, amount); + return true; + } + + /** + * @notice spender transfers from approvers account to the reciving account + * @param from Approver's address + * @param to Receiving address + * @param amount Transfer amount + * @return {"success" : "Returns true if transferFrom succeeds"} + */ + function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) { + /// @notice sends transferFrom through library + /// @dev !!! mutates storage state + require( + lib.forceTransfer(lib.getTokenSymbol(address(this)), from, to, amount, "0x0"), + "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + ); + + /// @notice This transaction will fail if the msg.sender does not have an approved allowance. + require( + lib.updateAllowance(lib.getTokenSymbol(address(this)), from, amount), + "Error: Unable to update allowance for spender." + ); + + emit Transfer(from, to, amount); + return true; + } + + /** + * @notice approves spender a given amount + * @param spender Spender's address + * @param amount Allowance amount + * @return {"success" : "Returns true if approve succeeds"} + */ + function approve(address spender, uint amount) public notDeprecated returns (bool success) { + /// @notice sends approve through library + /// @dev !!! mtuates storage states + require( + lib.approveAllowance(spender, amount), + "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." + ); + return true; + } + + /** + * @notice gets currency status of contract + * @return {"deprecated" : "Returns true if deprecated, false otherwise"} + */ + function deprecateInterface() public onlyOwner returns (bool deprecated) { + require(lib.setDeprecatedContract(address(this)), + "Error: Unable to deprecate contract!"); + return true; + } + + modifier notDeprecated() { + /// @notice throws if contract is deprecated + require(!lib.isContractDeprecated(address(this)), + "Error: Contract has been deprecated, cannot perform operation!"); + _; + } + + } diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index bb76d8c..b31963e 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -771,6 +771,7 @@ library TokenIOLib { ); /// @dev Attempt to update the spender allowance + /// @notice this will throw if the allowance has not been set. require( updateAllowance(self, currency, from, amount), "Error: Unable to update allowance for spender." diff --git a/contracts/TokenIOStableSwap.sol b/contracts/TokenIOStableSwap.sol index 0858298..ffb360f 100644 --- a/contracts/TokenIOStableSwap.sol +++ b/contracts/TokenIOStableSwap.sol @@ -41,6 +41,7 @@ contract TokenIOStableSwap is Ownable { event StableSwap(address fromAsset, address toAsset, address requestedBy, uint amount, string currency); event TransferredHoldings(address asset, address to, uint amount); event AllowedERC20Asset(address asset, string currency); + event RemovedERC20Asset(address asset, string currency); /** * @notice Constructor method for TokenIOStableSwap contract @@ -62,23 +63,41 @@ contract TokenIOStableSwap is Ownable { * @notice This method may be deprecated or refactored to allow for multiple interfaces * @param asset Ethereum address of the ERC20 compliant smart contract to allow the swap * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) + * @param feeBps Basis points Swap Fee + * @param feeMin Minimum Swap Fees + * @param feeMax Maximum Swap Fee + * @param feeFlat Flat Swap Fee * @return { "success" : "Returns true if successfully called from another contract"} */ - function allowAsset(address asset, string currency) public onlyOwner notDeprecated returns (bool success) { + function allowAsset(address asset, string currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner notDeprecated returns (bool success) { bytes32 id = keccak256(abi.encodePacked('allowed.stable.asset', asset, currency)); require( lib.Storage.setBool(id, true), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); - /// @notice set TLA for the asset; - require(setAssetTLA(asset, currency)); + /// @notice set Currency for the asset; + require(setAssetCurrency(asset, currency), 'Error: Unable to set Currency for asset'); + + /// @notice set the Fee Params for the asset + require(setAssetFeeParams(asset, feeBps, feeMin, feeMax, feeFlat), 'Error: Unable to set fee params for asset'); /// @dev Log Allow ERC20 Asset emit AllowedERC20Asset(asset, currency); return true; } + function removeAsset(address asset) public onlyOwner notDeprecated returns (bool success) { + string memory currency = getAssetCurrency(asset); + bytes32 id = keccak256(abi.encodePacked('allowed.stable.asset', asset, currency)); + require( + lib.Storage.setBool(id, false), + "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." + ); + emit RemovedERC20Asset(asset, currency); + return true; + } + /** * @notice Return boolean if the asset is an allowed stable asset for the corresponding currency * @param asset Ethereum address of the ERC20 compliant smart contract to check allowed status of @@ -97,11 +116,11 @@ contract TokenIOStableSwap is Ownable { /** * Set the Three Letter Abbrevation for the currency associated to the asset * @param asset Ethereum address of the asset to set the currency for - * @param currency string TLA of the asset + * @param currency string Currency of the asset (NOTE: This is the currency for the asset) * @return { "success" : "Returns true if successfully called from another contract"} */ - function setAssetTLA(address asset, string currency) public onlyOwner returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('asset.tla', asset)); + function setAssetCurrency(address asset, string currency) public onlyOwner returns (bool success) { + bytes32 id = keccak256(abi.encodePacked('asset.currency', asset)); require( lib.Storage.setString(id, currency), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." @@ -110,12 +129,12 @@ contract TokenIOStableSwap is Ownable { } /** - * Get the TLA for an associated asset; + * Get the Currency for an associated asset; * @param asset Ethereum address of the asset to get the currency for - * @return {"tla": "Returns the TLA of the asset if the asset has been allowed."} + * @return {"currency": "Returns the Currency of the asset if the asset has been allowed."} */ - function getAssetTLA(address asset) public view returns (string tla) { - bytes32 id = keccak256(abi.encodePacked('asset.tla', asset)); + function getAssetCurrency(address asset) public view returns (string currency) { + bytes32 id = keccak256(abi.encodePacked('asset.currency', asset)); return lib.Storage.getString(id); } @@ -133,8 +152,8 @@ contract TokenIOStableSwap is Ownable { "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); - /// @notice set TLA for the asset; - require(setAssetTLA(asset, currency)); + /// @notice set Currency for the asset; + require(setAssetCurrency(asset, currency)); return true; } @@ -153,10 +172,10 @@ contract TokenIOStableSwap is Ownable { /** * @notice Set BPS, Min, Max, and Flat fee params for asset * @param asset Ethereum address of the asset to set fees for. - * @param feeBps Basis points transaction fee - * @param feeMin Minimum transaction fees - * @param feeMax Maximum transaction fee - * @param feeFlat Flat transaction fee + * @param feeBps Basis points Swap Fee + * @param feeMin Minimum Swap Fees + * @param feeMax Maximum Swap Fee + * @param feeFlat Flat Swap Fee * @return { "success" : "Returns true if successfully called from another contract"} */ function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner notDeprecated returns (bool success) { @@ -197,7 +216,7 @@ contract TokenIOStableSwap is Ownable { */ function convert(address fromAsset, address toAsset, uint amount) public notDeprecated returns (bool success) { /// @notice lookup currency from one of the assets, check if allowed by both assets. - string memory currency = getAssetTLA(fromAsset); + string memory currency = getAssetCurrency(fromAsset); uint fromDecimals = ERC20Interface(fromAsset).decimals(); uint toDecimals = ERC20Interface(toAsset).decimals(); @@ -228,11 +247,12 @@ contract TokenIOStableSwap is Ownable { } else if(isTokenXContract(fromAsset, currency)) { ///@dev Transfer the asset to the user; /// @notice Amount received from withdraw is net of fees. - uint netAmountTo = amount.sub(calcAssetFees(toAsset, amount)); + uint convertedAmount = (amount.mul(10**toDecimals)).div(10**fromDecimals); + uint fees = calcAssetFees(toAsset, convertedAmount); + uint netAmountTo = convertedAmount.sub(fees); /// @dev Ensure amount is converted for the correct decimal representation; - uint convertedAmountTo = (netAmountTo.mul(10**fromDecimals)).div(10**toDecimals); require( - ERC20Interface(toAsset).transfer(msg.sender, convertedAmountTo), + ERC20Interface(toAsset).transfer(msg.sender, netAmountTo), 'Unable to call the requested erc20 contract.' ); diff --git a/migrations/10_deploy_TokenIOStableSwap.js b/migrations/10_deploy_TokenIOUnlimited.js similarity index 53% rename from migrations/10_deploy_TokenIOStableSwap.js rename to migrations/10_deploy_TokenIOUnlimited.js index 2b387c6..f752fcb 100644 --- a/migrations/10_deploy_TokenIOStableSwap.js +++ b/migrations/10_deploy_TokenIOUnlimited.js @@ -1,25 +1,23 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") -const TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol") -const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") +const TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol") + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS +} = mode == 'production' ? production : development; const deployContracts = async (deployer, accounts) => { try { /* storage */ const storage = await TokenIOStorage.deployed() - /* fx */ - const swap = await deployer.deploy(TokenIOStableSwap, storage.address) - - await storage.allowOwnership(swap.address) - - // Allow USD asset - const usdx = await TokenIOERC20.deployed(); - const params = [ usdx.address, await usdx.tla() ] - await swap.setTokenXCurrency(...params); - - console.log('isAllowed', await swap.isAllowedAsset(...params)) + /* token */ + const token = await deployer.deploy(TokenIOERC20Unlimited, storage.address) + await storage.allowOwnership(token.address) + await token.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) return true } catch (err) { @@ -27,6 +25,7 @@ const deployContracts = async (deployer, accounts) => { } } + module.exports = (deployer, network, accounts) => { deployer.then(async () => { await deployContracts(deployer, accounts) diff --git a/migrations/11_deploy_TokenIOStableSwap.js b/migrations/11_deploy_TokenIOStableSwap.js new file mode 100644 index 0000000..9442d58 --- /dev/null +++ b/migrations/11_deploy_TokenIOStableSwap.js @@ -0,0 +1,50 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol") +const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") +const TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol") + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* fx */ + const swap = await deployer.deploy(TokenIOStableSwap, storage.address) + + await storage.allowOwnership(swap.address) + + // Allow USD asset + const usdx = await TokenIOERC20.deployed(); + const params1 = [ usdx.address, await usdx.tla() ] + await swap.setTokenXCurrency(...params1); + + // Allow other interfaces for USDx + const usdxUnlimited = await TokenIOERC20Unlimited.deployed(); + const params2 = [ usdxUnlimited.address, await usdxUnlimited.tla() ] + await swap.setTokenXCurrency(...params2); + + // Allow USDC + // NOTE: Fees must be in the decimal representation of the asset + const USDC = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; + const feeBps = 10; + const feeMin = 0; + const feeMax = 1e12; // $1 million max fee; (6 decimal representation) + const feeFlat = 0; + const params3 = [ USDC, "USD", feeBps, feeMin, feeMax, feeFlat ] + await swap.allowAsset(...params3); + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/test/TokenIOERC20Unlimited.js b/test/TokenIOERC20Unlimited.js new file mode 100644 index 0000000..00196e2 --- /dev/null +++ b/test/TokenIOERC20Unlimited.js @@ -0,0 +1,179 @@ +const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol") +const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") +const { mode, development, production } = require('../token.config.js') +const { utils } = require('ethers') + +const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode + == 'production' ? production : development //set stage + +contract("TokenIOERC20Unlimited", function(accounts) { + // pull in usdx params + const USDx = TOKEN_DETAILS['USDx'] + + // create test accounts + const TEST_ACCOUNT_1 = accounts[0] + const TEST_ACCOUNT_2 = accounts[1] + const TEST_ACCOUNT_3 = accounts[2] + + const DEPOSIT_AMOUNT = 10000e2 + const LIMIT_AMOUNT = (DEPOSIT_AMOUNT/2) + const TRANSFER_AMOUNT = (DEPOSIT_AMOUNT/4) + + /* PARAMETERS */ + + it(`TOKEN_PARAMS + :should correctly set parameters according to c 'token.config.js' + [name, symbol, tla, decimals]`, async () => { + const TOKEN_NAME = USDx.tokenName; + const TOKEN_SYMBOL = USDx.tokenSymbol + const TOKEN_TLA = USDx.tokenTLA + const TOKEN_VERSION = USDx.tokenVersion + const TOKEN_DECIMALS = USDx.tokenDecimals + + + const erc20 = await TokenIOERC20Unlimited.deployed() + const name = await erc20.name() + const symbol = await erc20.symbol() + const tla = await erc20.tla() + const version = await erc20.version() + const decimals = await erc20.decimals() + + assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") + assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") + assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") + assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") + assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") + }) + + /* GETTERS */ + + it(`BALANCE_OF + :should get balance of account1`, async () => { + const erc20 = await TokenIOERC20Unlimited.deployed() + await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + const balance = await erc20.balanceOf(TEST_ACCOUNT_1) + assert.equal(balance, 0) + }) + + it(`ALLOWANCE + :should return allowance of account2 on behalf of account 1`, async () => { + const erc20 = await TokenIOERC20Unlimited.deployed() + await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + const allowance = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(allowance, 0) + }) + + /* PUBLIC FUNCTIONS */ + + it(`TRANSFER + :should supply uints, debiting the sender and crediting the receiver`, async () => { + const storage = await TokenIOStorage.deployed() + const erc20 = await TokenIOERC20Unlimited.deployed() + const CA = await TokenIOCurrencyAuthority.deployed(); + + const kycReceipt1 = await CA.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt2= await CA.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt3= await CA.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") + + await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + await storage.allowOwnership(erc20.address) + const tokenSymbol = await erc20.symbol() + const depositReceipt = await CA.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + + const balance1 = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2 = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() + + assert.equal(balance1, DEPOSIT_AMOUNT) + assert.equal(balance2, 0) + + const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2b = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() + + // calc fees + // const TX_FEES = +(await erc20.calculateFees(TRANSFER_AMOUNT)).toString() + + // check spending limit remaining + // Spending limit should remain unchanged! + const SPENDING_LIMIT = +(await CA.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() + const SPENDING_REMAINING = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + + assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT), + "Remaining spending amount should remain equal to set limit amount") + + // calculate correct current balance + assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT)) + assert.equal(balance2b, TRANSFER_AMOUNT) + }) + + + it(`APPROVE + :should give allowance of remaining balance of account 1 to account 2 + allowances[account1][account2]: 0 --> 100`, async () => { + const storage = await TokenIOStorage.deployed() + const erc20 = await TokenIOERC20Unlimited.deployed() + const CA = await TokenIOCurrencyAuthority.deployed(); + + const balance1a = +(await erc20.balanceOf(TEST_ACCOUNT_1)) + const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_2)) + + const approveReceipt = await erc20.approve(TEST_ACCOUNT_2, balance1a) + const allowance = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + + assert.notEqual(allowance, 0, "Allowance should not equal zero.") + assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") + }) + + it(`TRANSFER_FROM + :account 2 should spend funds transfering from account1 to account 3 on behalf of account1`, async () => { + const storage = await TokenIOStorage.deployed() + const erc20 = await TokenIOERC20Unlimited.deployed() + const CA = await TokenIOCurrencyAuthority.deployed(); + + + const TEST_ACT_1_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACT_2_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() + const TEST_ACT_3_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() + + assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") + assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") + + const BEG_ALLOWANCE = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) + + const TRANSFER_FROM_AMOUNT = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + const transferFromReceipt = await erc20.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) + + // const TX_FEES = +(await erc20.calculateFees(TRANSFER_FROM_AMOUNT)).toString() + const TEST_ACT_1_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)) + assert.equal(TEST_ACT_1_END_BALANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT), "Ending balance should be net of transfer amount and fees") + + const TEST_ACT_3_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(TEST_ACT_3_END_BALANCE, TRANSFER_FROM_AMOUNT, "TEST_ACCOUNT_3 Balance should equal transfer amount"); + + const END_ALLOWANCE = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + assert.equal(END_ALLOWANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT), "Allowance should be reduced by amount transferred") + + }) + + it("Should attempt to transfer more than the daily limit for the account and fail", async () => { + const erc20 = await TokenIOERC20Unlimited.deployed() + const CA = await TokenIOCurrencyAuthority.deployed(); + + const SPENDING_REMAINING = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + assert.equal(LIMIT_AMOUNT, SPENDING_REMAINING, "Expect daily spending limit to be bypassed.") + + try { + const TRANSFER_AMOUNT = 100e2 + const TRANSFER_TX = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + } catch (error) { + assert.equal(error.message.match(RegExp('revert')).length, 1, "Expect transaction to revert due to excessive spending limit"); + } + }) + + +}) diff --git a/test/TokenIOStableSwap.js b/test/TokenIOStableSwap.js index 2f3422d..ce0e5e9 100644 --- a/test/TokenIOStableSwap.js +++ b/test/TokenIOStableSwap.js @@ -1,7 +1,7 @@ var { Wallet, utils, SigningKey } = require('ethers'); var Promise = require('bluebird') -var TokenIOERC20 = artifacts.require("./TokenIOERC20.sol"); +var TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol"); var TokenIOStorage = artifacts.require("./TokenIOStorage.sol"); var TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); var TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol"); @@ -19,7 +19,7 @@ const USDc = TOKEN_DETAILS['USDc'] contract("TokenIOStableSwap", function(accounts) { // Globals - const DEPOSIT_AMOUNT = 1000e6; + const DEPOSIT_AMOUNT = 100e6; const SWAP_AMOUNT = 100e6; const TEST_ACCOUNT_1 = accounts[1] @@ -35,17 +35,16 @@ contract("TokenIOStableSwap", function(accounts) { CA = await TokenIOCurrencyAuthority.deployed(); SWAP = await TokenIOStableSwap.deployed(); - USDX = await TokenIOERC20.deployed() + USDX = await TokenIOERC20Unlimited.deployed() - USDC = await TokenIOERC20.new(storage.address) + USDC = await TokenIOERC20Unlimited.new(storage.address) await storage.allowOwnership(USDC.address) await USDC.setParams(...Object.values(USDc).map((v) => { return v })) await SWAP.setTokenXCurrency(USDX.address, 'USD'); - await SWAP.allowAsset(USDC.address, 'USD'); // feeBps, feeMin, feeMax, feeFlat - await SWAP.setAssetFeeParams(USDC.address, 10, 0, 1e12, 5e6); + await SWAP.allowAsset(USDC.address, 'USD', 10, 0, 1e12, 0); }) it("Should Deposit USDc into TEST_ACCOUNT_1 account", async () => { @@ -66,12 +65,15 @@ contract("TokenIOStableSwap", function(accounts) { it("Should allow the swap between the requester and the contract", async () => { await SWAP.convert(USDC.address, USDX.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) - const FEES = +(await USDC.calculateFees(SWAP_AMOUNT)) // NOTE: These fees only apply in testing due to Token X ERC20 dummy asset + // const FEES = +(await USDC.calculateFees(SWAP_AMOUNT)) // NOTE: These fees only apply in testing due to Token X ERC20 dummy asset const SWAP_FEES = +(await SWAP.calcAssetFees(USDC.address, SWAP_AMOUNT)); const NET_AMOUNT = (SWAP_AMOUNT-SWAP_FEES); const CONVERTED_AMOUNT = (NET_AMOUNT * (10 ** 2)) / (10 ** 6) const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDC.balanceOf(TEST_ACCOUNT_1)).toString() - assert.equal(TEST_ACCOUNT_1_USDC_BALANCE, (DEPOSIT_AMOUNT-SWAP_AMOUNT-FEES), "Requester balance should be reduced by swap amount") + assert.equal(TEST_ACCOUNT_1_USDC_BALANCE, (DEPOSIT_AMOUNT-SWAP_AMOUNT), "Requester balance should be reduced by swap amount") + + const SWAP_CONTRACT_USDC_BALANCE = +(await USDC.balanceOf(SWAP.address)).toString() + assert.equal(SWAP_CONTRACT_USDC_BALANCE, (SWAP_AMOUNT), "Swap Balance of USDC should be equal to the swamp amount.") const TEST_ACCOUNT_1_USDX_BALANCE = +(await USDX.balanceOf(TEST_ACCOUNT_1)).toString() assert.equal(TEST_ACCOUNT_1_USDX_BALANCE, CONVERTED_AMOUNT, "Requester balance should equal requester deposit amount for USDX contract") @@ -79,4 +81,27 @@ contract("TokenIOStableSwap", function(accounts) { }) + it("Should allow the swap between the requester and the contract in reverse", async () => { + const SWAP_AMOUNT_2 = +(await USDX.balanceOf(TEST_ACCOUNT_1)); + + await SWAP.convert(USDX.address, USDC.address, SWAP_AMOUNT_2, { from: TEST_ACCOUNT_1 }) + const CONVERTED_AMOUNT = (SWAP_AMOUNT_2 / (10 ** 2)) * (10 ** 6) + const SWAP_FEES = +(await SWAP.calcAssetFees(USDC.address, CONVERTED_AMOUNT)); + + const TEST_ACCOUNT_1_USDX_BALANCE = +(await USDX.balanceOf(TEST_ACCOUNT_1)).toString() + assert.equal(TEST_ACCOUNT_1_USDX_BALANCE, 0, "Requester balance should be reduced by swap amount") + + const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDC.balanceOf(TEST_ACCOUNT_1)).toString() + assert.equal(TEST_ACCOUNT_1_USDC_BALANCE, CONVERTED_AMOUNT-SWAP_FEES, "Requester balance should equal requester deposit amount for USDC contract") + + const SWAP_CONTRACT_USDC_BALANCE = +(await USDC.balanceOf(SWAP.address)).toString() + + assert.equal(SWAP_CONTRACT_USDC_BALANCE, ( + +(await SWAP.calcAssetFees(USDC.address, SWAP_AMOUNT)) + + +(await SWAP.calcAssetFees(USDC.address, CONVERTED_AMOUNT)) + ), "Swap Balance of USDC should be equal to the swamp amount.") + + + }) + }); From d1abd47e9bfe2bb45110ebab3bcfe34ee9623b1d Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Thu, 8 Nov 2018 14:07:25 -0800 Subject: [PATCH 08/40] Added an ERC20 contract that includes fees; Gas costs for transfers are ~130K gas --- contracts/TokenIOERC20FeesApply.sol | 286 +++++++++++++++++++++++ migrations/12_deploy_TokenIOFeesApply.js | 35 +++ test/TokenIOERC20FeesApply.js | 164 +++++++++++++ test/TokenIOERC20Unlimited.js | 16 -- 4 files changed, 485 insertions(+), 16 deletions(-) create mode 100644 contracts/TokenIOERC20FeesApply.sol create mode 100644 migrations/12_deploy_TokenIOFeesApply.js create mode 100644 test/TokenIOERC20FeesApply.js diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol new file mode 100644 index 0000000..302cc0a --- /dev/null +++ b/contracts/TokenIOERC20FeesApply.sol @@ -0,0 +1,286 @@ +pragma solidity 0.4.24; + +import "./Ownable.sol"; +import "./TokenIOStorage.sol"; +import "./TokenIOLib.sol"; +import "./SafeMath.sol"; + + +/* +COPYRIGHT 2018 Token, Inc. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +@title ERC20 Compliant Smart Contract for Token, Inc. + +@author Ryan Tate , Sean Pollock + +@notice Contract uses generalized storage contract, `TokenIOStorage`, for +upgradeability of interface contract. + +@dev In the event that the main contract becomes deprecated, the upgraded contract +will be set as the owner of this contract, and use this contract's storage to +maintain data consistency between contract. +*/ + + + +contract TokenIOERC20FeesApply is Ownable { + + using SafeMath for uint; + + //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage + using TokenIOLib for TokenIOLib.Data; + TokenIOLib.Data lib; + + event Transfer(address indexed from, address indexed to, uint256 amount); + + /** + * @notice Constructor method for ERC20 contract + * @param _storageContract address of TokenIOStorage contract + */ + constructor(address _storageContract) public { + //// @dev Set the storage contract for the interface + //// @dev This contract will be unable to use the storage constract until + //// @dev contract address is authorized with the storage contract + //// @dev Once authorized, Use the `setParams` method to set storage values + lib.Storage = TokenIOStorage(_storageContract); + + //// @dev set owner to contract initiator + owner[msg.sender] = true; + } + + + /** + @notice Sets erc20 globals and fee paramters + @param _name Full token name 'USD by token.io' + @param _symbol Symbol name 'USDx' + @param _tla Three letter abbreviation 'USD' + @param _version Release version 'v0.0.1' + @param _decimals Decimal precision + @param _feeContract Address of fee contract + @return { "success" : "Returns true if successfully called from another contract"} + */ + function setParams( + string _name, + string _symbol, + string _tla, + string _version, + uint _decimals, + address _feeContract, + uint _fxUSDBPSRate + ) onlyOwner public returns (bool success) { + require(lib.setTokenName(_name), + "Error: Unable to set token name. Please check arguments."); + require(lib.setTokenSymbol(_symbol), + "Error: Unable to set token symbol. Please check arguments."); + require(lib.setTokenTLA(_tla), + "Error: Unable to set token TLA. Please check arguments."); + require(lib.setTokenVersion(_version), + "Error: Unable to set token version. Please check arguments."); + require(lib.setTokenDecimals(_symbol, _decimals), + "Error: Unable to set token decimals. Please check arguments."); + require(lib.setFeeContract(_feeContract), + "Error: Unable to set fee contract. Please check arguments."); + require(lib.setFxUSDBPSRate(_symbol, _fxUSDBPSRate), + "Error: Unable to set fx USD basis points rate. Please check arguments."); + return true; + } + + /** + * @notice Gets name of token + * @return {"_name" : "Returns name of token"} + */ + function name() public view returns (string _name) { + return lib.getTokenName(address(this)); + } + + /** + * @notice Gets symbol of token + * @return {"_symbol" : "Returns symbol of token"} + */ + function symbol() public view returns (string _symbol) { + return lib.getTokenSymbol(address(this)); + } + + /** + * @notice Gets three-letter-abbreviation of token + * @return {"_tla" : "Returns three-letter-abbreviation of token"} + */ + function tla() public view returns (string _tla) { + return lib.getTokenTLA(address(this)); + } + + /** + * @notice Gets version of token + * @return {"_version" : "Returns version of token"} + */ + function version() public view returns (string _version) { + return lib.getTokenVersion(address(this)); + } + + /** + * @notice Gets decimals of token + * @return {"_decimals" : "Returns number of decimals"} + */ + function decimals() public view returns (uint _decimals) { + return lib.getTokenDecimals(lib.getTokenSymbol(address(this))); + } + + /** + * @notice Gets total supply of token + * @return {"supply" : "Returns current total supply of token"} + */ + function totalSupply() public view returns (uint supply) { + return lib.getTokenSupply(lib.getTokenSymbol(address(this))); + } + + /** + * @notice Gets allowance that spender has with approver + * @param account Address of approver + * @param spender Address of spender + * @return {"amount" : "Returns allowance of given account and spender"} + */ + function allowance(address account, address spender) public view returns (uint amount) { + return lib.getTokenAllowance(lib.getTokenSymbol(address(this)), account, spender); + } + + /** + * @notice Gets balance of account + * @param account Address for balance lookup + * @return {"balance" : "Returns balance amount"} + */ + function balanceOf(address account) public view returns (uint balance) { + return lib.getTokenBalance(lib.getTokenSymbol(address(this)), account); + } + + /** + * @notice Gets fee parameters + * @return { + "bps":"Fee amount as a mesuare of basis points", + "min":"Minimum fee amount", + "max":"Maximum fee amount", + "flat":"Flat fee amount", + "contract":"Address of fee contract" + } + */ + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { + address feeContract = lib.getFeeContract(address(this)); + return ( + lib.getFeeBPS(feeContract), + lib.getFeeMin(feeContract), + lib.getFeeMax(feeContract), + lib.getFeeFlat(feeContract), + lib.getFeeMsg(feeContract), + feeContract + ); + } + + /** + * @notice Calculates fee of a given transfer amount + * @param amount Amount to calculcate fee value + * @return {"fees": "Returns the calculated transaction fees based on the fee contract parameters"} + */ + function calculateFees(uint amount) public view returns (uint fees) { + return lib.calculateFees(lib.getFeeContract(address(this)), amount); + } + + /** + * @notice transfers 'amount' from msg.sender to a receiving account 'to' + * @param to Receiving address + * @param amount Transfer amount + * @return {"success" : "Returns true if transfer succeeds"} + */ + function transfer(address to, uint amount) public notDeprecated returns (bool success) { + address feeContract = lib.getFeeContract(address(this)); + string memory currency = lib.getTokenSymbol(address(this)); + + /// @notice send transfer through library + /// @dev !!! mutates storage state + require( + lib.forceTransfer(currency, msg.sender, to, amount, "0x0"), + "Error: Unable to transfer funds to account."); + + // @dev transfer fees to fee contract + require( + lib.forceTransfer(currency, msg.sender, feeContract, calculateFees(amount), lib.getFeeMsg(feeContract)), + "Error: Unable to transfer fees to fee contract."); + + emit Transfer(msg.sender, to, amount); + + return true; + } + + /** + * @notice spender transfers from approvers account to the reciving account + * @param from Approver's address + * @param to Receiving address + * @param amount Transfer amount + * @return {"success" : "Returns true if transferFrom succeeds"} + */ + function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) { + address feeContract = lib.getFeeContract(address(this)); + string memory currency = lib.getTokenSymbol(address(this)); + uint fees = calculateFees(amount); + + /// @notice sends transferFrom through library + /// @dev !!! mutates storage state + require( + lib.forceTransfer(currency, from, to, amount, "0x0"), + "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + ); + + require( + lib.forceTransfer(currency, from, feeContract, fees, lib.getFeeMsg(feeContract)), + "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + ); + + /// @notice This transaction will fail if the msg.sender does not have an approved allowance. + require( + lib.updateAllowance(lib.getTokenSymbol(address(this)), from, amount.add(fees)), + "Error: Unable to update allowance for spender." + ); + + emit Transfer(from, to, amount); + return true; + } + + /** + * @notice approves spender a given amount + * @param spender Spender's address + * @param amount Allowance amount + * @return {"success" : "Returns true if approve succeeds"} + */ + function approve(address spender, uint amount) public notDeprecated returns (bool success) { + /// @notice sends approve through library + /// @dev !!! mtuates storage states + require( + lib.approveAllowance(spender, amount), + "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." + ); + return true; + } + + /** + * @notice gets currency status of contract + * @return {"deprecated" : "Returns true if deprecated, false otherwise"} + */ + function deprecateInterface() public onlyOwner returns (bool deprecated) { + require(lib.setDeprecatedContract(address(this)), + "Error: Unable to deprecate contract!"); + return true; + } + + modifier notDeprecated() { + /// @notice throws if contract is deprecated + require(!lib.isContractDeprecated(address(this)), + "Error: Contract has been deprecated, cannot perform operation!"); + _; + } + + } diff --git a/migrations/12_deploy_TokenIOFeesApply.js b/migrations/12_deploy_TokenIOFeesApply.js new file mode 100644 index 0000000..39cd628 --- /dev/null +++ b/migrations/12_deploy_TokenIOFeesApply.js @@ -0,0 +1,35 @@ +const { delay } = require('bluebird') + +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOERC20FeesApply = artifacts.require("./TokenIOERC20FeesApply.sol") + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS +} = mode == 'production' ? production : development; + +const deployContracts = async (deployer, accounts) => { + try { + /* storage */ + const storage = await TokenIOStorage.deployed() + + /* token */ + const token = await deployer.deploy(TokenIOERC20FeesApply, storage.address) + await storage.allowOwnership(token.address) + await token.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + return true + } catch (err) { + console.log('### error deploying contracts', err) + } +} + + +module.exports = (deployer, network, accounts) => { + deployer.then(async () => { + await deployContracts(deployer, accounts) + console.log('### finished deploying contracts') + }) + .catch(err => console.log('### error deploying contracts', err)) +} diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js new file mode 100644 index 0000000..efb3ca1 --- /dev/null +++ b/test/TokenIOERC20FeesApply.js @@ -0,0 +1,164 @@ +const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOERC20FeesApply = artifacts.require("./TokenIOERC20FeesApply.sol") +const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") +const { mode, development, production } = require('../token.config.js') +const { utils } = require('ethers') + +const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode + == 'production' ? production : development //set stage + +contract("TokenIOERC20FeesApply", function(accounts) { + // pull in usdx params + const USDx = TOKEN_DETAILS['USDx'] + + // create test accounts + const TEST_ACCOUNT_1 = accounts[0] + const TEST_ACCOUNT_2 = accounts[1] + const TEST_ACCOUNT_3 = accounts[2] + + const DEPOSIT_AMOUNT = 10000e2 + const LIMIT_AMOUNT = (DEPOSIT_AMOUNT/2) + const TRANSFER_AMOUNT = (DEPOSIT_AMOUNT/4) + + /* PARAMETERS */ + + it(`TOKEN_PARAMS + :should correctly set parameters according to c 'token.config.js' + [name, symbol, tla, decimals]`, async () => { + const TOKEN_NAME = USDx.tokenName; + const TOKEN_SYMBOL = USDx.tokenSymbol + const TOKEN_TLA = USDx.tokenTLA + const TOKEN_VERSION = USDx.tokenVersion + const TOKEN_DECIMALS = USDx.tokenDecimals + + + const erc20 = await TokenIOERC20FeesApply.deployed() + const name = await erc20.name() + const symbol = await erc20.symbol() + const tla = await erc20.tla() + const version = await erc20.version() + const decimals = await erc20.decimals() + + assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") + assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") + assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") + assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") + assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") + }) + + /* GETTERS */ + + it(`BALANCE_OF + :should get balance of account1`, async () => { + const erc20 = await TokenIOERC20FeesApply.deployed() + await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + const balance = await erc20.balanceOf(TEST_ACCOUNT_1) + assert.equal(balance, 0) + }) + + it(`ALLOWANCE + :should return allowance of account2 on behalf of account 1`, async () => { + const erc20 = await TokenIOERC20FeesApply.deployed() + await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + const allowance = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(allowance, 0) + }) + + /* PUBLIC FUNCTIONS */ + + it(`TRANSFER + :should supply uints, debiting the sender and crediting the receiver`, async () => { + const storage = await TokenIOStorage.deployed() + const erc20 = await TokenIOERC20FeesApply.deployed() + const CA = await TokenIOCurrencyAuthority.deployed(); + + const kycReceipt1 = await CA.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt2= await CA.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt3= await CA.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") + + await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + await storage.allowOwnership(erc20.address) + const tokenSymbol = await erc20.symbol() + const depositReceipt = await CA.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + + const balance1 = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2 = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() + + assert.equal(balance1, DEPOSIT_AMOUNT) + assert.equal(balance2, 0) + + const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2b = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() + + // calc fees + const TX_FEES = +(await erc20.calculateFees(TRANSFER_AMOUNT)).toString() + + // check spending limit remaining + // Spending limit should remain unchanged! + const SPENDING_LIMIT = +(await CA.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() + const SPENDING_REMAINING = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + + assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT), + "Remaining spending amount should remain equal to set limit amount") + + // calculate correct current balance + assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT-TX_FEES)) + assert.equal(balance2b, TRANSFER_AMOUNT) + }) + + + it(`APPROVE + :should give allowance of remaining balance of account 1 to account 2 + allowances[account1][account2]: 0 --> 100`, async () => { + const storage = await TokenIOStorage.deployed() + const erc20 = await TokenIOERC20FeesApply.deployed() + const CA = await TokenIOCurrencyAuthority.deployed(); + + const balance1a = +(await erc20.balanceOf(TEST_ACCOUNT_1)) + const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_2)) + + const approveReceipt = await erc20.approve(TEST_ACCOUNT_2, balance1a) + const allowance = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + + assert.notEqual(allowance, 0, "Allowance should not equal zero.") + assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") + }) + + it(`TRANSFER_FROM + :account 2 should spend funds transfering from account1 to account 3 on behalf of account1`, async () => { + const storage = await TokenIOStorage.deployed() + const erc20 = await TokenIOERC20FeesApply.deployed() + const CA = await TokenIOCurrencyAuthority.deployed(); + + + const TEST_ACT_1_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACT_2_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() + const TEST_ACT_3_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() + + assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") + assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") + + const BEG_ALLOWANCE = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) + + const TRANSFER_FROM_AMOUNT = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + const transferFromReceipt = await erc20.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) + + const TX_FEES = +(await erc20.calculateFees(TRANSFER_FROM_AMOUNT)).toString() + const TEST_ACT_1_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)) + assert.equal(TEST_ACT_1_END_BALANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT-TX_FEES), "Ending balance should be net of transfer amount and fees") + + const TEST_ACT_3_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(TEST_ACT_3_END_BALANCE, TRANSFER_FROM_AMOUNT, "TEST_ACCOUNT_3 Balance should equal transfer amount"); + + const END_ALLOWANCE = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + assert.equal(END_ALLOWANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT-TX_FEES), "Allowance should be reduced by amount transferred") + + }) + + +}) diff --git a/test/TokenIOERC20Unlimited.js b/test/TokenIOERC20Unlimited.js index 00196e2..09659e4 100644 --- a/test/TokenIOERC20Unlimited.js +++ b/test/TokenIOERC20Unlimited.js @@ -160,20 +160,4 @@ contract("TokenIOERC20Unlimited", function(accounts) { }) - it("Should attempt to transfer more than the daily limit for the account and fail", async () => { - const erc20 = await TokenIOERC20Unlimited.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - const SPENDING_REMAINING = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - assert.equal(LIMIT_AMOUNT, SPENDING_REMAINING, "Expect daily spending limit to be bypassed.") - - try { - const TRANSFER_AMOUNT = 100e2 - const TRANSFER_TX = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) - } catch (error) { - assert.equal(error.message.match(RegExp('revert')).length, 1, "Expect transaction to revert due to excessive spending limit"); - } - }) - - }) From e5784e2e923d06e2be483e72c1c38739c8280e3d Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Thu, 15 Nov 2018 13:12:16 -0800 Subject: [PATCH 09/40] Bypass forceTransfer() method in library and directly update storage contract --- contracts/TokenIOERC20FeesApply.sol | 42 ++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 302cc0a..83e1815 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -199,17 +199,26 @@ contract TokenIOERC20FeesApply is Ownable { function transfer(address to, uint amount) public notDeprecated returns (bool success) { address feeContract = lib.getFeeContract(address(this)); string memory currency = lib.getTokenSymbol(address(this)); + uint fees = calculateFees(amount); + + bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(msg.sender))); + bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(to))); + bytes32 id_c = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(feeContract))); - /// @notice send transfer through library - /// @dev !!! mutates storage state require( - lib.forceTransfer(currency, msg.sender, to, amount, "0x0"), - "Error: Unable to transfer funds to account."); + lib.Storage.setUint(id_a, lib.Storage.getUint(id_a).sub(amount.add(fees))), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); - // @dev transfer fees to fee contract require( - lib.forceTransfer(currency, msg.sender, feeContract, calculateFees(amount), lib.getFeeMsg(feeContract)), - "Error: Unable to transfer fees to fee contract."); + lib.Storage.setUint(id_b, lib.Storage.getUint(id_b).add(amount)), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); + + require( + lib.Storage.setUint(id_c, lib.Storage.getUint(id_c).add(fees)), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); emit Transfer(msg.sender, to, amount); @@ -228,16 +237,23 @@ contract TokenIOERC20FeesApply is Ownable { string memory currency = lib.getTokenSymbol(address(this)); uint fees = calculateFees(amount); - /// @notice sends transferFrom through library - /// @dev !!! mutates storage state + bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(from))); + bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(to))); + bytes32 id_c = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(feeContract))); + + require( + lib.Storage.setUint(id_a, lib.Storage.getUint(id_a).sub(amount.add(fees))), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); + require( - lib.forceTransfer(currency, from, to, amount, "0x0"), - "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + lib.Storage.setUint(id_b, lib.Storage.getUint(id_b).add(amount)), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); require( - lib.forceTransfer(currency, from, feeContract, fees, lib.getFeeMsg(feeContract)), - "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." + lib.Storage.setUint(id_c, lib.Storage.getUint(id_c).add(fees)), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); /// @notice This transaction will fail if the msg.sender does not have an approved allowance. From 1d5b3cc611db61f0f0e796b931eb6021b9a583a4 Mon Sep 17 00:00:00 2001 From: Volodymyr Kostanda Date: Tue, 18 Dec 2018 04:19:16 +0200 Subject: [PATCH 10/40] configs update --- package-lock.json | 114 +++++++++++++++++++++++++++++++++++++--------- package.json | 3 +- truffle.js | 10 ++-- 3 files changed, 100 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 02ecdf4..85493e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tokeninc-smart-contracts", - "version": "0.1.0", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1016,8 +1016,7 @@ "crypto-js": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", - "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=", - "dev": true + "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=" }, "dashdash": { "version": "1.14.1", @@ -1031,7 +1030,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -1098,9 +1096,9 @@ "dev": true }, "dotenv": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.0.0.tgz", - "integrity": "sha512-FlWbnhgjtwD+uNLUGHbMykMOYQaTivdHEmYwAKFjn6GKe/CqY0fNae93ZHTd20snh9ZLr8mTzIL9m0APQ1pjQg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", "dev": true }, "drbg.js": { @@ -1266,17 +1264,8 @@ "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "requires": { + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799", "ethereumjs-util": "^5.1.1" - }, - "dependencies": { - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", - "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", - "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^5.0.0" - } - } } }, "eth-tx-summary": { @@ -1379,6 +1368,14 @@ "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" }, + "ethereumjs-abi": { + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799", + "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "requires": { + "bn.js": "^4.10.0", + "ethereumjs-util": "^5.0.0" + } + }, "ethereumjs-account": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", @@ -3179,6 +3176,83 @@ "solc": "0.4.24" } }, + "truffle-blockchain-utils": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.5.tgz", + "integrity": "sha1-pOXAZNrdafeCoTfz0nbSEJXaekc=" + }, + "truffle-contract": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/truffle-contract/-/truffle-contract-3.0.6.tgz", + "integrity": "sha1-Lvb8Mtf6r6n0rtjlAAGp/eo0IZI=", + "requires": { + "ethjs-abi": "0.1.8", + "truffle-blockchain-utils": "^0.0.5", + "truffle-contract-schema": "^2.0.1", + "truffle-error": "^0.0.3", + "web3": "0.20.6" + }, + "dependencies": { + "bignumber.js": { + "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git" + }, + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + }, + "ethjs-abi": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.1.8.tgz", + "integrity": "sha1-zSiFg+1ijN+tr4re+juh28vKbBg=", + "requires": { + "bn.js": "4.11.6", + "js-sha3": "0.5.5", + "number-to-bn": "1.7.0" + } + }, + "js-sha3": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", + "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=" + }, + "web3": { + "version": "0.20.6", + "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz", + "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", + "requires": { + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "crypto-js": "^3.1.4", + "utf8": "^2.1.1", + "xhr2": "*", + "xmlhttprequest": "*" + } + } + } + }, + "truffle-contract-schema": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/truffle-contract-schema/-/truffle-contract-schema-2.0.1.tgz", + "integrity": "sha1-m/gh0y4m5nS6FetdQPlrELHJ1Wg=", + "requires": { + "ajv": "^5.1.1", + "crypto-js": "^3.1.9-1", + "debug": "^3.1.0" + }, + "dependencies": { + "crypto-js": { + "version": "3.1.9-1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", + "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" + } + } + }, + "truffle-error": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/truffle-error/-/truffle-error-0.0.3.tgz", + "integrity": "sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o=" + }, "truffle-hdwallet-provider": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/truffle-hdwallet-provider/-/truffle-hdwallet-provider-0.0.5.tgz", @@ -3219,8 +3293,7 @@ "utf8": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", - "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=", - "dev": true + "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=" }, "util-deprecate": { "version": "1.0.2", @@ -3344,8 +3417,7 @@ "xhr2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", - "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=", - "dev": true + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" }, "xmlhttprequest": { "version": "1.8.0", diff --git a/package.json b/package.json index d022aaa..2f11012 100644 --- a/package.json +++ b/package.json @@ -38,11 +38,12 @@ "bluebird": "^3.5.1", "ethereumjs-util": "^5.1.5", "ethers": "^3.0.15", + "truffle-contract": "^3.0.6", "web3-provider-engine": "^14.0.6", "zeppelin-solidity": "1.8.0" }, "devDependencies": { - "dotenv": "^6.0.0", + "dotenv": "^6.2.0", "solc": "^0.4.24", "solmd": "^0.3.0", "truffle": "^4.1.12", diff --git a/truffle.js b/truffle.js index 52bee9e..af369d4 100644 --- a/truffle.js +++ b/truffle.js @@ -6,10 +6,10 @@ const NonceTrackerSubprovider = require("web3-provider-engine/subproviders/nonce module.exports = { networks: { develop: { - host: "0.0.0.0", - port: 9545, - network_id: "*", // Match any network id - gas: 7e6 + host: "127.0.0.1", + port: 7545, + network_id: "5777", // Match any network id + gas: 6000000 }, poa: { host: "104.236.47.153", @@ -26,7 +26,7 @@ module.exports = { return wallet; }, network_id: 3, - gas: 47e5 + gas: 8000000 }, mainnet: { provider: () => { From 8516810c402a92b1fba19281d8192ca798a464e7 Mon Sep 17 00:00:00 2001 From: Volodymyr Kostanda Date: Tue, 18 Dec 2018 04:22:05 +0200 Subject: [PATCH 11/40] Storage improvement by making it more specific --- contracts/TokenIOERC20FeesApply.sol | 71 ++++++------- contracts/TokenIOLib.sol | 154 ++++------------------------ contracts/TokenIOStorage.sol | 88 ++++++++++++---- 3 files changed, 122 insertions(+), 191 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 83e1815..fa454c7 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -170,15 +170,9 @@ contract TokenIOERC20FeesApply is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { - address feeContract = lib.getFeeContract(address(this)); - return ( - lib.getFeeBPS(feeContract), - lib.getFeeMin(feeContract), - lib.getFeeMax(feeContract), - lib.getFeeFlat(feeContract), - lib.getFeeMsg(feeContract), - feeContract - ); + feeAccount = lib.getFeeContract(address(this)); + (max, min, bps, flat) = lib.getFees(feeAccount); + feeMsg = lib.getFeeMsg(feeAccount); } /** @@ -186,8 +180,12 @@ contract TokenIOERC20FeesApply is Ownable { * @param amount Amount to calculcate fee value * @return {"fees": "Returns the calculated transaction fees based on the fee contract parameters"} */ - function calculateFees(uint amount) public view returns (uint fees) { - return lib.calculateFees(lib.getFeeContract(address(this)), amount); + function calculateFees(uint amount) external view returns (uint fees) { + return calculateFees(lib.getFeeContract(address(this)), amount); + } + + function calculateFees(address feeContract, uint amount) internal view returns (uint fees) { + return lib.calculateFees(feeContract, amount); } /** @@ -197,32 +195,29 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"success" : "Returns true if transfer succeeds"} */ function transfer(address to, uint amount) public notDeprecated returns (bool success) { - address feeContract = lib.getFeeContract(address(this)); - string memory currency = lib.getTokenSymbol(address(this)); - uint fees = calculateFees(amount); - - bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(msg.sender))); - bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(to))); - bytes32 id_c = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(feeContract))); - - require( - lib.Storage.setUint(id_a, lib.Storage.getUint(id_a).sub(amount.add(fees))), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); - - require( - lib.Storage.setUint(id_b, lib.Storage.getUint(id_b).add(amount)), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); - - require( - lib.Storage.setUint(id_c, lib.Storage.getUint(id_c).add(fees)), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); - - emit Transfer(msg.sender, to, amount); - - return true; + address feeContract = lib.getFeeContract(address(this)); + string memory currency = lib.getTokenSymbol(address(this)); + uint fees = calculateFees(feeContract, amount); + + bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(msg.sender))); + bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(to))); + bytes32 id_c = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(feeContract))); + + require( + lib.Storage.setUint(id_a, lib.Storage.getUint(id_a).sub(amount.add(fees))), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); + require( + lib.Storage.setUint(id_c, lib.Storage.getUint(id_c).add(fees)), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); + require( + lib.Storage.setUint(id_b, lib.Storage.getUint(id_b).add(amount)), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); + + emit Transfer(msg.sender, to, amount); + return true; } /** @@ -235,7 +230,7 @@ contract TokenIOERC20FeesApply is Ownable { function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) { address feeContract = lib.getFeeContract(address(this)); string memory currency = lib.getTokenSymbol(address(this)); - uint fees = calculateFees(amount); + uint fees = calculateFees(feeContract, amount); bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(from))); bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(to))); diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index b31963e..0040eae 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -73,9 +73,8 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setTokenSymbol(Data storage self, string tokenSymbol) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('token.symbol', address(this))); require( - self.Storage.setString(id, tokenSymbol), + self.Storage.setTokenSymbol(address(this), tokenSymbol), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -135,76 +134,8 @@ library TokenIOLib { return true; } - /** - * @notice Set basis point fee for contract interface - * @dev Transaction fees can be set by the TokenIOFeeContract - * @dev Fees vary by contract interface specified `feeContract` - * @dev | This method has an `internal` view - * @param self Internal storage proxying TokenIOStorage contract - * @param feeBPS Basis points fee for interface contract transactions - * @return {"success" : "Returns true when successfully called from another contract"} - */ - function setFeeBPS(Data storage self, uint feeBPS) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fee.bps', address(this))); - require( - self.Storage.setUint(id, feeBPS), - "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - ); - return true; - } - - /** - * @notice Set minimum fee for contract interface - * @dev Transaction fees can be set by the TokenIOFeeContract - * @dev Fees vary by contract interface specified `feeContract` - * @dev | This method has an `internal` view - * @param self Internal storage proxying TokenIOStorage contract - * @param feeMin Minimum fee for interface contract transactions - * @return {"success" : "Returns true when successfully called from another contract"} - */ - function setFeeMin(Data storage self, uint feeMin) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fee.min', address(this))); - require( - self.Storage.setUint(id, feeMin), - "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - ); - return true; - } - - /** - * @notice Set maximum fee for contract interface - * @dev Transaction fees can be set by the TokenIOFeeContract - * @dev Fees vary by contract interface specified `feeContract` - * @dev | This method has an `internal` view - * @param self Internal storage proxying TokenIOStorage contract - * @param feeMax Maximum fee for interface contract transactions - * @return {"success" : "Returns true when successfully called from another contract"} - */ - function setFeeMax(Data storage self, uint feeMax) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fee.max', address(this))); - require( - self.Storage.setUint(id, feeMax), - "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - ); - return true; - } - - /** - * @notice Set flat fee for contract interface - * @dev Transaction fees can be set by the TokenIOFeeContract - * @dev Fees vary by contract interface specified `feeContract` - * @dev | This method has an `internal` view - * @param self Internal storage proxying TokenIOStorage contract - * @param feeFlat Flat fee for interface contract transactions - * @return {"success" : "Returns true when successfully called from another contract"} - */ - function setFeeFlat(Data storage self, uint feeFlat) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fee.flat', address(this))); - require( - self.Storage.setUint(id, feeFlat), - "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - ); - return true; + function setFees(Data storage self, uint maxFee, uint minFee, uint bpsFee, uint flatFee) internal returns (bool success) { + return self.Storage.setFees(address(this), maxFee, minFee, bpsFee, flatFee); } /** @@ -236,9 +167,8 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setFeeContract(Data storage self, address feeContract) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fee.account', address(this))); require( - self.Storage.setAddress(id, feeContract), + self.Storage.setFeeContract(address(this), feeContract), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -407,8 +337,7 @@ library TokenIOLib { * @return {"tokenSymbol" : "Symbol of the token contract"} */ function getTokenSymbol(Data storage self, address contractAddress) internal view returns (string tokenSymbol) { - bytes32 id = keccak256(abi.encodePacked('token.symbol', contractAddress)); - return self.Storage.getString(id); + return self.Storage.getTokenSymbol(contractAddress); } /** @@ -450,52 +379,8 @@ library TokenIOLib { return self.Storage.getUint(id); } - /** - * @notice Get the basis points fee of the contract address; typically TokenIOFeeContract - * @dev | This method has an `internal` view - * @param self Internal storage proxying TokenIOStorage contract - * @param contractAddress Contract address of the queryable interface - * @return { "feeBps" : "Returns the basis points fees associated with the contract address"} - */ - function getFeeBPS(Data storage self, address contractAddress) internal view returns (uint feeBps) { - bytes32 id = keccak256(abi.encodePacked('fee.bps', contractAddress)); - return self.Storage.getUint(id); - } - - /** - * @notice Get the minimum fee of the contract address; typically TokenIOFeeContract - * @dev | This method has an `internal` view - * @param self Internal storage proxying TokenIOStorage contract - * @param contractAddress Contract address of the queryable interface - * @return { "feeMin" : "Returns the minimum fees associated with the contract address"} - */ - function getFeeMin(Data storage self, address contractAddress) internal view returns (uint feeMin) { - bytes32 id = keccak256(abi.encodePacked('fee.min', contractAddress)); - return self.Storage.getUint(id); - } - - /** - * @notice Get the maximum fee of the contract address; typically TokenIOFeeContract - * @dev | This method has an `internal` view - * @param self Internal storage proxying TokenIOStorage contract - * @param contractAddress Contract address of the queryable interface - * @return { "feeMax" : "Returns the maximum fees associated with the contract address"} - */ - function getFeeMax(Data storage self, address contractAddress) internal view returns (uint feeMax) { - bytes32 id = keccak256(abi.encodePacked('fee.max', contractAddress)); - return self.Storage.getUint(id); - } - - /** - * @notice Get the flat fee of the contract address; typically TokenIOFeeContract - * @dev | This method has an `internal` view - * @param self Internal storage proxying TokenIOStorage contract - * @param contractAddress Contract address of the queryable interface - * @return { "feeFlat" : "Returns the flat fees associated with the contract address"} - */ - function getFeeFlat(Data storage self, address contractAddress) internal view returns (uint feeFlat) { - bytes32 id = keccak256(abi.encodePacked('fee.flat', contractAddress)); - return self.Storage.getUint(id); + function getFees(Data storage self, address contractAddress) internal view returns (uint maxFee, uint minFee, uint bpsFee, uint flatFee) { + return self.Storage.getFees(contractAddress); } /** @@ -519,9 +404,8 @@ library TokenIOLib { * @return { "success" : "Returns true when successfully called from another contract"} */ function setMasterFeeContract(Data storage self, address contractAddress) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fee.contract.master')); require( - self.Storage.setAddress(id, contractAddress), + self.Storage.setFeeContract(0, contractAddress), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -534,8 +418,7 @@ library TokenIOLib { * @return { "masterFeeContract" : "Returns the master fee contract set for TSM."} */ function getMasterFeeContract(Data storage self) internal view returns (address masterFeeContract) { - bytes32 id = keccak256(abi.encodePacked('fee.contract.master')); - return self.Storage.getAddress(id); + return self.Storage.getFeeContract(0); } /** @@ -548,9 +431,8 @@ library TokenIOLib { * @return { "feeContract" : "Returns the fee contract associated with a contract interface"} */ function getFeeContract(Data storage self, address contractAddress) internal view returns (address feeContract) { - bytes32 id = keccak256(abi.encodePacked('fee.account', contractAddress)); - address feeAccount = self.Storage.getAddress(id); + address feeAccount = self.Storage.getFeeContract(contractAddress); if (feeAccount == 0x0) { return getMasterFeeContract(self); } else { @@ -637,10 +519,13 @@ library TokenIOLib { */ function calculateFees(Data storage self, address contractAddress, uint amount) internal view returns (uint calculatedFees) { - uint maxFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.max', contractAddress))); - uint minFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.min', contractAddress))); - uint bpsFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.bps', contractAddress))); - uint flatFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.flat', contractAddress))); + uint maxFee; + uint minFee; + uint bpsFee; + uint flatFee; + + (maxFee, minFee, bpsFee, flatFee) = self.Storage.getFees(contractAddress); + uint fees = ((amount.mul(bpsFee)).div(10000)).add(flatFee); if (fees > maxFee) { @@ -1156,8 +1041,9 @@ library TokenIOLib { * @return {"status" : "Return deprecation status (true/false) of the contract interface"} */ function isContractDeprecated(Data storage self, address contractAddress) internal view returns (bool status) { - bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress)); - return self.Storage.getBool(id); + //bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress)); + //return self.Storage.getBool(id); + return self.Storage.getDeprecated(contractAddress); } /** diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 26bcc42..36771cc 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -54,6 +54,19 @@ contract TokenIOStorage is Ownable { /// @dev only the derived contract can use the internal methods; /// @dev key == `keccak256(param1, param2...)` /// @dev Nested mapping can be achieved using multiple params in keccak256 hash; + + struct FeeData { + uint maxFee; + uint minFee; + uint bpsFee; + uint flatFee; + } + + mapping(address => bool) internal isDeprecated; + mapping(address => address) internal feeContracts; + mapping(address => string) internal tokenSymbol; + mapping(address => FeeData) internal fees; + mapping(bytes32 => uint256) internal uIntStorage; mapping(bytes32 => string) internal stringStorage; mapping(bytes32 => address) internal addressStorage; @@ -76,7 +89,7 @@ contract TokenIOStorage is Ownable { * @param _value The Address value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setAddress(bytes32 _key, address _value) public onlyOwner returns (bool success) { + function setAddress(bytes32 _key, address _value) external onlyOwner returns (bool success) { addressStorage[_key] = _value; return true; } @@ -87,7 +100,7 @@ contract TokenIOStorage is Ownable { * @param _value The Uint value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setUint(bytes32 _key, uint _value) public onlyOwner returns (bool success) { + function setUint(bytes32 _key, uint _value) external onlyOwner returns (bool success) { uIntStorage[_key] = _value; return true; } @@ -98,7 +111,7 @@ contract TokenIOStorage is Ownable { * @param _value The String value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setString(bytes32 _key, string _value) public onlyOwner returns (bool success) { + function setString(bytes32 _key, string _value) external onlyOwner returns (bool success) { stringStorage[_key] = _value; return true; } @@ -109,7 +122,7 @@ contract TokenIOStorage is Ownable { * @param _value The Bytes value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setBytes(bytes32 _key, bytes _value) public onlyOwner returns (bool success) { + function setBytes(bytes32 _key, bytes _value) external onlyOwner returns (bool success) { bytesStorage[_key] = _value; return true; } @@ -120,7 +133,7 @@ contract TokenIOStorage is Ownable { * @param _value The Bool value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setBool(bytes32 _key, bool _value) public onlyOwner returns (bool success) { + function setBool(bytes32 _key, bool _value) external onlyOwner returns (bool success) { boolStorage[_key] = _value; return true; } @@ -131,7 +144,7 @@ contract TokenIOStorage is Ownable { * @param _value The Int value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setInt(bytes32 _key, int _value) public onlyOwner returns (bool success) { + function setInt(bytes32 _key, int _value) external onlyOwner returns (bool success) { intStorage[_key] = _value; return true; } @@ -145,7 +158,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "success" : "Returns true when successfully called from another contract" } */ - function deleteAddress(bytes32 _key) public onlyOwner returns (bool success) { + function deleteAddress(bytes32 _key) external onlyOwner returns (bool success) { delete addressStorage[_key]; return true; } @@ -155,7 +168,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "success" : "Returns true when successfully called from another contract" } */ - function deleteUint(bytes32 _key) public onlyOwner returns (bool success) { + function deleteUint(bytes32 _key) external onlyOwner returns (bool success) { delete uIntStorage[_key]; return true; } @@ -165,7 +178,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "success" : "Returns true when successfully called from another contract" } */ - function deleteString(bytes32 _key) public onlyOwner returns (bool success) { + function deleteString(bytes32 _key) external onlyOwner returns (bool success) { delete stringStorage[_key]; return true; } @@ -175,7 +188,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "success" : "Returns true when successfully called from another contract" } */ - function deleteBytes(bytes32 _key) public onlyOwner returns (bool success) { + function deleteBytes(bytes32 _key) external onlyOwner returns (bool success) { delete bytesStorage[_key]; return true; } @@ -185,7 +198,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "success" : "Returns true when successfully called from another contract" } */ - function deleteBool(bytes32 _key) public onlyOwner returns (bool success) { + function deleteBool(bytes32 _key) external onlyOwner returns (bool success) { delete boolStorage[_key]; return true; } @@ -195,7 +208,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "success" : "Returns true when successfully called from another contract" } */ - function deleteInt(bytes32 _key) public onlyOwner returns (bool success) { + function deleteInt(bytes32 _key) external onlyOwner returns (bool success) { delete intStorage[_key]; return true; } @@ -207,7 +220,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the Address value associated with the id key" } */ - function getAddress(bytes32 _key) public view returns (address _value) { + function getAddress(bytes32 _key) external view returns (address _value) { return addressStorage[_key]; } @@ -216,7 +229,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the Uint value associated with the id key" } */ - function getUint(bytes32 _key) public view returns (uint _value) { + function getUint(bytes32 _key) external view returns (uint _value) { return uIntStorage[_key]; } @@ -225,7 +238,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the String value associated with the id key" } */ - function getString(bytes32 _key) public view returns (string _value) { + function getString(bytes32 _key) external view returns (string _value) { return stringStorage[_key]; } @@ -234,7 +247,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the Bytes value associated with the id key" } */ - function getBytes(bytes32 _key) public view returns (bytes _value) { + function getBytes(bytes32 _key) external view returns (bytes _value) { return bytesStorage[_key]; } @@ -243,7 +256,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the Bool value associated with the id key" } */ - function getBool(bytes32 _key) public view returns (bool _value) { + function getBool(bytes32 _key) external view returns (bool _value) { return boolStorage[_key]; } @@ -252,8 +265,45 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the Int value associated with the id key" } */ - function getInt(bytes32 _key) public view returns (int _value) { + function getInt(bytes32 _key) external view returns (int _value) { return intStorage[_key]; } -} + function getDeprecated(address _address) external view returns (bool _value) { + return isDeprecated[_address]; + } + + function setDeprecated(address _address, bool _value) external onlyOwner returns (bool success) { + isDeprecated[_address] = _value; + return true; + } + + function getFeeContract(address _address) external view returns (address _value) { + return feeContracts[_address]; + } + + function setFeeContract(address _address, address _value) external onlyOwner returns (bool success) { + feeContracts[_address] = _value; + return true; + } + + function getTokenSymbol(address _address) external view returns (string _value) { + return tokenSymbol[_address]; + } + + function setTokenSymbol(address _address, string _value) external onlyOwner returns (bool success) { + tokenSymbol[_address] = _value; + return true; + } + + function getFees(address _address) external view returns (uint maxFee, uint minFee, uint bpsFee, uint flatFee) { + FeeData memory feeData = fees[_address]; + return (feeData.maxFee, feeData.minFee, feeData.bpsFee, feeData.flatFee); + } + + function setFees(address _address, uint maxFee, uint minFee, uint bpsFee, uint flatFee) external onlyOwner returns (bool success) { + FeeData memory feeData = FeeData(maxFee, minFee, bpsFee, flatFee); + fees[_address] = feeData; + return true; + } +} \ No newline at end of file From 78ea9759879df97b4693af89c8ee3e1e603c78b2 Mon Sep 17 00:00:00 2001 From: Volodymyr Kostanda Date: Tue, 18 Dec 2018 09:22:15 +0200 Subject: [PATCH 12/40] breaking transfer test. need investigation --- contracts/TokenIOERC20FeesApply.sol | 28 +++++++++---------- contracts/TokenIOLib.sol | 43 ++++++++++++----------------- contracts/TokenIOStorage.sol | 21 ++++++++++++++ test/TokenIOERC20FeesApply.js | 5 ++-- 4 files changed, 56 insertions(+), 41 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index fa454c7..945a160 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -198,21 +198,22 @@ contract TokenIOERC20FeesApply is Ownable { address feeContract = lib.getFeeContract(address(this)); string memory currency = lib.getTokenSymbol(address(this)); uint fees = calculateFees(feeContract, amount); - - bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(msg.sender))); - bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(to))); - bytes32 id_c = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(feeContract))); - + + address[3] memory addresses = [lib.getForwardedAccount(msg.sender), lib.getForwardedAccount(to), lib.getForwardedAccount(feeContract)]; + uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency), lib.Storage.getBalance(addresses[1], currency), lib.Storage.getBalance(addresses[2], currency)]; + require( - lib.Storage.setUint(id_a, lib.Storage.getUint(id_a).sub(amount.add(fees))), + lib.Storage.setBalance(addresses[0], currency, balances[0].sub(amount.add(fees))), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); + require( - lib.Storage.setUint(id_c, lib.Storage.getUint(id_c).add(fees)), + lib.Storage.setBalance(addresses[1], currency, balances[1].add(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); + require( - lib.Storage.setUint(id_b, lib.Storage.getUint(id_b).add(amount)), + lib.Storage.setBalance(addresses[2], currency, balances[2].add(fees)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); @@ -232,22 +233,21 @@ contract TokenIOERC20FeesApply is Ownable { string memory currency = lib.getTokenSymbol(address(this)); uint fees = calculateFees(feeContract, amount); - bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(from))); - bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(to))); - bytes32 id_c = keccak256(abi.encodePacked('token.balance', currency, lib.getForwardedAccount(feeContract))); + address[3] memory addresses = [lib.getForwardedAccount(from), lib.getForwardedAccount(to), lib.getForwardedAccount(feeContract)]; + uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency), lib.Storage.getBalance(addresses[1], currency), lib.Storage.getBalance(addresses[2], currency)]; require( - lib.Storage.setUint(id_a, lib.Storage.getUint(id_a).sub(amount.add(fees))), + lib.Storage.setBalance(addresses[0], currency, balances[0].sub(amount.add(fees))), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); require( - lib.Storage.setUint(id_b, lib.Storage.getUint(id_b).add(amount)), + lib.Storage.setBalance(addresses[1], currency, balances[1].add(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); require( - lib.Storage.setUint(id_c, lib.Storage.getUint(id_c).add(fees)), + lib.Storage.setBalance(addresses[2], currency, balances[2].add(fees)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 0040eae..a71a2b5 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -251,12 +251,7 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setForwardedAccount(Data storage self, address originalAccount, address forwardedAccount) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('master.account', forwardedAccount)); - require( - self.Storage.setAddress(id, originalAccount), - "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - ); - return true; + return self.Storage.setRelatedAccount(forwardedAccount, originalAccount); } /** @@ -268,13 +263,7 @@ library TokenIOLib { * @return { "registeredAccount" : "Will return the original account of a forwarded account or the account itself if no account found"} */ function getForwardedAccount(Data storage self, address account) internal view returns (address registeredAccount) { - bytes32 id = keccak256(abi.encodePacked('master.account', account)); - address originalAccount = self.Storage.getAddress(id); - if (originalAccount != 0x0) { - return originalAccount; - } else { - return account; - } + return self.Storage.getRelatedAccount(account); } /** @@ -474,8 +463,7 @@ library TokenIOLib { * @return { "balance" : "Return the balance of a given account for a specified currency"} */ function getTokenBalance(Data storage self, string currency, address account) internal view returns (uint balance) { - bytes32 id = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account))); - return self.Storage.getUint(id); + return self.Storage.getBalance(getForwardedAccount(self, account), currency); } /** @@ -528,6 +516,10 @@ library TokenIOLib { uint fees = ((amount.mul(bpsFee)).div(10000)).add(flatFee); + //return (fees < maxFee) ? fees : maxFee; + + + if (fees > maxFee) { return maxFee; } else if (fees < minFee) { @@ -589,7 +581,7 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function transfer(Data storage self, string currency, address to, uint amount, bytes data) internal returns (bool success) { + function transfer(Data storage self, string currency, address to, uint amount, bytes data) private returns (bool success) { require(address(to) != 0x0, "Error: `to` address cannot be null." ); require(amount > 0, "Error: `amount` must be greater than zero"); @@ -628,7 +620,7 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) { + function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) private returns (bool success) { require( address(to) != 0x0, "Error: `to` address must not be null." @@ -678,7 +670,7 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) { + function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) private returns (bool success) { require( address(to) != 0x0, "Error: `to` address must not be null." @@ -740,14 +732,13 @@ library TokenIOLib { "Error: Spender must not have a frozen balance directly"); bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, msg.sender), getForwardedAccount(self, spender))); - bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, msg.sender))); require( self.Storage.getUint(id_a) == 0 || amount == 0, "Error: Allowance must be zero (0) before setting an updated allowance for spender."); require( - self.Storage.getUint(id_b) >= amount, + self.Storage.getBalance(getForwardedAccount(self, msg.sender), currency) >= amount, "Error: Allowance cannot exceed msg.sender token balance."); require( @@ -771,12 +762,13 @@ library TokenIOLib { * @return { "success" : "Return true if successfully called from another contract" } */ function deposit(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) { - bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account))); bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm)); bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency)); + address forwardedAccount = getForwardedAccount(self, account); - require(self.Storage.setUint(id_a, self.Storage.getUint(id_a).add(amount)), + + require(self.Storage.setBalance(forwardedAccount, currency, self.Storage.getBalance(forwardedAccount, currency).add(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); require(self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); @@ -801,12 +793,13 @@ library TokenIOLib { * @return { "success" : "Return true if successfully called from another contract" } */ function withdraw(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) { - bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account))); bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm)); // possible for issuer to go negative bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency)); + address forwardedAccount = getForwardedAccount(self, account); + require( - self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)), + self.Storage.setBalance(forwardedAccount, currency, self.Storage.getBalance(forwardedAccount, currency).sub(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); require( self.Storage.setUint(id_b, self.Storage.getUint(id_b).sub(amount)), @@ -976,7 +969,7 @@ library TokenIOLib { bytes32 sigR, bytes32 sigS, uint expiration - ) internal returns (bool success) { + ) private returns (bool success) { bytes32 fxTxHash = keccak256(abi.encodePacked(requester, symbolA, symbolB, valueA, valueB, expiration)); diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 36771cc..ef0f318 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -66,6 +66,8 @@ contract TokenIOStorage is Ownable { mapping(address => address) internal feeContracts; mapping(address => string) internal tokenSymbol; mapping(address => FeeData) internal fees; + mapping(address => mapping(string => uint256)) internal balances; + mapping(address => address) internal relatedAccounts; mapping(bytes32 => uint256) internal uIntStorage; mapping(bytes32 => string) internal stringStorage; @@ -306,4 +308,23 @@ contract TokenIOStorage is Ownable { fees[_address] = feeData; return true; } + + function getRelatedAccount(address _address) external view returns (address value) { + address relatedAddress = relatedAccounts[_address]; + return (0x0 != relatedAddress) ? relatedAddress : _address; + } + + function setRelatedAccount(address _address, address _related) external onlyOwner returns (bool success) { + relatedAccounts[_address] = _related; + return true; + } + + function getBalance(address _address, string _currency) external view returns (uint256 value) { + return balances[_address][_currency]; + } + + function setBalance(address _address, string _currency, uint _value) external onlyOwner returns (bool success) { + balances[_address][_currency] = _value; + return true; + } } \ No newline at end of file diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js index efb3ca1..d2eb784 100644 --- a/test/TokenIOERC20FeesApply.js +++ b/test/TokenIOERC20FeesApply.js @@ -82,13 +82,14 @@ contract("TokenIOERC20FeesApply", function(accounts) { await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) await storage.allowOwnership(erc20.address) const tokenSymbol = await erc20.symbol() + assert.equal(tokenSymbol, 'USDx', "Incorrect token symbol") const depositReceipt = await CA.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") const balance1 = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() const balance2 = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - assert.equal(balance1, DEPOSIT_AMOUNT) - assert.equal(balance2, 0) + assert.equal(balance1, DEPOSIT_AMOUNT, "first account should contain all the deposit initially") + assert.equal(balance2, 0, "Second account should have zero balance") const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() From 745bf714c068d0d5ae433a43bb94626f5b5e3e73 Mon Sep 17 00:00:00 2001 From: Volodymyr Kostanda Date: Tue, 18 Dec 2018 10:10:47 +0200 Subject: [PATCH 13/40] minor updates to correspond to new fee parameters format --- contracts/TokenIOERC20.sol | 11 +++-------- contracts/TokenIOFeeContract.sol | 16 ++++------------ contracts/TokenIOLib.sol | 22 ++++++++++------------ contracts/TokenIOMerchant.sol | 12 ++++-------- 4 files changed, 21 insertions(+), 40 deletions(-) diff --git a/contracts/TokenIOERC20.sol b/contracts/TokenIOERC20.sol index 0675475..4df8477 100644 --- a/contracts/TokenIOERC20.sol +++ b/contracts/TokenIOERC20.sol @@ -166,14 +166,9 @@ contract TokenIOERC20 is Ownable { */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { address feeContract = lib.getFeeContract(address(this)); - return ( - lib.getFeeBPS(feeContract), - lib.getFeeMin(feeContract), - lib.getFeeMax(feeContract), - lib.getFeeFlat(feeContract), - lib.getFeeMsg(feeContract), - feeContract - ); + (max, min, bps, flat) = lib.getFees(feeContract); + feeMsg = lib.getFeeMsg(feeContract); + feeAccount = feeContract; } /** diff --git a/contracts/TokenIOFeeContract.sol b/contracts/TokenIOFeeContract.sol index 6602e86..811684f 100644 --- a/contracts/TokenIOFeeContract.sol +++ b/contracts/TokenIOFeeContract.sol @@ -62,10 +62,7 @@ contract TokenIOFeeContract is Ownable { * returns {"success" : "Returns true if successfully called from another contract"} */ function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes feeMsg) public onlyOwner returns (bool success) { - require(lib.setFeeBPS(feeBps), "Error: Unable to set fee contract basis points."); - require(lib.setFeeMin(feeMin), "Error: Unable to set fee contract minimum fee."); - require(lib.setFeeMax(feeMax), "Error: Unable to set fee contract maximum fee."); - require(lib.setFeeFlat(feeFlat), "Error: Unable to set fee contract flat fee."); + require(lib.setFees(feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings"); require(lib.setFeeMsg(feeMsg), "Error: Unable to set fee contract default message."); return true; } @@ -81,14 +78,9 @@ contract TokenIOFeeContract is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeContract) { - return ( - lib.getFeeBPS(address(this)), - lib.getFeeMin(address(this)), - lib.getFeeMax(address(this)), - lib.getFeeFlat(address(this)), - lib.getFeeMsg(address(this)), - address(this) - ); + (max, min, bps, flat) = lib.getFees(address(this)); + feeMsg = lib.getFeeMsg(address(this)); + feeContract = address(this); } /** diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index a71a2b5..2f32463 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -581,7 +581,7 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function transfer(Data storage self, string currency, address to, uint amount, bytes data) private returns (bool success) { + function transfer(Data storage self, string currency, address to, uint amount, bytes data) internal returns (bool success) { require(address(to) != 0x0, "Error: `to` address cannot be null." ); require(amount > 0, "Error: `amount` must be greater than zero"); @@ -620,7 +620,7 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) private returns (bool success) { + function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) { require( address(to) != 0x0, "Error: `to` address must not be null." @@ -670,7 +670,7 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) private returns (bool success) { + function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) { require( address(to) != 0x0, "Error: `to` address must not be null." @@ -762,17 +762,16 @@ library TokenIOLib { * @return { "success" : "Return true if successfully called from another contract" } */ function deposit(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) { - bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm)); - bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency)); + bytes32[2] memory ids = [keccak256(abi.encodePacked('token.issued', currency, issuerFirm)), keccak256(abi.encodePacked('token.supply', currency))]; address forwardedAccount = getForwardedAccount(self, account); require(self.Storage.setBalance(forwardedAccount, currency, self.Storage.getBalance(forwardedAccount, currency).add(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); - require(self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)), + require(self.Storage.setUint(ids[0], self.Storage.getUint(ids[0]).add(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); - require(self.Storage.setUint(id_c, self.Storage.getUint(id_c).add(amount)), + require(self.Storage.setUint(ids[1], self.Storage.getUint(ids[1]).add(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); emit Deposit(currency, account, amount, issuerFirm); @@ -793,8 +792,7 @@ library TokenIOLib { * @return { "success" : "Return true if successfully called from another contract" } */ function withdraw(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) { - bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm)); // possible for issuer to go negative - bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency)); + bytes32[2] memory ids = [keccak256(abi.encodePacked('token.issued', currency, issuerFirm)), keccak256(abi.encodePacked('token.supply', currency))]; address forwardedAccount = getForwardedAccount(self, account); @@ -802,10 +800,10 @@ library TokenIOLib { self.Storage.setBalance(forwardedAccount, currency, self.Storage.getBalance(forwardedAccount, currency).sub(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); require( - self.Storage.setUint(id_b, self.Storage.getUint(id_b).sub(amount)), + self.Storage.setUint(ids[0], self.Storage.getUint(ids[0]).sub(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); require( - self.Storage.setUint(id_c, self.Storage.getUint(id_c).sub(amount)), + self.Storage.setUint(ids[1], self.Storage.getUint(ids[1]).sub(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); emit Withdraw(currency, account, amount, issuerFirm); @@ -969,7 +967,7 @@ library TokenIOLib { bytes32 sigR, bytes32 sigS, uint expiration - ) private returns (bool success) { + ) internal returns (bool success) { bytes32 fxTxHash = keccak256(abi.encodePacked(requester, symbolA, symbolB, valueA, valueB, expiration)); diff --git a/contracts/TokenIOMerchant.sol b/contracts/TokenIOMerchant.sol index e3f5ff6..77c4b6f 100644 --- a/contracts/TokenIOMerchant.sol +++ b/contracts/TokenIOMerchant.sol @@ -72,14 +72,10 @@ contract TokenIOMerchant is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { - return ( - lib.getFeeBPS(lib.getFeeContract(address(this))), - lib.getFeeMin(lib.getFeeContract(address(this))), - lib.getFeeMax(lib.getFeeContract(address(this))), - lib.getFeeFlat(lib.getFeeContract(address(this))), - lib.getFeeMsg(lib.getFeeContract(address(this))), - lib.getFeeContract(address(this)) - ); + address feeContract = lib.getFeeContract(address(this)); + (max, min, bps, flat) = lib.getFees(feeContract); + feeMsg = lib.getFeeMsg(feeContract); + feeAccount = feeContract; } /** From df3b83c5cc87e79a81ea4956e26aec9dfb269425 Mon Sep 17 00:00:00 2001 From: Volodymyr Kostanda Date: Wed, 23 Jan 2019 18:27:42 +0200 Subject: [PATCH 14/40] 1. updates to balance storage and mappings order; 2. logging transfer gas use in test for FeesApply contract --- contracts/TokenIOStorage.sol | 16 ++++++++++------ test/TokenIOERC20FeesApply.js | 5 +++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index ef0f318..0db50b3 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -62,12 +62,14 @@ contract TokenIOStorage is Ownable { uint flatFee; } - mapping(address => bool) internal isDeprecated; - mapping(address => address) internal feeContracts; - mapping(address => string) internal tokenSymbol; - mapping(address => FeeData) internal fees; mapping(address => mapping(string => uint256)) internal balances; + mapping(address => FeeData) internal fees; mapping(address => address) internal relatedAccounts; + mapping(address => address) internal feeContracts; + mapping(address => bool) internal isDeprecated; + mapping(address => string) internal tokenSymbol; + + mapping(bytes32 => uint256) internal uIntStorage; mapping(bytes32 => string) internal stringStorage; @@ -102,7 +104,7 @@ contract TokenIOStorage is Ownable { * @param _value The Uint value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setUint(bytes32 _key, uint _value) external onlyOwner returns (bool success) { + function setUint(bytes32 _key, uint _value) public onlyOwner returns (bool success) { uIntStorage[_key] = _value; return true; } @@ -231,7 +233,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the Uint value associated with the id key" } */ - function getUint(bytes32 _key) external view returns (uint _value) { + function getUint(bytes32 _key) public view returns (uint _value) { return uIntStorage[_key]; } @@ -320,10 +322,12 @@ contract TokenIOStorage is Ownable { } function getBalance(address _address, string _currency) external view returns (uint256 value) { + //return getUint(keccak256(abi.encodePacked('token.balance', _address, _currency))); return balances[_address][_currency]; } function setBalance(address _address, string _currency, uint _value) external onlyOwner returns (bool success) { + //setUint(keccak256(abi.encodePacked('token.balance', _address, _currency)), _value); balances[_address][_currency] = _value; return true; } diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js index d2eb784..395f3e9 100644 --- a/test/TokenIOERC20FeesApply.js +++ b/test/TokenIOERC20FeesApply.js @@ -91,7 +91,12 @@ contract("TokenIOERC20FeesApply", function(accounts) { assert.equal(balance1, DEPOSIT_AMOUNT, "first account should contain all the deposit initially") assert.equal(balance2, 0, "Second account should have zero balance") + var gas = await erc20.transfer.estimateGas(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + console.log("transfer gas estimation = " + gas + " units") + const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + + const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() const balance2b = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() From fabaa997e270a7543572c5d371e6003c11bd5143 Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Thu, 24 Jan 2019 19:17:41 +0200 Subject: [PATCH 15/40] fix issue with forceTransfer in TokenIOLib --- contracts/TokenIOLib.sol | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 2f32463..7984f2b 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -676,15 +676,13 @@ library TokenIOLib { "Error: `to` address must not be null." ); - bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, from))); - bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, to))); - require( - self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + self.Storage.setBalance(getForwardedAccount(self, from), currency, self.Storage.getBalance(from, currency).sub(amount)), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); + require( - self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)), + self.Storage.setBalance(getForwardedAccount(self, to), currency, self.Storage.getBalance(to, currency).add(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); From c7ceb891accd0d45821e1f93b7e0f399667befcf Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Fri, 25 Jan 2019 16:54:53 +0200 Subject: [PATCH 16/40] oprimize set params functiom, created struct in storage --- contracts/TokenIOERC20FeesApply.sol | 16 +---- contracts/TokenIOLib.sol | 43 ++++++------ contracts/TokenIOStorage.sol | 103 +++++++++++++++++++++------- test/TokenIOERC20FeesApply.js | 20 ++++++ 4 files changed, 123 insertions(+), 59 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 945a160..28e6ee6 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -75,20 +75,8 @@ contract TokenIOERC20FeesApply is Ownable { address _feeContract, uint _fxUSDBPSRate ) onlyOwner public returns (bool success) { - require(lib.setTokenName(_name), - "Error: Unable to set token name. Please check arguments."); - require(lib.setTokenSymbol(_symbol), - "Error: Unable to set token symbol. Please check arguments."); - require(lib.setTokenTLA(_tla), - "Error: Unable to set token TLA. Please check arguments."); - require(lib.setTokenVersion(_version), - "Error: Unable to set token version. Please check arguments."); - require(lib.setTokenDecimals(_symbol, _decimals), - "Error: Unable to set token decimals. Please check arguments."); - require(lib.setFeeContract(_feeContract), - "Error: Unable to set fee contract. Please check arguments."); - require(lib.setFxUSDBPSRate(_symbol, _fxUSDBPSRate), - "Error: Unable to set fx USD basis points rate. Please check arguments."); + require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Error: Unable to set token params. Please check arguments."); return true; } diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 7984f2b..abdf8de 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -47,6 +47,13 @@ library TokenIOLib { event AccountForward(address indexed originalAccount, address indexed forwardedAccount); event NewAuthority(address indexed authority, string issuerFirm); + function setTokenParams(Data storage self, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal returns(bool res) { + require( + self.Storage.setTokenParams(address(this), _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract."); + return true; + } + /** * @notice Set the token name for Token interfaces * @dev This method must be set by the token interface's setParams() method @@ -56,14 +63,13 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setTokenName(Data storage self, string tokenName) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('token.name', address(this))); require( - self.Storage.setString(id, tokenName), + self.Storage.setTokenName(address(this), tokenName), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; } - + /** * @notice Set the token symbol for Token interfaces * @dev This method must be set by the token interface's setParams() method @@ -89,9 +95,8 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setTokenTLA(Data storage self, string tokenTLA) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('token.tla', address(this))); require( - self.Storage.setString(id, tokenTLA), + self.Storage.setTokenTLA(address(this), tokenTLA), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -106,9 +111,8 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setTokenVersion(Data storage self, string tokenVersion) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('token.version', address(this))); require( - self.Storage.setString(id, tokenVersion), + self.Storage.setTokenVersion(address(this), tokenVersion), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -126,9 +130,8 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setTokenDecimals(Data storage self, string currency, uint tokenDecimals) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('token.decimals', currency)); require( - self.Storage.setUint(id, tokenDecimals), + self.Storage.setTokenDecimals(currency, tokenDecimals), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -168,7 +171,7 @@ library TokenIOLib { */ function setFeeContract(Data storage self, address feeContract) internal returns (bool success) { require( - self.Storage.setFeeContract(address(this), feeContract), + self.Storage.setTokenFeeContract(address(this), feeContract), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -313,8 +316,7 @@ library TokenIOLib { * @return {"tokenName" : "Name of the token contract"} */ function getTokenName(Data storage self, address contractAddress) internal view returns (string tokenName) { - bytes32 id = keccak256(abi.encodePacked('token.name', contractAddress)); - return self.Storage.getString(id); + return self.Storage.getTokenName(contractAddress); } /** @@ -338,8 +340,7 @@ library TokenIOLib { * @return {"tokenTLA" : "TLA of the token contract"} */ function getTokenTLA(Data storage self, address contractAddress) internal view returns (string tokenTLA) { - bytes32 id = keccak256(abi.encodePacked('token.tla', contractAddress)); - return self.Storage.getString(id); + return self.Storage.getTokenTLA(contractAddress); } /** @@ -350,9 +351,8 @@ library TokenIOLib { * @param contractAddress Contract address of the queryable interface * @return {"tokenVersion" : "Semantic version of the token contract"} */ - function getTokenVersion(Data storage self, address contractAddress) internal view returns (string) { - bytes32 id = keccak256(abi.encodePacked('token.version', contractAddress)); - return self.Storage.getString(id); + function getTokenVersion(Data storage self, address contractAddress) internal view returns (string) { + return self.Storage.getTokenVersion(contractAddress); } /** @@ -364,8 +364,7 @@ library TokenIOLib { * @return {"tokenDecimals" : "Decimals of the token contract"} */ function getTokenDecimals(Data storage self, string currency) internal view returns (uint tokenDecimals) { - bytes32 id = keccak256(abi.encodePacked('token.decimals', currency)); - return self.Storage.getUint(id); + return self.Storage.getTokenDecimals(currency); } function getFees(Data storage self, address contractAddress) internal view returns (uint maxFee, uint minFee, uint bpsFee, uint flatFee) { @@ -394,7 +393,7 @@ library TokenIOLib { */ function setMasterFeeContract(Data storage self, address contractAddress) internal returns (bool success) { require( - self.Storage.setFeeContract(0, contractAddress), + self.Storage.setTokenFeeContract(0, contractAddress), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -407,7 +406,7 @@ library TokenIOLib { * @return { "masterFeeContract" : "Returns the master fee contract set for TSM."} */ function getMasterFeeContract(Data storage self) internal view returns (address masterFeeContract) { - return self.Storage.getFeeContract(0); + return self.Storage.getTokenFeeContract(0); } /** @@ -421,7 +420,7 @@ library TokenIOLib { */ function getFeeContract(Data storage self, address contractAddress) internal view returns (address feeContract) { - address feeAccount = self.Storage.getFeeContract(contractAddress); + address feeAccount = self.Storage.getTokenFeeContract(contractAddress); if (feeAccount == 0x0) { return getMasterFeeContract(self); } else { diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 0db50b3..f4b9889 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -54,6 +54,15 @@ contract TokenIOStorage is Ownable { /// @dev only the derived contract can use the internal methods; /// @dev key == `keccak256(param1, param2...)` /// @dev Nested mapping can be achieved using multiple params in keccak256 hash; + + struct Token { + string name; + string symbol; + string tla; + string version; + address feeContract; + uint fxUSDBPSRate; + } struct FeeData { uint maxFee; @@ -63,13 +72,12 @@ contract TokenIOStorage is Ownable { } mapping(address => mapping(string => uint256)) internal balances; + mapping(address => FeeData) internal fees; mapping(address => address) internal relatedAccounts; - mapping(address => address) internal feeContracts; - mapping(address => bool) internal isDeprecated; - mapping(address => string) internal tokenSymbol; - - + mapping(address => bool) internal isDeprecated; + mapping(string => uint) internal decimals; + mapping(address => Token) internal tokens; mapping(bytes32 => uint256) internal uIntStorage; mapping(bytes32 => string) internal stringStorage; @@ -282,24 +290,6 @@ contract TokenIOStorage is Ownable { return true; } - function getFeeContract(address _address) external view returns (address _value) { - return feeContracts[_address]; - } - - function setFeeContract(address _address, address _value) external onlyOwner returns (bool success) { - feeContracts[_address] = _value; - return true; - } - - function getTokenSymbol(address _address) external view returns (string _value) { - return tokenSymbol[_address]; - } - - function setTokenSymbol(address _address, string _value) external onlyOwner returns (bool success) { - tokenSymbol[_address] = _value; - return true; - } - function getFees(address _address) external view returns (uint maxFee, uint minFee, uint bpsFee, uint flatFee) { FeeData memory feeData = fees[_address]; return (feeData.maxFee, feeData.minFee, feeData.bpsFee, feeData.flatFee); @@ -331,4 +321,71 @@ contract TokenIOStorage is Ownable { balances[_address][_currency] = _value; return true; } + + function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { + tokens[_address] = Token(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); + + decimals[_symbol] = _decimals; + + return true; + } + + function getTokenName(address _address) external view returns(string) { + return tokens[_address].name; + } + + function setTokenName(address _address, string _tokenName) external onlyOwner returns(bool success) { + tokens[_address].name = _tokenName; + return true; + } + + function getTokenSymbol(address _address) external view returns(string) { + return tokens[_address].symbol; + } + + function setTokenSymbol(address _address, string _value) external onlyOwner returns (bool success) { + tokens[_address].symbol = _value; + return true; + } + + function getTokenTLA(address _address) external view returns(string) { + return tokens[_address].tla; + } + + function setTokenTLA(address _address, string _tokenTLA) external onlyOwner returns(bool success) { + tokens[_address].tla = _tokenTLA; + return true; + } + + function getTokenVersion(address _address) external view returns(string) { + return tokens[_address].version; + } + + function setTokenVersion(address _address, string _tokenVersion) external onlyOwner returns(bool success) { + tokens[_address].version = _tokenVersion; + return true; + } + + function getTokenDecimals(string _currency) external view returns(uint) { + return decimals[_currency]; + } + + function setTokenDecimals(string _currency, uint _decimals) external onlyOwner returns(bool success) { + decimals[_currency] = _decimals; + return true; + } + + function getTokenFeeContract(address _address) external view returns(address) { + return tokens[_address].feeContract; + } + + function setTokenFeeContract(address _address, address _value) external onlyOwner returns (bool success) { + tokens[_address].feeContract = _value; + return true; + } + + function getTokenfxUSDBPSRate(address _address) external view returns(uint) { + return tokens[_address].fxUSDBPSRate; + } + } \ No newline at end of file diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js index 395f3e9..99b21b3 100644 --- a/test/TokenIOERC20FeesApply.js +++ b/test/TokenIOERC20FeesApply.js @@ -23,6 +23,23 @@ contract("TokenIOERC20FeesApply", function(accounts) { /* PARAMETERS */ + it(`Gas checker`, async () => { + const storage = await TokenIOStorage.deployed() + const erc20 = await TokenIOERC20FeesApply.deployed() + + var gas = await erc20.name.estimateGas() + console.log("name gas estimation = " + gas + " units") + + var gas = await erc20.totalSupply.estimateGas() + console.log("totalSupply gas estimation = " + gas + " units") + + var gas = await erc20.getFeeParams.estimateGas() + console.log("getFeeParams gas estimation = " + gas + " units") + + var gas = await erc20.deprecateInterface.estimateGas() + console.log("deprecateInterface gas estimation = " + gas + " units") + }) + it(`TOKEN_PARAMS :should correctly set parameters according to c 'token.config.js' [name, symbol, tla, decimals]`, async () => { @@ -54,6 +71,9 @@ contract("TokenIOERC20FeesApply", function(accounts) { const erc20 = await TokenIOERC20FeesApply.deployed() await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + var gas = await erc20.setParams.estimateGas(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + console.log("setParams gas estimation = " + gas + " units") + const balance = await erc20.balanceOf(TEST_ACCOUNT_1) assert.equal(balance, 0) }) From 5ed7a55d7133900b6a115abb766c36f2b3b6fe9a Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Fri, 25 Jan 2019 17:28:54 +0200 Subject: [PATCH 17/40] optimized transger/transfer from functions --- contracts/TokenIOERC20FeesApply.sol | 32 +++++++---------------------- contracts/TokenIOStorage.sol | 12 ++++++++++- test/TokenIOERC20FeesApply.js | 2 ++ 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 28e6ee6..756b0bf 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -188,20 +188,10 @@ contract TokenIOERC20FeesApply is Ownable { uint fees = calculateFees(feeContract, amount); address[3] memory addresses = [lib.getForwardedAccount(msg.sender), lib.getForwardedAccount(to), lib.getForwardedAccount(feeContract)]; - uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency), lib.Storage.getBalance(addresses[1], currency), lib.Storage.getBalance(addresses[2], currency)]; + uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; require( - lib.Storage.setBalance(addresses[0], currency, balances[0].sub(amount.add(fees))), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); - - require( - lib.Storage.setBalance(addresses[1], currency, balances[1].add(amount)), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); - - require( - lib.Storage.setBalance(addresses[2], currency, balances[2].add(fees)), + lib.Storage.setBalances(addresses, currency, balances), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); @@ -213,7 +203,9 @@ contract TokenIOERC20FeesApply is Ownable { * @notice spender transfers from approvers account to the reciving account * @param from Approver's address * @param to Receiving address - * @param amount Transfer amount + * @param amount Transfer amount uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; + + * @return {"success" : "Returns true if transferFrom succeeds"} */ function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) { @@ -222,20 +214,10 @@ contract TokenIOERC20FeesApply is Ownable { uint fees = calculateFees(feeContract, amount); address[3] memory addresses = [lib.getForwardedAccount(from), lib.getForwardedAccount(to), lib.getForwardedAccount(feeContract)]; - uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency), lib.Storage.getBalance(addresses[1], currency), lib.Storage.getBalance(addresses[2], currency)]; - - require( - lib.Storage.setBalance(addresses[0], currency, balances[0].sub(amount.add(fees))), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); - - require( - lib.Storage.setBalance(addresses[1], currency, balances[1].add(amount)), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); + uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; require( - lib.Storage.setBalance(addresses[2], currency, balances[2].add(fees)), + lib.Storage.setBalances(addresses, currency, balances), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." ); diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index f4b9889..a9be29c 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -72,7 +72,7 @@ contract TokenIOStorage is Ownable { } mapping(address => mapping(string => uint256)) internal balances; - + mapping(address => FeeData) internal fees; mapping(address => address) internal relatedAccounts; mapping(address => bool) internal isDeprecated; @@ -322,6 +322,16 @@ contract TokenIOStorage is Ownable { return true; } + function setBalances(address[3] _addresses, string _currency, uint[3] _values) external onlyOwner returns (bool success) { + require(_addresses.length == _values.length); + + for(uint i = 0; i < _addresses.length; i++) { + balances[_addresses[i]][_currency] = _values[i]; + } + + return true; + } + function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { tokens[_address] = Token(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js index 99b21b3..591f4c6 100644 --- a/test/TokenIOERC20FeesApply.js +++ b/test/TokenIOERC20FeesApply.js @@ -172,6 +172,8 @@ contract("TokenIOERC20FeesApply", function(accounts) { assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) const TRANSFER_FROM_AMOUNT = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + var gas = await erc20.transferFrom.estimateGas(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) + console.log("transferFrom gas estimation = " + gas + " units") const transferFromReceipt = await erc20.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) const TX_FEES = +(await erc20.calculateFees(TRANSFER_FROM_AMOUNT)).toString() From 04aff177291bef0cb939e0acbb1f785227a621bf Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Sun, 27 Jan 2019 03:37:32 +0200 Subject: [PATCH 18/40] optimized transfer/transferFrom functions in TokenIOERC20FeesApply --- contracts/TokenIOERC20FeesApply.sol | 22 ++++-------- contracts/TokenIOLib.sol | 4 +++ contracts/TokenIOStorage.sol | 52 ++++++++++++++++++----------- 3 files changed, 43 insertions(+), 35 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 756b0bf..fa1ee03 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -182,21 +182,16 @@ contract TokenIOERC20FeesApply is Ownable { * @param amount Transfer amount * @return {"success" : "Returns true if transfer succeeds"} */ - function transfer(address to, uint amount) public notDeprecated returns (bool success) { + function transfer(address to, uint amount) public notDeprecated { address feeContract = lib.getFeeContract(address(this)); - string memory currency = lib.getTokenSymbol(address(this)); + (string memory currency, address[3] memory addresses) = lib.getTransferDetails(address(this), [msg.sender, to, feeContract]); uint fees = calculateFees(feeContract, amount); - address[3] memory addresses = [lib.getForwardedAccount(msg.sender), lib.getForwardedAccount(to), lib.getForwardedAccount(feeContract)]; uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; - require( - lib.Storage.setBalances(addresses, currency, balances), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); + lib.Storage.setBalances(addresses, currency, balances); emit Transfer(msg.sender, to, amount); - return true; } /** @@ -208,18 +203,14 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"success" : "Returns true if transferFrom succeeds"} */ - function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) { + function transferFrom(address from, address to, uint amount) public notDeprecated { address feeContract = lib.getFeeContract(address(this)); - string memory currency = lib.getTokenSymbol(address(this)); + (string memory currency, address[3] memory addresses) = lib.getTransferDetails(address(this), [msg.sender, to, feeContract]); uint fees = calculateFees(feeContract, amount); - address[3] memory addresses = [lib.getForwardedAccount(from), lib.getForwardedAccount(to), lib.getForwardedAccount(feeContract)]; uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; - require( - lib.Storage.setBalances(addresses, currency, balances), - "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - ); + lib.Storage.setBalances(addresses, currency, balances); /// @notice This transaction will fail if the msg.sender does not have an approved allowance. require( @@ -228,7 +219,6 @@ contract TokenIOERC20FeesApply is Ownable { ); emit Transfer(from, to, amount); - return true; } /** diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index abdf8de..d783e44 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -269,6 +269,10 @@ library TokenIOLib { return self.Storage.getRelatedAccount(account); } + function getTransferDetails(Data storage self, address account, address[3] memory addresses) internal view returns(string memory, address[3] memory) { + return self.Storage.getTransferDetails(account, addresses); + } + /** * @notice Get KYC approval status for the account holder * @dev | This method has an `internal` view diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index a9be29c..ec8f722 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -1,6 +1,7 @@ pragma solidity 0.4.24; import "./Ownable.sol"; +import "./SafeMath.sol"; /** @@ -55,7 +56,9 @@ contract TokenIOStorage is Ownable { /// @dev key == `keccak256(param1, param2...)` /// @dev Nested mapping can be achieved using multiple params in keccak256 hash; - struct Token { + using SafeMath for uint; + + struct Entity { string name; string symbol; string tla; @@ -77,7 +80,7 @@ contract TokenIOStorage is Ownable { mapping(address => address) internal relatedAccounts; mapping(address => bool) internal isDeprecated; mapping(string => uint) internal decimals; - mapping(address => Token) internal tokens; + mapping(address => Entity) internal entities; mapping(bytes32 => uint256) internal uIntStorage; mapping(bytes32 => string) internal stringStorage; @@ -306,6 +309,21 @@ contract TokenIOStorage is Ownable { return (0x0 != relatedAddress) ? relatedAddress : _address; } + function getRelatedAccounts(address[3] _addresses) internal view returns (address[3] memory) { + address[3] memory relatedAddresses; + for(uint i = 0; i < _addresses.length; i++) { + relatedAddresses[i] = relatedAccounts[_addresses[i]]; + relatedAddresses[i] = (0x0 != relatedAddresses[i]) ? relatedAddresses[i] : _addresses[i]; + } + + return relatedAddresses; + } + + function getTransferDetails(address _account, address[3] _addresses) external view returns(string memory currency, address[3] memory addresses) { + currency = entities[_account].symbol; + addresses = getRelatedAccounts(_addresses); + } + function setRelatedAccount(address _address, address _related) external onlyOwner returns (bool success) { relatedAccounts[_address] = _related; return true; @@ -322,18 +340,14 @@ contract TokenIOStorage is Ownable { return true; } - function setBalances(address[3] _addresses, string _currency, uint[3] _values) external onlyOwner returns (bool success) { - require(_addresses.length == _values.length); - + function setBalances(address[3] _addresses, string _currency, uint[3] _values) external onlyOwner { for(uint i = 0; i < _addresses.length; i++) { balances[_addresses[i]][_currency] = _values[i]; } - - return true; } function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { - tokens[_address] = Token(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); + entities[_address] = Entity(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); decimals[_symbol] = _decimals; @@ -341,38 +355,38 @@ contract TokenIOStorage is Ownable { } function getTokenName(address _address) external view returns(string) { - return tokens[_address].name; + return entities[_address].name; } function setTokenName(address _address, string _tokenName) external onlyOwner returns(bool success) { - tokens[_address].name = _tokenName; + entities[_address].name = _tokenName; return true; } function getTokenSymbol(address _address) external view returns(string) { - return tokens[_address].symbol; + return entities[_address].symbol; } function setTokenSymbol(address _address, string _value) external onlyOwner returns (bool success) { - tokens[_address].symbol = _value; + entities[_address].symbol = _value; return true; } function getTokenTLA(address _address) external view returns(string) { - return tokens[_address].tla; + return entities[_address].tla; } function setTokenTLA(address _address, string _tokenTLA) external onlyOwner returns(bool success) { - tokens[_address].tla = _tokenTLA; + entities[_address].tla = _tokenTLA; return true; } function getTokenVersion(address _address) external view returns(string) { - return tokens[_address].version; + return entities[_address].version; } function setTokenVersion(address _address, string _tokenVersion) external onlyOwner returns(bool success) { - tokens[_address].version = _tokenVersion; + entities[_address].version = _tokenVersion; return true; } @@ -386,16 +400,16 @@ contract TokenIOStorage is Ownable { } function getTokenFeeContract(address _address) external view returns(address) { - return tokens[_address].feeContract; + return entities[_address].feeContract; } function setTokenFeeContract(address _address, address _value) external onlyOwner returns (bool success) { - tokens[_address].feeContract = _value; + entities[_address].feeContract = _value; return true; } function getTokenfxUSDBPSRate(address _address) external view returns(uint) { - return tokens[_address].fxUSDBPSRate; + return entities[_address].fxUSDBPSRate; } } \ No newline at end of file From baceec3e4509da2d89ff52d79497b0137c313459 Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Sun, 27 Jan 2019 03:42:51 +0200 Subject: [PATCH 19/40] optimization fixes --- contracts/TokenIOERC20FeesApply.sol | 2 +- contracts/TokenIOStorage.sol | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index fa1ee03..02ddeca 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -205,7 +205,7 @@ contract TokenIOERC20FeesApply is Ownable { */ function transferFrom(address from, address to, uint amount) public notDeprecated { address feeContract = lib.getFeeContract(address(this)); - (string memory currency, address[3] memory addresses) = lib.getTransferDetails(address(this), [msg.sender, to, feeContract]); + (string memory currency, address[3] memory addresses) = lib.getTransferDetails(address(this), [from, to, feeContract]); uint fees = calculateFees(feeContract, amount); uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index ec8f722..7d6b386 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -1,7 +1,6 @@ pragma solidity 0.4.24; import "./Ownable.sol"; -import "./SafeMath.sol"; /** @@ -56,8 +55,6 @@ contract TokenIOStorage is Ownable { /// @dev key == `keccak256(param1, param2...)` /// @dev Nested mapping can be achieved using multiple params in keccak256 hash; - using SafeMath for uint; - struct Entity { string name; string symbol; From 46e3f90c885b4a988710b81bde5c99e1885035f7 Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Mon, 28 Jan 2019 12:44:55 +0200 Subject: [PATCH 20/40] add comments --- contracts/TokenIOLib.sol | 11 +++ contracts/TokenIOStorage.sol | 186 +++++++++++++++++++++++++++++------ 2 files changed, 169 insertions(+), 28 deletions(-) diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index d783e44..2245073 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -137,6 +137,17 @@ library TokenIOLib { return true; } + /** + * @notice Set fees for contract interface + * @dev fee can be set by the TokenIOFeeContract + * @dev | This method has an `internal` view + * @param self Internal storage proxying TokenIOStorage contract + * @param maxFee max fee value + * @param minFee min fee value + * @param bpsFee bps fee value + * @param flatFee flat fee value + * @return {"success" : "Returns true when successfully called from another contract"} + */ function setFees(Data storage self, uint maxFee, uint minFee, uint bpsFee, uint flatFee) internal returns (bool success) { return self.Storage.setFees(address(this), maxFee, minFee, bpsFee, flatFee); } diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 7d6b386..8ccb30c 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -55,7 +55,7 @@ contract TokenIOStorage is Ownable { /// @dev key == `keccak256(param1, param2...)` /// @dev Nested mapping can be achieved using multiple params in keccak256 hash; - struct Entity { + struct AssetDetails { string name; string symbol; string tla; @@ -73,18 +73,18 @@ contract TokenIOStorage is Ownable { mapping(address => mapping(string => uint256)) internal balances; - mapping(address => FeeData) internal fees; - mapping(address => address) internal relatedAccounts; - mapping(address => bool) internal isDeprecated; - mapping(string => uint) internal decimals; - mapping(address => Entity) internal entities; + mapping(address => FeeData) internal fees; + mapping(address => address) internal relatedAccounts; + mapping(address => bool) internal isDeprecated; + mapping(string => uint) internal decimals; + mapping(address => AssetDetails) internal assets; - mapping(bytes32 => uint256) internal uIntStorage; - mapping(bytes32 => string) internal stringStorage; - mapping(bytes32 => address) internal addressStorage; - mapping(bytes32 => bytes) internal bytesStorage; - mapping(bytes32 => bool) internal boolStorage; - mapping(bytes32 => int256) internal intStorage; + mapping(bytes32 => uint256) internal uIntStorage; + mapping(bytes32 => string) internal stringStorage; + mapping(bytes32 => address) internal addressStorage; + mapping(bytes32 => bytes) internal bytesStorage; + mapping(bytes32 => bool) internal boolStorage; + mapping(bytes32 => int256) internal intStorage; constructor() public { /// @notice owner is set to msg.sender by default @@ -241,7 +241,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the Uint value associated with the id key" } */ - function getUint(bytes32 _key) public view returns (uint _value) { + function getUint(bytes32 _key) external view returns (uint _value) { return uIntStorage[_key]; } @@ -281,33 +281,68 @@ contract TokenIOStorage is Ownable { return intStorage[_key]; } + /** + * @notice Get value from isDeprecated mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "_value" : "Returns the bool value associated with the key" } + */ function getDeprecated(address _address) external view returns (bool _value) { return isDeprecated[_address]; } + /** + * @notice Set value for isDeprecated mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @param _value The bool value to be set + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setDeprecated(address _address, bool _value) external onlyOwner returns (bool success) { isDeprecated[_address] = _value; return true; } + /** + * @notice Get value from fees mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "maxFee" : "Returns the max fee value", "minFee" : "Returns the min fee value", + "bpsFee" : "Returns the bps fee value", "flatFee": "Returns the flat fee value" } + */ function getFees(address _address) external view returns (uint maxFee, uint minFee, uint bpsFee, uint flatFee) { FeeData memory feeData = fees[_address]; return (feeData.maxFee, feeData.minFee, feeData.bpsFee, feeData.flatFee); } + /** + * @notice Set value for FeeData struct associated with address key + * @param _address Pointer identifier for FeeData + * @param maxFee max fee value + * @param minFee min fee value + * @param bpsFee bps fee value + * @param flatFee flat fee value + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setFees(address _address, uint maxFee, uint minFee, uint bpsFee, uint flatFee) external onlyOwner returns (bool success) { FeeData memory feeData = FeeData(maxFee, minFee, bpsFee, flatFee); fees[_address] = feeData; return true; } + /** + * @notice Get value from relatedAccount mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "_value" : "Returns the bool value associated with the key" } + */ function getRelatedAccount(address _address) external view returns (address value) { address relatedAddress = relatedAccounts[_address]; return (0x0 != relatedAddress) ? relatedAddress : _address; } - function getRelatedAccounts(address[3] _addresses) internal view returns (address[3] memory) { - address[3] memory relatedAddresses; + /** + * @notice Get value from relatedAccount mapping associated with address keys + * @param _addresses Pointer identifier for value in mapping + * @return { "_value" : "Returns the bool value associated with the key" } + */ + function getRelatedAccounts(address[3] _addresses) internal view returns (address[3] memory relatedAddresses) { for(uint i = 0; i < _addresses.length; i++) { relatedAddresses[i] = relatedAccounts[_addresses[i]]; relatedAddresses[i] = (0x0 != relatedAddresses[i]) ? relatedAddresses[i] : _addresses[i]; @@ -317,26 +352,51 @@ contract TokenIOStorage is Ownable { } function getTransferDetails(address _account, address[3] _addresses) external view returns(string memory currency, address[3] memory addresses) { - currency = entities[_account].symbol; + currency = assets[_account].symbol; addresses = getRelatedAccounts(_addresses); } + /** + * @notice Set value for relatedAccount mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @param _related related account address value + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setRelatedAccount(address _address, address _related) external onlyOwner returns (bool success) { relatedAccounts[_address] = _related; return true; } + /** + * @notice Get value from balances mapping associated with address and currency keys + * @param _address Pointer identifier for value in mapping + * @param _currency Pointer identifier for value in mapping + * @return { "_value" : "Returns the uint value associated with the keys" } + */ function getBalance(address _address, string _currency) external view returns (uint256 value) { //return getUint(keccak256(abi.encodePacked('token.balance', _address, _currency))); return balances[_address][_currency]; } + /** + * @notice Set value for balances mapping associated with address and currency keys + * @param _address Pointer identifier for value in mapping + * @param _currency Pointer identifier for value in mapping + * @param _value balance value + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setBalance(address _address, string _currency, uint _value) external onlyOwner returns (bool success) { //setUint(keccak256(abi.encodePacked('token.balance', _address, _currency)), _value); balances[_address][_currency] = _value; return true; } + /** + * @notice Set values for balances mapping associated with address and currency keys + * @param _addresses Pointer identifiers for values in mapping + * @param _currency Pointer identifier for value in mapping + * @param _values balance values + */ function setBalances(address[3] _addresses, string _currency, uint[3] _values) external onlyOwner { for(uint i = 0; i < _addresses.length; i++) { balances[_addresses[i]][_currency] = _values[i]; @@ -344,69 +404,139 @@ contract TokenIOStorage is Ownable { } function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { - entities[_address] = Entity(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); + assets[_address] = AssetDetails(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); decimals[_symbol] = _decimals; return true; } + /** + * @notice Get value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "string" : "Returns the string value associated with the key" } + */ function getTokenName(address _address) external view returns(string) { - return entities[_address].name; + return assets[_address].name; } + /** + * @notice Set value for assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @param _tokenName token name value + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setTokenName(address _address, string _tokenName) external onlyOwner returns(bool success) { - entities[_address].name = _tokenName; + assets[_address].name = _tokenName; return true; } + /** + * @notice Get value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "string" : "Returns the string value associated with the key" } + */ function getTokenSymbol(address _address) external view returns(string) { - return entities[_address].symbol; + return assets[_address].symbol; } + /** + * @notice Set value for assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @param _value token symbol value + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setTokenSymbol(address _address, string _value) external onlyOwner returns (bool success) { - entities[_address].symbol = _value; + assets[_address].symbol = _value; return true; } + /** + * @notice Get value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "string" : "Returns the string value associated with the key" } + */ function getTokenTLA(address _address) external view returns(string) { - return entities[_address].tla; + return assets[_address].tla; } + /** + * @notice Set value for assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @param _tokenTLA token TLA value + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setTokenTLA(address _address, string _tokenTLA) external onlyOwner returns(bool success) { - entities[_address].tla = _tokenTLA; + assets[_address].tla = _tokenTLA; return true; } + /** + * @notice Get value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "string" : "Returns the string value associated with the key" } + */ function getTokenVersion(address _address) external view returns(string) { - return entities[_address].version; + return assets[_address].version; } + /** + * @notice Set value for assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @param _tokenVersion token version value + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setTokenVersion(address _address, string _tokenVersion) external onlyOwner returns(bool success) { - entities[_address].version = _tokenVersion; + assets[_address].version = _tokenVersion; return true; } + /** + * @notice Get value from decimals mapping associated with currency key + * @param _currency Pointer identifier for value in mapping + * @return { "uint" : "Returns the uint value associated with the key" } + */ function getTokenDecimals(string _currency) external view returns(uint) { return decimals[_currency]; } + /** + * @notice Set value for decimals mapping associated with currency key + * @param _decimals decimals value + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setTokenDecimals(string _currency, uint _decimals) external onlyOwner returns(bool success) { decimals[_currency] = _decimals; return true; } + /** + * @notice Get value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "address" : "Returns the address value associated with the key" } + */ function getTokenFeeContract(address _address) external view returns(address) { - return entities[_address].feeContract; + return assets[_address].feeContract; } + /** + * @notice Set value for assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @param _value token fee contract address + * @return { "success" : "Returns true when successfully called from another contract" } + */ function setTokenFeeContract(address _address, address _value) external onlyOwner returns (bool success) { - entities[_address].feeContract = _value; + assets[_address].feeContract = _value; return true; } + /** + * @notice Get value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "uint" : "Returns the uint value associated with the key" } + */ function getTokenfxUSDBPSRate(address _address) external view returns(uint) { - return entities[_address].fxUSDBPSRate; + return assets[_address].fxUSDBPSRate; } } \ No newline at end of file From 0e7145e8422173d82423816b424762d2b18a0c87 Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Tue, 29 Jan 2019 20:46:33 +0200 Subject: [PATCH 21/40] add tests and delete functions --- contracts/TokenIOERC20FeesApply.sol | 8 +- contracts/TokenIOLib.sol | 14 ++- contracts/TokenIOStorage.sol | 129 ++++++++++++++++++++++++++-- test/TokenIOERC20FeesApply.js | 17 ---- test/TokenIOStorage.js | 85 ++++++++++++++++++ 5 files changed, 214 insertions(+), 39 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 02ddeca..6140ebf 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -74,10 +74,8 @@ contract TokenIOERC20FeesApply is Ownable { uint _decimals, address _feeContract, uint _fxUSDBPSRate - ) onlyOwner public returns (bool success) { - require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), - "Error: Unable to set token params. Please check arguments."); - return true; + ) onlyOwner public { + lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate); } /** @@ -198,7 +196,7 @@ contract TokenIOERC20FeesApply is Ownable { * @notice spender transfers from approvers account to the reciving account * @param from Approver's address * @param to Receiving address - * @param amount Transfer amount uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; + * @param amount Transfer amount uint[3] memory balanc9iies = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; * @return {"success" : "Returns true if transferFrom succeeds"} diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 2245073..94b39f7 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -47,11 +47,8 @@ library TokenIOLib { event AccountForward(address indexed originalAccount, address indexed forwardedAccount); event NewAuthority(address indexed authority, string issuerFirm); - function setTokenParams(Data storage self, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal returns(bool res) { - require( - self.Storage.setTokenParams(address(this), _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), - "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract."); - return true; + function setTokenParams(Data storage self, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal { + self.Storage.setTokenParams(address(this), _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate); } /** @@ -526,14 +523,15 @@ library TokenIOLib { uint bpsFee; uint flatFee; - (maxFee, minFee, bpsFee, flatFee) = self.Storage.getFees(contractAddress); + (maxFee, minFee, bpsFee, flatFee) = self.Storage.getFees(contractAddress); // get maxFee and max amount + // if amount > max amount return maxfee + + // uint fees = ((amount.mul(bpsFee)).div(10000)).add(flatFee); //return (fees < maxFee) ? fees : maxFee; - - if (fees > maxFee) { return maxFee; } else if (fees < minFee) { diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 8ccb30c..e631393 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -301,6 +301,16 @@ contract TokenIOStorage is Ownable { return true; } + /** + * @notice Delete value from isDeprecated mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteDeprecated(address _address) external onlyOwner returns (bool success) { + delete isDeprecated[_address]; + return true; + } + /** * @notice Get value from fees mapping associated with address key * @param _address Pointer identifier for value in mapping @@ -351,11 +361,6 @@ contract TokenIOStorage is Ownable { return relatedAddresses; } - function getTransferDetails(address _account, address[3] _addresses) external view returns(string memory currency, address[3] memory addresses) { - currency = assets[_account].symbol; - addresses = getRelatedAccounts(_addresses); - } - /** * @notice Set value for relatedAccount mapping associated with address key * @param _address Pointer identifier for value in mapping @@ -366,6 +371,21 @@ contract TokenIOStorage is Ownable { relatedAccounts[_address] = _related; return true; } + + /** + * @notice Delete value from relatedAccount mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteRelatedAccount(address _address) external onlyOwner returns (bool success) { + delete relatedAccounts[_address]; + return true; + } + + function getTransferDetails(address _account, address[3] _addresses) external view returns(string memory currency, address[3] memory addresses) { + currency = assets[_account].symbol; + addresses = getRelatedAccounts(_addresses); + } /** * @notice Get value from balances mapping associated with address and currency keys @@ -403,12 +423,22 @@ contract TokenIOStorage is Ownable { } } - function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { + /** + * @notice Delete value from balances mapping associated with address and currency keys + * @param _address Pointer identifier for value in mapping + * @param _currency Pointer identifier for value in mapping + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteBalance(address _address, string _currency) external onlyOwner returns (bool success) { + //setUint(keccak256(abi.encodePacked('token.balance', _address, _currency)), _value); + delete balances[_address][_currency]; + return true; + } + + function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner { assets[_address] = AssetDetails(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); decimals[_symbol] = _decimals; - - return true; } /** @@ -431,6 +461,16 @@ contract TokenIOStorage is Ownable { return true; } + /** + * @notice Delete value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteTokenName(address _address) external onlyOwner returns(bool success) { + delete assets[_address].name; + return true; + } + /** * @notice Get value from assetsDetails struct in assets mapping associated with address key * @param _address Pointer identifier for value in mapping @@ -451,6 +491,16 @@ contract TokenIOStorage is Ownable { return true; } + /** + * @notice Delete value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteTokenSymbol(address _address) external onlyOwner returns (bool success) { + delete assets[_address].symbol; + return true; + } + /** * @notice Get value from assetsDetails struct in assets mapping associated with address key * @param _address Pointer identifier for value in mapping @@ -471,6 +521,16 @@ contract TokenIOStorage is Ownable { return true; } + /** + * @notice Delete value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteTokenTLA(address _address) external onlyOwner returns(bool success) { + delete assets[_address].tla; + return true; + } + /** * @notice Get value from assetsDetails struct in assets mapping associated with address key * @param _address Pointer identifier for value in mapping @@ -491,6 +551,16 @@ contract TokenIOStorage is Ownable { return true; } + /** + * @notice Delete value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteTokenVersion(address _address) external onlyOwner returns(bool success) { + delete assets[_address].version; + return true; + } + /** * @notice Get value from decimals mapping associated with currency key * @param _currency Pointer identifier for value in mapping @@ -510,6 +580,16 @@ contract TokenIOStorage is Ownable { return true; } + /** + * @notice Delete value from decimals mapping associated with currency key + * @param _currency decimals value + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteTokenDecimals(string _currency) external onlyOwner returns(bool success) { + delete decimals[_currency]; + return true; + } + /** * @notice Get value from assetsDetails struct in assets mapping associated with address key * @param _address Pointer identifier for value in mapping @@ -530,13 +610,44 @@ contract TokenIOStorage is Ownable { return true; } + /** + * @notice Set value for assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "success" : "Returns true when successfully called from another contract" } + */ + function deleteTokenFeeContract(address _address) external onlyOwner returns (bool success) { + delete assets[_address].feeContract; + return true; + } + /** * @notice Get value from assetsDetails struct in assets mapping associated with address key * @param _address Pointer identifier for value in mapping * @return { "uint" : "Returns the uint value associated with the key" } */ - function getTokenfxUSDBPSRate(address _address) external view returns(uint) { + function getTokenfxUSDBPSRate(address _address, uint _fxUSDBPSRate) external view returns(uint) { return assets[_address].fxUSDBPSRate; } + /** + * @notice Set value for assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @param _fxUSDBPSRate usdbps rate + * @return { "uint" : "Returns the uint value associated with the key" } + */ + function setTokenfxUSDBPSRate(address _address, uint _fxUSDBPSRate) external view returns(bool success) { + assets[_address].fxUSDBPSRate = _fxUSDBPSRate; + return true; + } + + /** + * @notice Delete value from assetsDetails struct in assets mapping associated with address key + * @param _address Pointer identifier for value in mapping + * @return { "uint" : "Returns the uint value associated with the key" } + */ + function deleteTokenfxUSDBPSRate(address _address) external view returns(bool success) { + delete assets[_address].fxUSDBPSRate; + return true; + } + } \ No newline at end of file diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js index 591f4c6..cba6ca9 100644 --- a/test/TokenIOERC20FeesApply.js +++ b/test/TokenIOERC20FeesApply.js @@ -23,23 +23,6 @@ contract("TokenIOERC20FeesApply", function(accounts) { /* PARAMETERS */ - it(`Gas checker`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20FeesApply.deployed() - - var gas = await erc20.name.estimateGas() - console.log("name gas estimation = " + gas + " units") - - var gas = await erc20.totalSupply.estimateGas() - console.log("totalSupply gas estimation = " + gas + " units") - - var gas = await erc20.getFeeParams.estimateGas() - console.log("getFeeParams gas estimation = " + gas + " units") - - var gas = await erc20.deprecateInterface.estimateGas() - console.log("deprecateInterface gas estimation = " + gas + " units") - }) - it(`TOKEN_PARAMS :should correctly set parameters according to c 'token.config.js' [name, symbol, tla, decimals]`, async () => { diff --git a/test/TokenIOStorage.js b/test/TokenIOStorage.js index ebc98d9..900564f 100644 --- a/test/TokenIOStorage.js +++ b/test/TokenIOStorage.js @@ -164,6 +164,91 @@ contract("TokenIOStorage", function(accounts) { assert.equal(0, GET_VALUE_END, "Int value should be deleted from storage.") }) + it("Should set, get and delete token name value", async () => { + const storage = await TokenIOStorage.deployed() + const id = "0x166a8e28b4afdb04d6ce602644452c71e9f5f885"; // test account + const value = "test" + const SET_TX = await storage.setTokenName(id, value) + assert.equal(SET_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_BEG = await storage.getTokenName(id) + assert.equal(value, GET_VALUE_BEG, "Int value should be the same value retrieved from storage.") + + const DELETE_TX = await storage.deleteTokenName(id) + assert.equal(DELETE_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_END = await storage.getTokenName(id) + assert.equal("", GET_VALUE_END, "String value should be deleted from storage.") + }) + + it("Should set, get and delete token symbol value", async () => { + const storage = await TokenIOStorage.deployed() + const id = "0x166a8e28b4afdb04d6ce602644452c71e9f5f885"; // test account + const value = "test symbol" + const SET_TX = await storage.setTokenSymbol(id, value) + assert.equal(SET_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_BEG = await storage.getTokenSymbol(id) + assert.equal(value, GET_VALUE_BEG, "Int value should be the same value retrieved from storage.") + + const DELETE_TX = await storage.deleteTokenSymbol(id) + assert.equal(DELETE_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_END = await storage.getTokenSymbol(id) + assert.equal("", GET_VALUE_END, "String value should be deleted from storage.") + }) + + it("Should set, get and delete TLA value", async () => { + const storage = await TokenIOStorage.deployed() + const id = "0x166a8e28b4afdb04d6ce602644452c71e9f5f885"; // test account + const value = "test TLA" + const SET_TX = await storage.setTokenTLA(id, value) + assert.equal(SET_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_BEG = await storage.getTokenTLA(id) + assert.equal(value, GET_VALUE_BEG, "Int value should be the same value retrieved from storage.") + + const DELETE_TX = await storage.deleteTokenTLA(id) + assert.equal(DELETE_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_END = await storage.getTokenTLA(id) + assert.equal("", GET_VALUE_END, "String value should be deleted from storage.") + }) + + it("Should set, get and delete token version value", async () => { + const storage = await TokenIOStorage.deployed() + const id = "0x166a8e28b4afdb04d6ce602644452c71e9f5f885"; // test account + const value = "test Token version" + const SET_TX = await storage.setTokenVersion(id, value) + assert.equal(SET_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_BEG = await storage.getTokenVersion(id) + assert.equal(value, GET_VALUE_BEG, "Int value should be the same value retrieved from storage.") + + const DELETE_TX = await storage.deleteTokenVersion(id) + assert.equal(DELETE_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_END = await storage.getTokenVersion(id) + assert.equal("", GET_VALUE_END, "String value should be deleted from storage.") + }) + + it("Should set, get and delete token fee contract", async () => { + const storage = await TokenIOStorage.deployed() + const id = "0x166a8e28b4afdb04d6ce602644452c71e9f5f885"; // test account + const value = "0x3fd181cf0594b266ee8187e1dad94de229c98192" + const SET_TX = await storage.setTokenFeeContract(id, value) + assert.equal(SET_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_BEG = await storage.getTokenFeeContract(id) + assert.equal(value, GET_VALUE_BEG, "Int value should be the same value retrieved from storage.") + + const DELETE_TX = await storage.deleteTokenFeeContract(id) + assert.equal(DELETE_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const GET_VALUE_END = await storage.getTokenFeeContract(id) + assert.equal("0x0000000000000000000000000000000000000000", GET_VALUE_END, "String value should be deleted from storage.") + }) + it("Should not allow an unauthorized account to set or delete a storage value", async () => { try { const storage = await TokenIOStorage.deployed() From f55e0aacbb185ae1a13d9130ea1cc82e54aaa7bf Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Wed, 30 Jan 2019 16:50:55 +0200 Subject: [PATCH 22/40] fix code before PR --- contracts/TokenIOERC20FeesApply.sol | 28 +++++++++++++++++++--------- contracts/TokenIOFeeContract.sol | 1 - contracts/TokenIOLib.sol | 22 ++++++++++------------ contracts/TokenIOStorage.sol | 16 +++++++++------- test/TokenIOFeeContract.js | 3 +-- 5 files changed, 39 insertions(+), 31 deletions(-) diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 6140ebf..0cf67ba 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -74,8 +74,9 @@ contract TokenIOERC20FeesApply is Ownable { uint _decimals, address _feeContract, uint _fxUSDBPSRate - ) onlyOwner public { - lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate); + ) onlyOwner public returns(bool success) { + require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Error: Unable to set token params. Please check arguments."); } /** @@ -180,35 +181,42 @@ contract TokenIOERC20FeesApply is Ownable { * @param amount Transfer amount * @return {"success" : "Returns true if transfer succeeds"} */ - function transfer(address to, uint amount) public notDeprecated { + function transfer(address to, uint amount) public notDeprecated returns(bool success) { address feeContract = lib.getFeeContract(address(this)); (string memory currency, address[3] memory addresses) = lib.getTransferDetails(address(this), [msg.sender, to, feeContract]); uint fees = calculateFees(feeContract, amount); uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; - lib.Storage.setBalances(addresses, currency, balances); + require( + lib.Storage.setBalances(addresses, currency, balances), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); + emit Transfer(msg.sender, to, amount); + + return true; } /** * @notice spender transfers from approvers account to the reciving account * @param from Approver's address * @param to Receiving address - * @param amount Transfer amount uint[3] memory balanc9iies = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; - - + * @param amount Transfer amount * @return {"success" : "Returns true if transferFrom succeeds"} */ - function transferFrom(address from, address to, uint amount) public notDeprecated { + function transferFrom(address from, address to, uint amount) public notDeprecated returns(bool success) { address feeContract = lib.getFeeContract(address(this)); (string memory currency, address[3] memory addresses) = lib.getTransferDetails(address(this), [from, to, feeContract]); uint fees = calculateFees(feeContract, amount); uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; - lib.Storage.setBalances(addresses, currency, balances); + require( + lib.Storage.setBalances(addresses, currency, balances), + "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." + ); /// @notice This transaction will fail if the msg.sender does not have an approved allowance. require( @@ -217,6 +225,8 @@ contract TokenIOERC20FeesApply is Ownable { ); emit Transfer(from, to, amount); + + return true; } /** diff --git a/contracts/TokenIOFeeContract.sol b/contracts/TokenIOFeeContract.sol index 811684f..ddd6929 100644 --- a/contracts/TokenIOFeeContract.sol +++ b/contracts/TokenIOFeeContract.sol @@ -100,7 +100,6 @@ contract TokenIOFeeContract is Ownable { return lib.calculateFees(address(this), amount); } - /** * @notice Transfer collected fees to another account; onlyOwner * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx) diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 94b39f7..59ad556 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -47,8 +47,11 @@ library TokenIOLib { event AccountForward(address indexed originalAccount, address indexed forwardedAccount); event NewAuthority(address indexed authority, string issuerFirm); - function setTokenParams(Data storage self, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal { - self.Storage.setTokenParams(address(this), _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate); + function setTokenParams(Data storage self, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal returns(bool success) { + require( + self.Storage.setTokenParams(address(this), _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract."); + return true; } /** @@ -139,10 +142,10 @@ library TokenIOLib { * @dev fee can be set by the TokenIOFeeContract * @dev | This method has an `internal` view * @param self Internal storage proxying TokenIOStorage contract - * @param maxFee max fee value - * @param minFee min fee value - * @param bpsFee bps fee value - * @param flatFee flat fee value + * @param maxFee Maximum fee for interface contract transactions + * @param minFee Minimum fee for interface contract transactions + * @param bpsFee Basis points fee for interface contract transactions + * @param flatFee Flat fee for interface contract transactions * @return {"success" : "Returns true when successfully called from another contract"} */ function setFees(Data storage self, uint maxFee, uint minFee, uint bpsFee, uint flatFee) internal returns (bool success) { @@ -523,15 +526,10 @@ library TokenIOLib { uint bpsFee; uint flatFee; - (maxFee, minFee, bpsFee, flatFee) = self.Storage.getFees(contractAddress); // get maxFee and max amount - // if amount > max amount return maxfee - - // + (maxFee, minFee, bpsFee, flatFee) = self.Storage.getFees(contractAddress); uint fees = ((amount.mul(bpsFee)).div(10000)).add(flatFee); - //return (fees < maxFee) ? fees : maxFee; - if (fees > maxFee) { return maxFee; } else if (fees < minFee) { diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index e631393..5d778d7 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -325,10 +325,10 @@ contract TokenIOStorage is Ownable { /** * @notice Set value for FeeData struct associated with address key * @param _address Pointer identifier for FeeData - * @param maxFee max fee value - * @param minFee min fee value - * @param bpsFee bps fee value - * @param flatFee flat fee value + * @param maxFee Maximum fee for interface contract transactions + * @param minFee Minimum fee for interface contract transactions + * @param bpsFee Basis points fee for interface contract transactions + * @param flatFee Flat fee for interface contract transactions * @return { "success" : "Returns true when successfully called from another contract" } */ function setFees(address _address, uint maxFee, uint minFee, uint bpsFee, uint flatFee) external onlyOwner returns (bool success) { @@ -416,11 +416,13 @@ contract TokenIOStorage is Ownable { * @param _addresses Pointer identifiers for values in mapping * @param _currency Pointer identifier for value in mapping * @param _values balance values + * @return { "success" : "Returns true when successfully called from another contract" } */ - function setBalances(address[3] _addresses, string _currency, uint[3] _values) external onlyOwner { + function setBalances(address[3] _addresses, string _currency, uint[3] _values) external onlyOwner returns(bool success) { for(uint i = 0; i < _addresses.length; i++) { balances[_addresses[i]][_currency] = _values[i]; } + return true; } /** @@ -435,10 +437,10 @@ contract TokenIOStorage is Ownable { return true; } - function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner { + function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { assets[_address] = AssetDetails(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); - decimals[_symbol] = _decimals; + return true; } /** diff --git a/test/TokenIOFeeContract.js b/test/TokenIOFeeContract.js index 258f6aa..8ea83ab 100644 --- a/test/TokenIOFeeContract.js +++ b/test/TokenIOFeeContract.js @@ -22,7 +22,7 @@ contract("TokenIOFeeContract", function(accounts) { const DEPOSIT_AMOUNT = 10000e2 // 1 million USD; 2 decimal representation const TRANSFER_AMOUNT = DEPOSIT_AMOUNT/4 const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 - + it("Should transfer an amount of funds and send the fees to the fee contract", async () => { const CA = await TokenIOCurrencyAuthority.deployed() const token = await TokenIOERC20.deployed() @@ -45,7 +45,6 @@ contract("TokenIOFeeContract", function(accounts) { const TX_FEES = +(await token.calculateFees(TRANSFER_AMOUNT)).toString() assert.equal(FEE_CONTRACT_BALANCE, TX_FEES, "Fee contract should have a balance equal to the transaction fees") - }) it("Should allow the fee contract to transfer an amount of tokens", async () => { From 78b24f63c70dab2bd1e0b4210fc7b38967120b1e Mon Sep 17 00:00:00 2001 From: Rostyslav Bortman Date: Wed, 30 Jan 2019 22:05:18 +0200 Subject: [PATCH 23/40] fix code before meeting --- contracts/TokenIOERC20.sol | 7 +++---- contracts/TokenIOFeeContract.sol | 1 + contracts/TokenIOMerchant.sol | 2 +- contracts/TokenIOStorage.sol | 18 +++++++++--------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contracts/TokenIOERC20.sol b/contracts/TokenIOERC20.sol index 4df8477..4c6f182 100644 --- a/contracts/TokenIOERC20.sol +++ b/contracts/TokenIOERC20.sol @@ -165,10 +165,9 @@ contract TokenIOERC20 is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { - address feeContract = lib.getFeeContract(address(this)); - (max, min, bps, flat) = lib.getFees(feeContract); - feeMsg = lib.getFeeMsg(feeContract); - feeAccount = feeContract; + feeAccount = lib.getFeeContract(address(this)); + (max, min, bps, flat) = lib.getFees(feeAccount); + feeMsg = lib.getFeeMsg(feeAccount); } /** diff --git a/contracts/TokenIOFeeContract.sol b/contracts/TokenIOFeeContract.sol index ddd6929..811684f 100644 --- a/contracts/TokenIOFeeContract.sol +++ b/contracts/TokenIOFeeContract.sol @@ -100,6 +100,7 @@ contract TokenIOFeeContract is Ownable { return lib.calculateFees(address(this), amount); } + /** * @notice Transfer collected fees to another account; onlyOwner * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx) diff --git a/contracts/TokenIOMerchant.sol b/contracts/TokenIOMerchant.sol index 77c4b6f..ac18068 100644 --- a/contracts/TokenIOMerchant.sol +++ b/contracts/TokenIOMerchant.sol @@ -72,7 +72,7 @@ contract TokenIOMerchant is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { - address feeContract = lib.getFeeContract(address(this)); + address feeContract = lib.getFeeContract(address(this)); (max, min, bps, flat) = lib.getFees(feeContract); feeMsg = lib.getFeeMsg(feeContract); feeAccount = feeContract; diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 5d778d7..6226dbb 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -50,10 +50,10 @@ contract TokenIOStorage is Ownable { /// @dev mapping for Primitive Data Types; - /// @notice primitive data mappings have `internal` view; - /// @dev only the derived contract can use the internal methods; - /// @dev key == `keccak256(param1, param2...)` - /// @dev Nested mapping can be achieved using multiple params in keccak256 hash; + /// @notice primitive data mappings have `internal` view; + /// @dev only the derived contract can use the internal methods; + /// @dev key == `keccak256(param1, param2...)` + /// @dev Nested mapping can be achieved using multiple params in keccak256 hash; struct AssetDetails { string name; @@ -87,9 +87,9 @@ contract TokenIOStorage is Ownable { mapping(bytes32 => int256) internal intStorage; constructor() public { - /// @notice owner is set to msg.sender by default - /// @dev consider removing in favor of setting ownership in inherited - /// contract + /// @notice owner is set to msg.sender by default + /// @dev consider removing in favor of setting ownership in inherited + /// contract owner[msg.sender] = true; } @@ -162,8 +162,8 @@ contract TokenIOStorage is Ownable { } /// @dev Delete Key Methods - /// @dev delete methods may be unnecessary; Use set methods to set values - /// to default? + /// @dev delete methods may be unnecessary; Use set methods to set values + /// to default? /** * @notice Delete value for Address associated with bytes32 id key From 14069f33401984ef4447209c9f6a695dffbe69b8 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Fri, 1 Feb 2019 15:10:11 +0200 Subject: [PATCH 24/40] fix formatting --- contracts/TokenIOFeeContract.sol | 2 +- test/TokenIOFeeContract.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/TokenIOFeeContract.sol b/contracts/TokenIOFeeContract.sol index 811684f..f22efed 100644 --- a/contracts/TokenIOFeeContract.sol +++ b/contracts/TokenIOFeeContract.sol @@ -78,7 +78,7 @@ contract TokenIOFeeContract is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeContract) { - (max, min, bps, flat) = lib.getFees(address(this)); + (max, min, bps, flat) = lib.getFees(address(this)); feeMsg = lib.getFeeMsg(address(this)); feeContract = address(this); } diff --git a/test/TokenIOFeeContract.js b/test/TokenIOFeeContract.js index 8ea83ab..4a753f2 100644 --- a/test/TokenIOFeeContract.js +++ b/test/TokenIOFeeContract.js @@ -21,8 +21,8 @@ contract("TokenIOFeeContract", function(accounts) { const TEST_ACCOUNT_3 = accounts[2] const DEPOSIT_AMOUNT = 10000e2 // 1 million USD; 2 decimal representation const TRANSFER_AMOUNT = DEPOSIT_AMOUNT/4 - const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 - + const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 + it("Should transfer an amount of funds and send the fees to the fee contract", async () => { const CA = await TokenIOCurrencyAuthority.deployed() const token = await TokenIOERC20.deployed() From 6130966a01bddf2e85e9b94e4d1b49b28aeb3340 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Fri, 1 Feb 2019 15:28:57 +0200 Subject: [PATCH 25/40] remove excess --- package-lock.json | 114 +++++++--------------------------- test/TokenIOERC20FeesApply.js | 9 --- truffle.js | 14 ++--- 3 files changed, 28 insertions(+), 109 deletions(-) diff --git a/package-lock.json b/package-lock.json index 85493e5..02ecdf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tokeninc-smart-contracts", - "version": "1.0.1", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1016,7 +1016,8 @@ "crypto-js": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", - "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=" + "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=", + "dev": true }, "dashdash": { "version": "1.14.1", @@ -1030,6 +1031,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -1096,9 +1098,9 @@ "dev": true }, "dotenv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", - "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.0.0.tgz", + "integrity": "sha512-FlWbnhgjtwD+uNLUGHbMykMOYQaTivdHEmYwAKFjn6GKe/CqY0fNae93ZHTd20snh9ZLr8mTzIL9m0APQ1pjQg==", "dev": true }, "drbg.js": { @@ -1264,8 +1266,17 @@ "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799", "ethereumjs-util": "^5.1.1" + }, + "dependencies": { + "ethereumjs-abi": { + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", + "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", + "requires": { + "bn.js": "^4.10.0", + "ethereumjs-util": "^5.0.0" + } + } } }, "eth-tx-summary": { @@ -1368,14 +1379,6 @@ "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" }, - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799", - "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^5.0.0" - } - }, "ethereumjs-account": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", @@ -3176,83 +3179,6 @@ "solc": "0.4.24" } }, - "truffle-blockchain-utils": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.5.tgz", - "integrity": "sha1-pOXAZNrdafeCoTfz0nbSEJXaekc=" - }, - "truffle-contract": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/truffle-contract/-/truffle-contract-3.0.6.tgz", - "integrity": "sha1-Lvb8Mtf6r6n0rtjlAAGp/eo0IZI=", - "requires": { - "ethjs-abi": "0.1.8", - "truffle-blockchain-utils": "^0.0.5", - "truffle-contract-schema": "^2.0.1", - "truffle-error": "^0.0.3", - "web3": "0.20.6" - }, - "dependencies": { - "bignumber.js": { - "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git" - }, - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - }, - "ethjs-abi": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.1.8.tgz", - "integrity": "sha1-zSiFg+1ijN+tr4re+juh28vKbBg=", - "requires": { - "bn.js": "4.11.6", - "js-sha3": "0.5.5", - "number-to-bn": "1.7.0" - } - }, - "js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=" - }, - "web3": { - "version": "0.20.6", - "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz", - "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", - "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "crypto-js": "^3.1.4", - "utf8": "^2.1.1", - "xhr2": "*", - "xmlhttprequest": "*" - } - } - } - }, - "truffle-contract-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/truffle-contract-schema/-/truffle-contract-schema-2.0.1.tgz", - "integrity": "sha1-m/gh0y4m5nS6FetdQPlrELHJ1Wg=", - "requires": { - "ajv": "^5.1.1", - "crypto-js": "^3.1.9-1", - "debug": "^3.1.0" - }, - "dependencies": { - "crypto-js": { - "version": "3.1.9-1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", - "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" - } - } - }, - "truffle-error": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/truffle-error/-/truffle-error-0.0.3.tgz", - "integrity": "sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o=" - }, "truffle-hdwallet-provider": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/truffle-hdwallet-provider/-/truffle-hdwallet-provider-0.0.5.tgz", @@ -3293,7 +3219,8 @@ "utf8": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", - "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=" + "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=", + "dev": true }, "util-deprecate": { "version": "1.0.2", @@ -3417,7 +3344,8 @@ "xhr2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", - "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=", + "dev": true }, "xmlhttprequest": { "version": "1.8.0", diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js index cba6ca9..9b390a9 100644 --- a/test/TokenIOERC20FeesApply.js +++ b/test/TokenIOERC20FeesApply.js @@ -54,9 +54,6 @@ contract("TokenIOERC20FeesApply", function(accounts) { const erc20 = await TokenIOERC20FeesApply.deployed() await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - var gas = await erc20.setParams.estimateGas(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - console.log("setParams gas estimation = " + gas + " units") - const balance = await erc20.balanceOf(TEST_ACCOUNT_1) assert.equal(balance, 0) }) @@ -94,12 +91,8 @@ contract("TokenIOERC20FeesApply", function(accounts) { assert.equal(balance1, DEPOSIT_AMOUNT, "first account should contain all the deposit initially") assert.equal(balance2, 0, "Second account should have zero balance") - var gas = await erc20.transfer.estimateGas(TEST_ACCOUNT_2, TRANSFER_AMOUNT) - console.log("transfer gas estimation = " + gas + " units") - const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) - const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() const balance2b = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() @@ -155,8 +148,6 @@ contract("TokenIOERC20FeesApply", function(accounts) { assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) const TRANSFER_FROM_AMOUNT = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - var gas = await erc20.transferFrom.estimateGas(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) - console.log("transferFrom gas estimation = " + gas + " units") const transferFromReceipt = await erc20.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) const TX_FEES = +(await erc20.calculateFees(TRANSFER_FROM_AMOUNT)).toString() diff --git a/truffle.js b/truffle.js index af369d4..c25fba8 100644 --- a/truffle.js +++ b/truffle.js @@ -6,16 +6,16 @@ const NonceTrackerSubprovider = require("web3-provider-engine/subproviders/nonce module.exports = { networks: { develop: { - host: "127.0.0.1", - port: 7545, - network_id: "5777", // Match any network id - gas: 6000000 + host: "0.0.0.0", + port: 9545, + network_id: "*", // Match any network id + gas: 7e6 }, poa: { host: "104.236.47.153", port: 4000, network_id: 9, // Match any network id - gas: 8e6 + gas: 8e6 }, ropsten: { provider: () => { @@ -26,7 +26,7 @@ module.exports = { return wallet; }, network_id: 3, - gas: 8000000 + gas: 47e5 }, mainnet: { provider: () => { @@ -48,4 +48,4 @@ module.exports = { }, version: '0.4.24' } -}; +}; \ No newline at end of file From a47f73a19824e3ba508a59500f05bdb4752c7fdb Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Sun, 10 Feb 2019 15:49:21 +0200 Subject: [PATCH 26/40] apply optimization changes for all contracts --- contracts/TokenIOERC20Unlimited.sol | 17 ++--------------- contracts/TokenIOFeeContract.sol | 2 +- contracts/TokenIOLib.sol | 4 ++-- contracts/TokenIOStableSwap.sol | 12 +----------- contracts/TokenIOStorage.sol | 4 ++-- 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/contracts/TokenIOERC20Unlimited.sol b/contracts/TokenIOERC20Unlimited.sol index d0fb08b..80f2eca 100644 --- a/contracts/TokenIOERC20Unlimited.sol +++ b/contracts/TokenIOERC20Unlimited.sol @@ -72,21 +72,8 @@ contract TokenIOERC20Unlimited is Ownable { address _feeContract, uint _fxUSDBPSRate ) onlyOwner public returns (bool success) { - require(lib.setTokenName(_name), - "Error: Unable to set token name. Please check arguments."); - require(lib.setTokenSymbol(_symbol), - "Error: Unable to set token symbol. Please check arguments."); - require(lib.setTokenTLA(_tla), - "Error: Unable to set token TLA. Please check arguments."); - require(lib.setTokenVersion(_version), - "Error: Unable to set token version. Please check arguments."); - require(lib.setTokenDecimals(_symbol, _decimals), - "Error: Unable to set token decimals. Please check arguments."); - require(lib.setFeeContract(_feeContract), - "Error: Unable to set fee contract. Please check arguments."); - require(lib.setFxUSDBPSRate(_symbol, _fxUSDBPSRate), - "Error: Unable to set fx USD basis points rate. Please check arguments."); - return true; + require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Error: Unable to set token params. Please check arguments."); } /** diff --git a/contracts/TokenIOFeeContract.sol b/contracts/TokenIOFeeContract.sol index f22efed..562baf6 100644 --- a/contracts/TokenIOFeeContract.sol +++ b/contracts/TokenIOFeeContract.sol @@ -62,7 +62,7 @@ contract TokenIOFeeContract is Ownable { * returns {"success" : "Returns true if successfully called from another contract"} */ function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes feeMsg) public onlyOwner returns (bool success) { - require(lib.setFees(feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings"); + require(lib.setFees(address(this), feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings"); require(lib.setFeeMsg(feeMsg), "Error: Unable to set fee contract default message."); return true; } diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 59ad556..99abb61 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -148,8 +148,8 @@ library TokenIOLib { * @param flatFee Flat fee for interface contract transactions * @return {"success" : "Returns true when successfully called from another contract"} */ - function setFees(Data storage self, uint maxFee, uint minFee, uint bpsFee, uint flatFee) internal returns (bool success) { - return self.Storage.setFees(address(this), maxFee, minFee, bpsFee, flatFee); + function setFees(Data storage self, address asset, uint maxFee, uint minFee, uint bpsFee, uint flatFee) internal returns (bool success) { + return self.Storage.setFees(asset, maxFee, minFee, bpsFee, flatFee); } /** diff --git a/contracts/TokenIOStableSwap.sol b/contracts/TokenIOStableSwap.sol index ffb360f..8c06113 100644 --- a/contracts/TokenIOStableSwap.sol +++ b/contracts/TokenIOStableSwap.sol @@ -181,17 +181,7 @@ contract TokenIOStableSwap is Ownable { function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner notDeprecated returns (bool success) { /// @dev This method bypasses the setFee library methods and directly sets the fee params for a requested asset. /// @notice Fees can be different per asset. Some assets may have different liquidity requirements. - require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.max', asset)), feeMax), - 'Error: Failed to set fee parameters with storage contract. Please check permissions.'); - - require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.min', asset)), feeMin), - 'Error: Failed to set fee parameters with storage contract. Please check permissions.'); - - require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.bps', asset)), feeBps), - 'Error: Failed to set fee parameters with storage contract. Please check permissions.'); - - require(lib.Storage.setUint(keccak256(abi.encodePacked('fee.flat', asset)), feeFlat), - 'Error: Failed to set fee parameters with storage contract. Please check permissions.'); + require(lib.setFees(asset, feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings"); return true; } diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 6226dbb..5578040 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -637,7 +637,7 @@ contract TokenIOStorage is Ownable { * @param _fxUSDBPSRate usdbps rate * @return { "uint" : "Returns the uint value associated with the key" } */ - function setTokenfxUSDBPSRate(address _address, uint _fxUSDBPSRate) external view returns(bool success) { + function setTokenfxUSDBPSRate(address _address, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { assets[_address].fxUSDBPSRate = _fxUSDBPSRate; return true; } @@ -647,7 +647,7 @@ contract TokenIOStorage is Ownable { * @param _address Pointer identifier for value in mapping * @return { "uint" : "Returns the uint value associated with the key" } */ - function deleteTokenfxUSDBPSRate(address _address) external view returns(bool success) { + function deleteTokenfxUSDBPSRate(address _address) external onlyOwner returns(bool success) { delete assets[_address].fxUSDBPSRate; return true; } From f21b78471a825f855896841ab5e9fb1e430ebe93 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Sun, 10 Feb 2019 17:40:01 +0200 Subject: [PATCH 27/40] fix bug with fxUSDBPSRate parameter --- contracts/TokenIOERC20.sol | 21 +++------------------ contracts/TokenIOERC20FeesApply.sol | 1 + contracts/TokenIOERC20Unlimited.sol | 1 + contracts/TokenIOLib.sol | 6 ++---- contracts/TokenIOStorage.sol | 23 ++++++++++++----------- 5 files changed, 19 insertions(+), 33 deletions(-) diff --git a/contracts/TokenIOERC20.sol b/contracts/TokenIOERC20.sol index 4c6f182..75d950a 100644 --- a/contracts/TokenIOERC20.sol +++ b/contracts/TokenIOERC20.sol @@ -35,10 +35,7 @@ contract TokenIOERC20 is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; - /** - * @notice Constructor method for ERC20 contract - * @param _storageContract address of TokenIOStorage contract - */ + constructor(address _storageContract) public { //// @dev Set the storage contract for the interface //// @dev This contract will be unable to use the storage constract until @@ -70,20 +67,8 @@ contract TokenIOERC20 is Ownable { address _feeContract, uint _fxUSDBPSRate ) onlyOwner public returns (bool success) { - require(lib.setTokenName(_name), - "Error: Unable to set token name. Please check arguments."); - require(lib.setTokenSymbol(_symbol), - "Error: Unable to set token symbol. Please check arguments."); - require(lib.setTokenTLA(_tla), - "Error: Unable to set token TLA. Please check arguments."); - require(lib.setTokenVersion(_version), - "Error: Unable to set token version. Please check arguments."); - require(lib.setTokenDecimals(_symbol, _decimals), - "Error: Unable to set token decimals. Please check arguments."); - require(lib.setFeeContract(_feeContract), - "Error: Unable to set fee contract. Please check arguments."); - require(lib.setFxUSDBPSRate(_symbol, _fxUSDBPSRate), - "Error: Unable to set fx USD basis points rate. Please check arguments."); + require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Error: Unable to set token params. Please check arguments."); return true; } diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 0cf67ba..3b83b60 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -77,6 +77,7 @@ contract TokenIOERC20FeesApply is Ownable { ) onlyOwner public returns(bool success) { require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Error: Unable to set token params. Please check arguments."); + return true; } /** diff --git a/contracts/TokenIOERC20Unlimited.sol b/contracts/TokenIOERC20Unlimited.sol index 80f2eca..abfb2e9 100644 --- a/contracts/TokenIOERC20Unlimited.sol +++ b/contracts/TokenIOERC20Unlimited.sol @@ -74,6 +74,7 @@ contract TokenIOERC20Unlimited is Ownable { ) onlyOwner public returns (bool success) { require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Error: Unable to set token params. Please check arguments."); + return true; } /** diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 99abb61..ab5f799 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -1188,9 +1188,8 @@ library TokenIOLib { * @return { "success": "Returns true if successfully called from another contract"} */ function setFxUSDBPSRate(Data storage self, string currency, uint bpsRate) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency)); require( - self.Storage.setUint(id, bpsRate), + self.Storage.setTokenfxUSDBPSRate(currency, bpsRate), "Error: Unable to update account spending period."); return true; @@ -1203,8 +1202,7 @@ library TokenIOLib { * @return {"usdAmount" : "Returns the foreign currency amount in USD"} */ function getFxUSDBPSRate(Data storage self, string currency) internal view returns (uint bpsRate) { - bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency)); - return self.Storage.getUint(id); + return self.Storage.getTokenfxUSDBPSRate(currency); } /** diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 5578040..817bab4 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -61,7 +61,6 @@ contract TokenIOStorage is Ownable { string tla; string version; address feeContract; - uint fxUSDBPSRate; } struct FeeData { @@ -77,6 +76,7 @@ contract TokenIOStorage is Ownable { mapping(address => address) internal relatedAccounts; mapping(address => bool) internal isDeprecated; mapping(string => uint) internal decimals; + mapping(string => uint) internal fxUSDBPSRates; mapping(address => AssetDetails) internal assets; mapping(bytes32 => uint256) internal uIntStorage; @@ -438,8 +438,9 @@ contract TokenIOStorage is Ownable { } function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { - assets[_address] = AssetDetails(_name, _symbol, _tla, _version, _feeContract, _fxUSDBPSRate); + assets[_address] = AssetDetails(_name, _symbol, _tla, _version, _feeContract); decimals[_symbol] = _decimals; + fxUSDBPSRates[_symbol] = _fxUSDBPSRate; return true; } @@ -624,31 +625,31 @@ contract TokenIOStorage is Ownable { /** * @notice Get value from assetsDetails struct in assets mapping associated with address key - * @param _address Pointer identifier for value in mapping + * @param _symbol Pointer identifier for value in mapping * @return { "uint" : "Returns the uint value associated with the key" } */ - function getTokenfxUSDBPSRate(address _address, uint _fxUSDBPSRate) external view returns(uint) { - return assets[_address].fxUSDBPSRate; + function getTokenfxUSDBPSRate(string _symbol) external view returns(uint) { + return fxUSDBPSRates[_symbol]; } /** * @notice Set value for assetsDetails struct in assets mapping associated with address key - * @param _address Pointer identifier for value in mapping + * @param _symbol Pointer identifier for value in mapping * @param _fxUSDBPSRate usdbps rate * @return { "uint" : "Returns the uint value associated with the key" } */ - function setTokenfxUSDBPSRate(address _address, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { - assets[_address].fxUSDBPSRate = _fxUSDBPSRate; + function setTokenfxUSDBPSRate(string _symbol, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { + fxUSDBPSRates[_symbol] = _fxUSDBPSRate; return true; } /** * @notice Delete value from assetsDetails struct in assets mapping associated with address key - * @param _address Pointer identifier for value in mapping + * @param _symbol Pointer identifier for value in mapping * @return { "uint" : "Returns the uint value associated with the key" } */ - function deleteTokenfxUSDBPSRate(address _address) external onlyOwner returns(bool success) { - delete assets[_address].fxUSDBPSRate; + function deleteTokenfxUSDBPSRate(string _symbol) external onlyOwner returns(bool success) { + delete fxUSDBPSRates[_symbol]; return true; } From 182257d8770da4e25ead61b982260486ee3cf7e7 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Sun, 10 Feb 2019 17:41:17 +0200 Subject: [PATCH 28/40] add comments to constructor --- contracts/TokenIOERC20.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contracts/TokenIOERC20.sol b/contracts/TokenIOERC20.sol index 75d950a..87f362b 100644 --- a/contracts/TokenIOERC20.sol +++ b/contracts/TokenIOERC20.sol @@ -35,7 +35,10 @@ contract TokenIOERC20 is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; - + /** + * @notice Constructor method for ERC20 contract + * @param _storageContract address of TokenIOStorage contract + */ constructor(address _storageContract) public { //// @dev Set the storage contract for the interface //// @dev This contract will be unable to use the storage constract until From d31cbf061ad9bfb6e22be1eac5e41331c58273c1 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Sun, 10 Feb 2019 19:01:34 +0200 Subject: [PATCH 29/40] fees_apply_solidityVersionMigration --- contracts/ERC20Interface.sol | 2 +- contracts/Migrations.sol | 2 +- contracts/Ownable.sol | 2 +- contracts/SafeMath.sol | 2 +- contracts/TokenIOAuthority.sol | 14 ++-- contracts/TokenIOCurrencyAuthority.sol | 26 +++---- contracts/TokenIOERC20.sol | 20 +++--- contracts/TokenIOERC20FeesApply.sol | 20 +++--- contracts/TokenIOERC20Unlimited.sol | 18 ++--- contracts/TokenIOFX.sol | 6 +- contracts/TokenIOFeeContract.sol | 10 +-- contracts/TokenIOLib.sol | 94 +++++++++++++------------- contracts/TokenIOMerchant.sol | 6 +- contracts/TokenIONameSpace.sol | 4 +- contracts/TokenIOStableSwap.sol | 14 ++-- contracts/TokenIOStorage.sol | 56 +++++++-------- truffle.js | 8 +-- 17 files changed, 152 insertions(+), 152 deletions(-) diff --git a/contracts/ERC20Interface.sol b/contracts/ERC20Interface.sol index 5b583d0..3435f78 100644 --- a/contracts/ERC20Interface.sol +++ b/contracts/ERC20Interface.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.24; +pragma solidity 0.5.2; /** * @title ERC20 interface diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index cffe8b9..a5df4c0 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; contract Migrations { address public owner; diff --git a/contracts/Ownable.sol b/contracts/Ownable.sol index bfec508..e1be45d 100644 --- a/contracts/Ownable.sol +++ b/contracts/Ownable.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; diff --git a/contracts/SafeMath.sol b/contracts/SafeMath.sol index b9385d8..c2929ce 100644 --- a/contracts/SafeMath.sol +++ b/contracts/SafeMath.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; /** diff --git a/contracts/TokenIOAuthority.sol b/contracts/TokenIOAuthority.sol index e54fa59..abeccf4 100644 --- a/contracts/TokenIOAuthority.sol +++ b/contracts/TokenIOAuthority.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; /* COPYRIGHT 2018 Token, Inc. @@ -54,7 +54,7 @@ contract TokenIOAuthority is Ownable { * @param _authorized Authorization status * @return {"success" : "Returns true if lib.setRegisteredFirm succeeds"} */ - function setRegisteredFirm(string firmName, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) { + function setRegisteredFirm(string memory firmName, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) { /// @notice set firm registration status require( lib.setRegisteredFirm(firmName, _authorized), @@ -70,7 +70,7 @@ contract TokenIOAuthority is Ownable { * @param _authorized Authorization status * @return {"success" : "Returns true if lib.setRegisteredAuthority succeeds"} */ - function setRegisteredAuthority(string firmName, address authority, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) { + function setRegisteredAuthority(string memory firmName, address authority, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) { /// @notice set authority of firm to given status require( lib.setRegisteredAuthority(firmName, authority, _authorized), @@ -84,7 +84,7 @@ contract TokenIOAuthority is Ownable { * @param authority Address of authority account * @return {"firm" : "name of firm"} */ - function getFirmFromAuthority(address authority) public view returns (string firm) { + function getFirmFromAuthority(address authority) public view returns (string memory firm) { return lib.getFirmFromAuthority(authority); } @@ -93,7 +93,7 @@ contract TokenIOAuthority is Ownable { * @param firmName Name of firm * @return {"status" : "Returns status of firm registration"} */ - function isRegisteredFirm(string firmName) public view returns (bool status) { + function isRegisteredFirm(string memory firmName) public view returns (bool status) { /// @notice check firm's registration status return lib.isRegisteredFirm(firmName); } @@ -104,7 +104,7 @@ contract TokenIOAuthority is Ownable { * @param authority Address of authority account * @return {"registered" : "Returns status of account registration to firm"} */ - function isRegisteredToFirm(string firmName, address authority) public view returns (bool registered) { + function isRegisteredToFirm(string memory firmName, address authority) public view returns (bool registered) { /// @notice check if registered to firm return lib.isRegisteredToFirm(firmName, authority); } @@ -134,7 +134,7 @@ contract TokenIOAuthority is Ownable { } - modifier onlyAuthority(string firmName, address authority) { + modifier onlyAuthority(string memory firmName, address authority) { /// @notice throws if not an owner authority or not registered to the given firm require(owner[authority] || lib.isRegisteredToFirm(firmName, authority), "Error: Transaction sender does not have permission for this operation!" diff --git a/contracts/TokenIOCurrencyAuthority.sol b/contracts/TokenIOCurrencyAuthority.sol index 19f147c..e149702 100644 --- a/contracts/TokenIOCurrencyAuthority.sol +++ b/contracts/TokenIOCurrencyAuthority.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; import "./TokenIOStorage.sol"; @@ -51,7 +51,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param account Sepcified account address * @return { "balance": "Returns account balance"} */ - function getTokenBalance(string currency, address account) public view returns (uint balance) { + function getTokenBalance(string memory currency, address account) public view returns (uint balance) { return lib.getTokenBalance(currency, account); } @@ -60,7 +60,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param currency Currency symbol 'USDx' * @return { "supply": "Returns total supply of currency"} */ - function getTokenSupply(string currency) public view returns (uint supply) { + function getTokenSupply(string memory currency) public view returns (uint supply) { return lib.getTokenSupply(currency); } @@ -71,7 +71,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function freezeAccount(address account, bool isAllowed, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function freezeAccount(address account, bool isAllowed, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { // @notice updates account status // @dev !!! mutates storage state require( @@ -88,7 +88,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function approveKYC(address account, bool isApproved, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function approveKYC(address account, bool isApproved, uint limit, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { // @notice updates kyc approval status // @dev !!! mutates storage state require( @@ -120,7 +120,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function approveKYCAndDeposit(string currency, address account, uint amount, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function approveKYCAndDeposit(string memory currency, address account, uint amount, uint limit, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { /// @notice updates kyc approval status /// @dev !!! mutates storage state require( @@ -155,7 +155,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function setAccountSpendingLimit(address account, uint limit, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function setAccountSpendingLimit(address account, uint limit, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { require( lib.setAccountSpendingLimit(account, limit), "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" @@ -189,7 +189,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Firm setting the foreign currency exchange * @return { "success": "Returns true if successfully called from another contract"} */ - function setFxBpsRate(string currency, uint bpsRate, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function setFxBpsRate(string memory currency, uint bpsRate, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { require( lib.setFxUSDBPSRate(currency, bpsRate), "Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized" @@ -203,7 +203,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param fxAmount Amount of foreign currency to exchange into USD * @return {"usdAmount" : "Returns the foreign currency amount in USD"} */ - function getFxUSDAmount(string currency, uint fxAmount) public view returns (uint usdAmount) { + function getFxUSDAmount(string memory currency, uint fxAmount) public view returns (uint usdAmount) { return lib.getFxUSDAmount(currency, fxAmount); } @@ -214,7 +214,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function approveForwardedAccount(address originalAccount, address updatedAccount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function approveForwardedAccount(address originalAccount, address updatedAccount, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { // @notice updatesa forwarded account // @dev !!! mutates storage state require( @@ -231,7 +231,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function deposit(string currency, address account, uint amount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function deposit(string memory currency, address account, uint amount, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { require( lib.verifyAccount(account), "Error: Account is not verified!" @@ -253,7 +253,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder * @return { "success": "Returns true if successfully called from another contract"} */ - function withdraw(string currency, address account, uint amount, string issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function withdraw(string memory currency, address account, uint amount, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { require( lib.verifyAccount(account), "Error: Account is not verified!" @@ -271,7 +271,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @notice Ensure only authorized currency firms and authorities can modify protected methods * @dev authority must be registered to an authorized firm to use protected methods */ - modifier onlyAuthority(string firmName, address authority) { + modifier onlyAuthority(string memory firmName, address authority) { // @notice throws if authority account is not registred to the given firm require( lib.isRegisteredToFirm(firmName, authority), diff --git a/contracts/TokenIOERC20.sol b/contracts/TokenIOERC20.sol index 87f362b..560157d 100644 --- a/contracts/TokenIOERC20.sol +++ b/contracts/TokenIOERC20.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; import "./TokenIOStorage.sol"; @@ -62,10 +62,10 @@ contract TokenIOERC20 is Ownable { @return { "success" : "Returns true if successfully called from another contract"} */ function setParams( - string _name, - string _symbol, - string _tla, - string _version, + string memory _name, + string memory _symbol, + string memory _tla, + string memory _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate @@ -79,7 +79,7 @@ contract TokenIOERC20 is Ownable { * @notice Gets name of token * @return {"_name" : "Returns name of token"} */ - function name() public view returns (string _name) { + function name() public view returns (string memory _name) { return lib.getTokenName(address(this)); } @@ -87,7 +87,7 @@ contract TokenIOERC20 is Ownable { * @notice Gets symbol of token * @return {"_symbol" : "Returns symbol of token"} */ - function symbol() public view returns (string _symbol) { + function symbol() public view returns (string memory _symbol) { return lib.getTokenSymbol(address(this)); } @@ -95,7 +95,7 @@ contract TokenIOERC20 is Ownable { * @notice Gets three-letter-abbreviation of token * @return {"_tla" : "Returns three-letter-abbreviation of token"} */ - function tla() public view returns (string _tla) { + function tla() public view returns (string memory _tla) { return lib.getTokenTLA(address(this)); } @@ -103,7 +103,7 @@ contract TokenIOERC20 is Ownable { * @notice Gets version of token * @return {"_version" : "Returns version of token"} */ - function version() public view returns (string _version) { + function version() public view returns (string memory _version) { return lib.getTokenVersion(address(this)); } @@ -152,7 +152,7 @@ contract TokenIOERC20 is Ownable { "contract":"Address of fee contract" } */ - function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { feeAccount = lib.getFeeContract(address(this)); (max, min, bps, flat) = lib.getFees(feeAccount); feeMsg = lib.getFeeMsg(feeAccount); diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 3b83b60..712a3bd 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; import "./TokenIOStorage.sol"; @@ -67,10 +67,10 @@ contract TokenIOERC20FeesApply is Ownable { @return { "success" : "Returns true if successfully called from another contract"} */ function setParams( - string _name, - string _symbol, - string _tla, - string _version, + string memory _name, + string memory _symbol, + string memory _tla, + string memory _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate @@ -84,7 +84,7 @@ contract TokenIOERC20FeesApply is Ownable { * @notice Gets name of token * @return {"_name" : "Returns name of token"} */ - function name() public view returns (string _name) { + function name() public view returns (string memory _name) { return lib.getTokenName(address(this)); } @@ -92,7 +92,7 @@ contract TokenIOERC20FeesApply is Ownable { * @notice Gets symbol of token * @return {"_symbol" : "Returns symbol of token"} */ - function symbol() public view returns (string _symbol) { + function symbol() public view returns (string memory _symbol) { return lib.getTokenSymbol(address(this)); } @@ -100,7 +100,7 @@ contract TokenIOERC20FeesApply is Ownable { * @notice Gets three-letter-abbreviation of token * @return {"_tla" : "Returns three-letter-abbreviation of token"} */ - function tla() public view returns (string _tla) { + function tla() public view returns (string memory _tla) { return lib.getTokenTLA(address(this)); } @@ -108,7 +108,7 @@ contract TokenIOERC20FeesApply is Ownable { * @notice Gets version of token * @return {"_version" : "Returns version of token"} */ - function version() public view returns (string _version) { + function version() public view returns (string memory _version) { return lib.getTokenVersion(address(this)); } @@ -157,7 +157,7 @@ contract TokenIOERC20FeesApply is Ownable { "contract":"Address of fee contract" } */ - function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { feeAccount = lib.getFeeContract(address(this)); (max, min, bps, flat) = lib.getFees(feeAccount); feeMsg = lib.getFeeMsg(feeAccount); diff --git a/contracts/TokenIOERC20Unlimited.sol b/contracts/TokenIOERC20Unlimited.sol index abfb2e9..dd74985 100644 --- a/contracts/TokenIOERC20Unlimited.sol +++ b/contracts/TokenIOERC20Unlimited.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; import "./TokenIOStorage.sol"; @@ -64,10 +64,10 @@ contract TokenIOERC20Unlimited is Ownable { @return { "success" : "Returns true if successfully called from another contract"} */ function setParams( - string _name, - string _symbol, - string _tla, - string _version, + string memory _name, + string memory _symbol, + string memory _tla, + string memory _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate @@ -81,7 +81,7 @@ contract TokenIOERC20Unlimited is Ownable { * @notice Gets name of token * @return {"_name" : "Returns name of token"} */ - function name() public view returns (string _name) { + function name() public view returns (string memory _name) { return lib.getTokenName(address(this)); } @@ -89,7 +89,7 @@ contract TokenIOERC20Unlimited is Ownable { * @notice Gets symbol of token * @return {"_symbol" : "Returns symbol of token"} */ - function symbol() public view returns (string _symbol) { + function symbol() public view returns (string memory _symbol) { return lib.getTokenSymbol(address(this)); } @@ -97,7 +97,7 @@ contract TokenIOERC20Unlimited is Ownable { * @notice Gets three-letter-abbreviation of token * @return {"_tla" : "Returns three-letter-abbreviation of token"} */ - function tla() public view returns (string _tla) { + function tla() public view returns (string memory _tla) { return lib.getTokenTLA(address(this)); } @@ -105,7 +105,7 @@ contract TokenIOERC20Unlimited is Ownable { * @notice Gets version of token * @return {"_version" : "Returns version of token"} */ - function version() public view returns (string _version) { + function version() public view returns (string memory _version) { return lib.getTokenVersion(address(this)); } diff --git a/contracts/TokenIOFX.sol b/contracts/TokenIOFX.sol index 77fadd3..caeeb4a 100644 --- a/contracts/TokenIOFX.sol +++ b/contracts/TokenIOFX.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; import "./TokenIOLib.sol"; @@ -69,8 +69,8 @@ contract TokenIOFX is Ownable { */ function swap( address requester, - string symbolA, - string symbolB, + string memory symbolA, + string memory symbolB, uint valueA, uint valueB, uint8 sigV, diff --git a/contracts/TokenIOFeeContract.sol b/contracts/TokenIOFeeContract.sol index 562baf6..eee007a 100644 --- a/contracts/TokenIOFeeContract.sol +++ b/contracts/TokenIOFeeContract.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; import "./TokenIOStorage.sol"; @@ -61,7 +61,7 @@ contract TokenIOFeeContract is Ownable { * @param feeFlat Flat transaction fee * returns {"success" : "Returns true if successfully called from another contract"} */ - function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes feeMsg) public onlyOwner returns (bool success) { + function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes memory feeMsg) public onlyOwner returns (bool success) { require(lib.setFees(address(this), feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings"); require(lib.setFeeMsg(feeMsg), "Error: Unable to set fee contract default message."); return true; @@ -77,7 +77,7 @@ contract TokenIOFeeContract is Ownable { "feeContract": "Address of this contract" } */ - function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeContract) { + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeContract) { (max, min, bps, flat) = lib.getFees(address(this)); feeMsg = lib.getFeeMsg(address(this)); feeContract = address(this); @@ -88,7 +88,7 @@ contract TokenIOFeeContract is Ownable { * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx) * @return {"balance": "Balance of TokenIO TSM currency account"} */ - function getTokenBalance(string currency) public view returns(uint balance) { + function getTokenBalance(string memory currency) public view returns(uint balance) { return lib.getTokenBalance(currency, address(this)); } @@ -109,7 +109,7 @@ contract TokenIOFeeContract is Ownable { * @param data Arbitrary bytes data message to include in transfer * @return {"success": "Returns ture if successfully called from another contract"} */ - function transferCollectedFees(string currency, address to, uint amount, bytes data) public onlyOwner returns (bool success) { + function transferCollectedFees(string memory currency, address to, uint amount, bytes memory data) public onlyOwner returns (bool success) { require( lib.forceTransfer(currency, address(this), to, amount, data), "Error: unable to transfer fees to account." diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index ab5f799..21ed2d6 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./SafeMath.sol"; import "./TokenIOStorage.sol"; @@ -47,7 +47,7 @@ library TokenIOLib { event AccountForward(address indexed originalAccount, address indexed forwardedAccount); event NewAuthority(address indexed authority, string issuerFirm); - function setTokenParams(Data storage self, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal returns(bool success) { + function setTokenParams(Data storage self, string memory _name, string memory _symbol, string memory _tla, string memory _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal returns(bool success) { require( self.Storage.setTokenParams(address(this), _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract."); @@ -62,7 +62,7 @@ library TokenIOLib { * @param tokenName Name of the token contract * @return {"success" : "Returns true when successfully called from another contract"} */ - function setTokenName(Data storage self, string tokenName) internal returns (bool success) { + function setTokenName(Data storage self, string memory tokenName) internal returns (bool success) { require( self.Storage.setTokenName(address(this), tokenName), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." @@ -78,7 +78,7 @@ library TokenIOLib { * @param tokenSymbol Symbol of the token contract * @return {"success" : "Returns true when successfully called from another contract"} */ - function setTokenSymbol(Data storage self, string tokenSymbol) internal returns (bool success) { + function setTokenSymbol(Data storage self, string memory tokenSymbol) internal returns (bool success) { require( self.Storage.setTokenSymbol(address(this), tokenSymbol), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." @@ -94,7 +94,7 @@ library TokenIOLib { * @param tokenTLA TLA of the token contract * @return {"success" : "Returns true when successfully called from another contract"} */ - function setTokenTLA(Data storage self, string tokenTLA) internal returns (bool success) { + function setTokenTLA(Data storage self, string memory tokenTLA) internal returns (bool success) { require( self.Storage.setTokenTLA(address(this), tokenTLA), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." @@ -110,7 +110,7 @@ library TokenIOLib { * @param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract * @return {"success" : "Returns true when successfully called from another contract"} */ - function setTokenVersion(Data storage self, string tokenVersion) internal returns (bool success) { + function setTokenVersion(Data storage self, string memory tokenVersion) internal returns (bool success) { require( self.Storage.setTokenVersion(address(this), tokenVersion), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." @@ -129,7 +129,7 @@ library TokenIOLib { * @param tokenDecimals Decimal representation of the token contract unit amount * @return {"success" : "Returns true when successfully called from another contract"} */ - function setTokenDecimals(Data storage self, string currency, uint tokenDecimals) internal returns (bool success) { + function setTokenDecimals(Data storage self, string memory currency, uint tokenDecimals) internal returns (bool success) { require( self.Storage.setTokenDecimals(currency, tokenDecimals), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." @@ -161,7 +161,7 @@ library TokenIOLib { * @param feeMsg Fee message included in a transaction with fees * @return {"success" : "Returns true when successfully called from another contract"} */ - function setFeeMsg(Data storage self, bytes feeMsg) internal returns (bool success) { + function setFeeMsg(Data storage self, bytes memory feeMsg) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('fee.msg', address(this))); require( self.Storage.setBytes(id, feeMsg), @@ -197,7 +197,7 @@ library TokenIOLib { * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx) * @return {"success" : "Returns true when successfully called from another contract"} */ - function setTokenNameSpace(Data storage self, string currency) internal returns (bool success) { + function setTokenNameSpace(Data storage self, string memory currency) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('token.namespace', currency)); require( self.Storage.setAddress(id, address(this)), @@ -217,7 +217,7 @@ library TokenIOLib { * @param issuerFirm Firm name for issuing KYC approval * @return {"success" : "Returns true when successfully called from another contract"} */ - function setKYCApproval(Data storage self, address account, bool isApproved, string issuerFirm) internal returns (bool success) { + function setKYCApproval(Data storage self, address account, bool isApproved, string memory issuerFirm) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account))); require( self.Storage.setBool(id, isApproved), @@ -240,7 +240,7 @@ library TokenIOLib { * @param issuerFirm Firm name for issuing approval * @return {"success" : "Returns true when successfully called from another contract"} */ - function setAccountStatus(Data storage self, address account, bool isAllowed, string issuerFirm) internal returns (bool success) { + function setAccountStatus(Data storage self, address account, bool isAllowed, string memory issuerFirm) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account))); require( self.Storage.setBool(id, isAllowed), @@ -317,7 +317,7 @@ library TokenIOLib { * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx) * @return { "contractAddress" : "Returns the contract interface address for a symbol" } */ - function getTokenNameSpace(Data storage self, string currency) internal view returns (address contractAddress) { + function getTokenNameSpace(Data storage self, string memory currency) internal view returns (address contractAddress) { bytes32 id = keccak256(abi.encodePacked('token.namespace', currency)); return self.Storage.getAddress(id); } @@ -330,7 +330,7 @@ library TokenIOLib { * @param contractAddress Contract address of the queryable interface * @return {"tokenName" : "Name of the token contract"} */ - function getTokenName(Data storage self, address contractAddress) internal view returns (string tokenName) { + function getTokenName(Data storage self, address contractAddress) internal view returns (string memory tokenName) { return self.Storage.getTokenName(contractAddress); } @@ -342,7 +342,7 @@ library TokenIOLib { * @param contractAddress Contract address of the queryable interface * @return {"tokenSymbol" : "Symbol of the token contract"} */ - function getTokenSymbol(Data storage self, address contractAddress) internal view returns (string tokenSymbol) { + function getTokenSymbol(Data storage self, address contractAddress) internal view returns (string memory tokenSymbol) { return self.Storage.getTokenSymbol(contractAddress); } @@ -354,7 +354,7 @@ library TokenIOLib { * @param contractAddress Contract address of the queryable interface * @return {"tokenTLA" : "TLA of the token contract"} */ - function getTokenTLA(Data storage self, address contractAddress) internal view returns (string tokenTLA) { + function getTokenTLA(Data storage self, address contractAddress) internal view returns (string memory tokenTLA) { return self.Storage.getTokenTLA(contractAddress); } @@ -366,7 +366,7 @@ library TokenIOLib { * @param contractAddress Contract address of the queryable interface * @return {"tokenVersion" : "Semantic version of the token contract"} */ - function getTokenVersion(Data storage self, address contractAddress) internal view returns (string) { + function getTokenVersion(Data storage self, address contractAddress) internal view returns (string memory) { return self.Storage.getTokenVersion(contractAddress); } @@ -378,7 +378,7 @@ library TokenIOLib { * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx) * @return {"tokenDecimals" : "Decimals of the token contract"} */ - function getTokenDecimals(Data storage self, string currency) internal view returns (uint tokenDecimals) { + function getTokenDecimals(Data storage self, string memory currency) internal view returns (uint tokenDecimals) { return self.Storage.getTokenDecimals(currency); } @@ -393,7 +393,7 @@ library TokenIOLib { * @param contractAddress Contract address of the queryable interface * @return { "feeMsg" : "Returns the fee message (bytes) associated with the contract address"} */ - function getFeeMsg(Data storage self, address contractAddress) internal view returns (bytes feeMsg) { + function getFeeMsg(Data storage self, address contractAddress) internal view returns (bytes memory feeMsg) { bytes32 id = keccak256(abi.encodePacked('fee.msg', contractAddress)); return self.Storage.getBytes(id); } @@ -408,7 +408,7 @@ library TokenIOLib { */ function setMasterFeeContract(Data storage self, address contractAddress) internal returns (bool success) { require( - self.Storage.setTokenFeeContract(0, contractAddress), + self.Storage.setTokenFeeContract(address(0), contractAddress), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -421,7 +421,7 @@ library TokenIOLib { * @return { "masterFeeContract" : "Returns the master fee contract set for TSM."} */ function getMasterFeeContract(Data storage self) internal view returns (address masterFeeContract) { - return self.Storage.getTokenFeeContract(0); + return self.Storage.getTokenFeeContract(address(0)); } /** @@ -436,7 +436,7 @@ library TokenIOLib { function getFeeContract(Data storage self, address contractAddress) internal view returns (address feeContract) { address feeAccount = self.Storage.getTokenFeeContract(contractAddress); - if (feeAccount == 0x0) { + if (feeAccount == address(0)) { return getMasterFeeContract(self); } else { return feeAccount; @@ -450,7 +450,7 @@ library TokenIOLib { * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx) * @return { "supply" : "Returns the token supply of the given currency"} */ - function getTokenSupply(Data storage self, string currency) internal view returns (uint supply) { + function getTokenSupply(Data storage self, string memory currency) internal view returns (uint supply) { bytes32 id = keccak256(abi.encodePacked('token.supply', currency)); return self.Storage.getUint(id); } @@ -463,7 +463,7 @@ library TokenIOLib { * @param spender Ethereum address of spender * @return { "allowance" : "Returns the allowance of a given spender for a given account"} */ - function getTokenAllowance(Data storage self, string currency, address account, address spender) internal view returns (uint allowance) { + function getTokenAllowance(Data storage self, string memory currency, address account, address spender) internal view returns (uint allowance) { bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, spender))); return self.Storage.getUint(id); } @@ -476,7 +476,7 @@ library TokenIOLib { * @param account Ethereum address of account holder * @return { "balance" : "Return the balance of a given account for a specified currency"} */ - function getTokenBalance(Data storage self, string currency, address account) internal view returns (uint balance) { + function getTokenBalance(Data storage self, string memory currency, address account) internal view returns (uint balance) { return self.Storage.getBalance(getForwardedAccount(self, account), currency); } @@ -488,7 +488,7 @@ library TokenIOLib { * @param account Ethereum address of account holder * @return { "frozenBalance" : "Return the frozen balance of a given account for a specified currency"} */ - function getTokenFrozenBalance(Data storage self, string currency, address account) internal view returns (uint frozenBalance) { + function getTokenFrozenBalance(Data storage self, string memory currency, address account) internal view returns (uint frozenBalance) { bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account))); return self.Storage.getUint(id); } @@ -502,7 +502,7 @@ library TokenIOLib { * @param amount Amount of tokens to freeze for account * @return { "success" : "Return true if successfully called from another contract"} */ - function setTokenFrozenBalance(Data storage self, string currency, address account, uint amount) internal returns (bool success) { + function setTokenFrozenBalance(Data storage self, string memory currency, address account, uint amount) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account))); require( self.Storage.setUint(id, amount), @@ -591,8 +591,8 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function transfer(Data storage self, string currency, address to, uint amount, bytes data) internal returns (bool success) { - require(address(to) != 0x0, "Error: `to` address cannot be null." ); + function transfer(Data storage self, string memory currency, address to, uint amount, bytes memory data) internal returns (bool success) { + require(address(to) != address(0), "Error: `to` address cannot be null." ); require(amount > 0, "Error: `amount` must be greater than zero"); address feeContract = getFeeContract(self, address(this)); @@ -630,9 +630,9 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) { + function transferFrom(Data storage self, string memory currency, address from, address to, uint amount, bytes memory data) internal returns (bool success) { require( - address(to) != 0x0, + address(to) != address(0), "Error: `to` address must not be null." ); @@ -680,9 +680,9 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) { + function forceTransfer(Data storage self, string memory currency, address from, address to, uint amount, bytes memory data) internal returns (bool success) { require( - address(to) != 0x0, + address(to) != address(0), "Error: `to` address must not be null." ); @@ -711,7 +711,7 @@ library TokenIOLib { * @param amount Value to reduce allowance by (i.e. the amount spent) * @return { "success" : "Return true if successfully called from another contract" } */ - function updateAllowance(Data storage self, string currency, address account, uint amount) internal returns (bool success) { + function updateAllowance(Data storage self, string memory currency, address account, uint amount) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, msg.sender))); require( self.Storage.setUint(id, self.Storage.getUint(id).sub(amount)), @@ -730,7 +730,7 @@ library TokenIOLib { * @return { "success" : "Return true if successfully called from another contract" } */ function approveAllowance(Data storage self, address spender, uint amount) internal returns (bool success) { - require(spender != 0x0, + require(spender != address(0), "Error: `spender` address cannot be null."); string memory currency = getTokenSymbol(self, address(this)); @@ -769,7 +769,7 @@ library TokenIOLib { * @param issuerFirm Name of the issuing firm authorizing the deposit * @return { "success" : "Return true if successfully called from another contract" } */ - function deposit(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) { + function deposit(Data storage self, string memory currency, address account, uint amount, string memory issuerFirm) internal returns (bool success) { bytes32[2] memory ids = [keccak256(abi.encodePacked('token.issued', currency, issuerFirm)), keccak256(abi.encodePacked('token.supply', currency))]; address forwardedAccount = getForwardedAccount(self, account); @@ -799,7 +799,7 @@ library TokenIOLib { * @param issuerFirm Name of the issuing firm authorizing the withdraw * @return { "success" : "Return true if successfully called from another contract" } */ - function withdraw(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) { + function withdraw(Data storage self, string memory currency, address account, uint amount, string memory issuerFirm) internal returns (bool success) { bytes32[2] memory ids = [keccak256(abi.encodePacked('token.issued', currency, issuerFirm)), keccak256(abi.encodePacked('token.supply', currency))]; address forwardedAccount = getForwardedAccount(self, account); @@ -830,7 +830,7 @@ library TokenIOLib { * @param approved Approval status to set for the firm (true/false) * @return { "success" : "Return true if successfully called from another contract" } */ - function setRegisteredFirm(Data storage self, string issuerFirm, bool approved) internal returns (bool success) { + function setRegisteredFirm(Data storage self, string memory issuerFirm, bool approved) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm)); require( self.Storage.setBool(id, approved), @@ -850,7 +850,7 @@ library TokenIOLib { * @param approved Approval status to set for the firm authority (true/false) * @return { "success" : "Return true if successfully called from another contract" } */ - function setRegisteredAuthority(Data storage self, string issuerFirm, address authorityAddress, bool approved) internal returns (bool success) { + function setRegisteredAuthority(Data storage self, string memory issuerFirm, address authorityAddress, bool approved) internal returns (bool success) { require( isRegisteredFirm(self, issuerFirm), "Error: `issuerFirm` must be registered."); @@ -877,7 +877,7 @@ library TokenIOLib { * @param authorityAddress Ethereum address of the firm authority to query * @return { "issuerFirm" : "Name of the firm registered to authority" } */ - function getFirmFromAuthority(Data storage self, address authorityAddress) internal view returns (string issuerFirm) { + function getFirmFromAuthority(Data storage self, address authorityAddress) internal view returns (string memory issuerFirm) { bytes32 id = keccak256(abi.encodePacked('registered.authority.firm', getForwardedAccount(self, authorityAddress))); return self.Storage.getString(id); } @@ -888,7 +888,7 @@ library TokenIOLib { * @param issuerFirm Name of the issuer firm * @return { "registered" : "Return if the issuer firm has been registered" } */ - function isRegisteredFirm(Data storage self, string issuerFirm) internal view returns (bool registered) { + function isRegisteredFirm(Data storage self, string memory issuerFirm) internal view returns (bool registered) { bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm)); return self.Storage.getBool(id); } @@ -900,7 +900,7 @@ library TokenIOLib { * @param authorityAddress Ethereum address of the firm authority to query * @return { "registered" : "Return if the authority is registered with the issuer firm" } */ - function isRegisteredToFirm(Data storage self, string issuerFirm, address authorityAddress) internal view returns (bool registered) { + function isRegisteredToFirm(Data storage self, string memory issuerFirm, address authorityAddress) internal view returns (bool registered) { bytes32 id = keccak256(abi.encodePacked('registered.authority', issuerFirm, getForwardedAccount(self, authorityAddress))); return self.Storage.getBool(id); } @@ -967,8 +967,8 @@ library TokenIOLib { function execSwap( Data storage self, address requester, - string symbolA, - string symbolB, + string memory symbolA, + string memory symbolB, uint valueA, uint valueB, uint8 sigV, @@ -1022,7 +1022,7 @@ library TokenIOLib { * @return {"success" : "Returns true if successfully called from another contract"} */ function setDeprecatedContract(Data storage self, address contractAddress) internal returns (bool success) { - require(contractAddress != 0x0, + require(contractAddress != address(0), "Error: cannot deprecate a null address."); bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress)); @@ -1187,7 +1187,7 @@ library TokenIOLib { * @param bpsRate Basis point rate of foreign currency exchange rate to USD * @return { "success": "Returns true if successfully called from another contract"} */ - function setFxUSDBPSRate(Data storage self, string currency, uint bpsRate) internal returns (bool success) { + function setFxUSDBPSRate(Data storage self, string memory currency, uint bpsRate) internal returns (bool success) { require( self.Storage.setTokenfxUSDBPSRate(currency, bpsRate), "Error: Unable to update account spending period."); @@ -1201,7 +1201,7 @@ library TokenIOLib { * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx) * @return {"usdAmount" : "Returns the foreign currency amount in USD"} */ - function getFxUSDBPSRate(Data storage self, string currency) internal view returns (uint bpsRate) { + function getFxUSDBPSRate(Data storage self, string memory currency) internal view returns (uint bpsRate) { return self.Storage.getTokenfxUSDBPSRate(currency); } @@ -1212,7 +1212,7 @@ library TokenIOLib { * @param fxAmount Amount of foreign currency to exchange into USD * @return {"amount" : "Returns the foreign currency amount in USD"} */ - function getFxUSDAmount(Data storage self, string currency, uint fxAmount) internal view returns (uint amount) { + function getFxUSDAmount(Data storage self, string memory currency, uint fxAmount) internal view returns (uint amount) { uint usdDecimals = getTokenDecimals(self, 'USDx'); uint fxDecimals = getTokenDecimals(self, currency); /// @dev ensure decimal precision is normalized to USD decimals diff --git a/contracts/TokenIOMerchant.sol b/contracts/TokenIOMerchant.sol index ac18068..8de1e2e 100644 --- a/contracts/TokenIOMerchant.sol +++ b/contracts/TokenIOMerchant.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; import "./TokenIOStorage.sol"; @@ -71,7 +71,7 @@ contract TokenIOMerchant is Ownable { "contract":"Address of fee contract" } */ - function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes feeMsg, address feeAccount) { + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { address feeContract = lib.getFeeContract(address(this)); (max, min, bps, flat) = lib.getFees(feeContract); feeMsg = lib.getFeeMsg(feeContract); @@ -96,7 +96,7 @@ contract TokenIOMerchant is Ownable { * @param data Optional data to be included when paying the merchant (e.g. item receipt) * @return { "success" : "Returns true if successfully called from another contract"} */ - function pay(string currency, address merchant, uint amount, bool merchantPaysFees, bytes data) public returns (bool success) { + function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success) { uint fees = calculateFees(amount); /// @dev note the spending amount limit is gross of fees require(lib.setAccountSpendingAmount(msg.sender, lib.getFxUSDAmount(currency, amount)), diff --git a/contracts/TokenIONameSpace.sol b/contracts/TokenIONameSpace.sol index 26b0beb..2844e53 100644 --- a/contracts/TokenIONameSpace.sol +++ b/contracts/TokenIONameSpace.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; /** @@ -57,7 +57,7 @@ contract TokenIONameSpace is Ownable { * @param currency string Currency symbol of the token (e.g. USDx, JYPx, GBPx) * @return {"contractAddress": "Returns the token contract address associated with the currency"} */ - function getTokenNameSpace(string currency) public view returns (address contractAddress) { + function getTokenNameSpace(string memory currency) public view returns (address contractAddress) { return lib.getTokenNameSpace(currency); } diff --git a/contracts/TokenIOStableSwap.sol b/contracts/TokenIOStableSwap.sol index 8c06113..8f69743 100644 --- a/contracts/TokenIOStableSwap.sol +++ b/contracts/TokenIOStableSwap.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; import "./SafeMath.sol"; @@ -69,7 +69,7 @@ contract TokenIOStableSwap is Ownable { * @param feeFlat Flat Swap Fee * @return { "success" : "Returns true if successfully called from another contract"} */ - function allowAsset(address asset, string currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner notDeprecated returns (bool success) { + function allowAsset(address asset, string memory currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner notDeprecated returns (bool success) { bytes32 id = keccak256(abi.encodePacked('allowed.stable.asset', asset, currency)); require( lib.Storage.setBool(id, true), @@ -104,7 +104,7 @@ contract TokenIOStableSwap is Ownable { * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) * @return {"allowed": "Returns true if the asset is allowed"} */ - function isAllowedAsset(address asset, string currency) public view returns (bool allowed) { + function isAllowedAsset(address asset, string memory currency) public view returns (bool allowed) { if (isTokenXContract(asset, currency)) { return true; } else { @@ -119,7 +119,7 @@ contract TokenIOStableSwap is Ownable { * @param currency string Currency of the asset (NOTE: This is the currency for the asset) * @return { "success" : "Returns true if successfully called from another contract"} */ - function setAssetCurrency(address asset, string currency) public onlyOwner returns (bool success) { + function setAssetCurrency(address asset, string memory currency) public onlyOwner returns (bool success) { bytes32 id = keccak256(abi.encodePacked('asset.currency', asset)); require( lib.Storage.setString(id, currency), @@ -133,7 +133,7 @@ contract TokenIOStableSwap is Ownable { * @param asset Ethereum address of the asset to get the currency for * @return {"currency": "Returns the Currency of the asset if the asset has been allowed."} */ - function getAssetCurrency(address asset) public view returns (string currency) { + function getAssetCurrency(address asset) public view returns (string memory currency) { bytes32 id = keccak256(abi.encodePacked('asset.currency', asset)); return lib.Storage.getString(id); } @@ -145,7 +145,7 @@ contract TokenIOStableSwap is Ownable { * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) * @return { "success" : "Returns true if successfully called from another contract"} */ - function setTokenXCurrency(address asset, string currency) public onlyOwner notDeprecated returns (bool success) { + function setTokenXCurrency(address asset, string memory currency) public onlyOwner notDeprecated returns (bool success) { bytes32 id = keccak256(abi.encodePacked('tokenx', asset, currency)); require( lib.Storage.setBool(id, true), @@ -164,7 +164,7 @@ contract TokenIOStableSwap is Ownable { * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) * @return {"allowed": "Returns true if the asset is allowed"} */ - function isTokenXContract(address asset, string currency) public view returns (bool isX) { + function isTokenXContract(address asset, string memory currency) public view returns (bool isX) { bytes32 id = keccak256(abi.encodePacked('tokenx', asset, currency)); return lib.Storage.getBool(id); } diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 817bab4..054e1e3 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -1,4 +1,4 @@ -pragma solidity 0.4.24; +pragma solidity 0.5.2; import "./Ownable.sol"; @@ -123,7 +123,7 @@ contract TokenIOStorage is Ownable { * @param _value The String value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setString(bytes32 _key, string _value) external onlyOwner returns (bool success) { + function setString(bytes32 _key, string calldata _value) external onlyOwner returns (bool success) { stringStorage[_key] = _value; return true; } @@ -134,7 +134,7 @@ contract TokenIOStorage is Ownable { * @param _value The Bytes value to be set * @return { "success" : "Returns true when successfully called from another contract" } */ - function setBytes(bytes32 _key, bytes _value) external onlyOwner returns (bool success) { + function setBytes(bytes32 _key, bytes calldata _value) external onlyOwner returns (bool success) { bytesStorage[_key] = _value; return true; } @@ -250,7 +250,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the String value associated with the id key" } */ - function getString(bytes32 _key) external view returns (string _value) { + function getString(bytes32 _key) external view returns (string memory _value) { return stringStorage[_key]; } @@ -259,7 +259,7 @@ contract TokenIOStorage is Ownable { * @param _key Pointer identifier for value in storage * @return { "_value" : "Returns the Bytes value associated with the id key" } */ - function getBytes(bytes32 _key) external view returns (bytes _value) { + function getBytes(bytes32 _key) external view returns (bytes memory _value) { return bytesStorage[_key]; } @@ -344,7 +344,7 @@ contract TokenIOStorage is Ownable { */ function getRelatedAccount(address _address) external view returns (address value) { address relatedAddress = relatedAccounts[_address]; - return (0x0 != relatedAddress) ? relatedAddress : _address; + return (address(0) != relatedAddress) ? relatedAddress : _address; } /** @@ -352,10 +352,10 @@ contract TokenIOStorage is Ownable { * @param _addresses Pointer identifier for value in mapping * @return { "_value" : "Returns the bool value associated with the key" } */ - function getRelatedAccounts(address[3] _addresses) internal view returns (address[3] memory relatedAddresses) { + function getRelatedAccounts(address[3] memory _addresses) internal view returns (address[3] memory relatedAddresses) { for(uint i = 0; i < _addresses.length; i++) { relatedAddresses[i] = relatedAccounts[_addresses[i]]; - relatedAddresses[i] = (0x0 != relatedAddresses[i]) ? relatedAddresses[i] : _addresses[i]; + relatedAddresses[i] = (address(0) != relatedAddresses[i]) ? relatedAddresses[i] : _addresses[i]; } return relatedAddresses; @@ -382,7 +382,7 @@ contract TokenIOStorage is Ownable { return true; } - function getTransferDetails(address _account, address[3] _addresses) external view returns(string memory currency, address[3] memory addresses) { + function getTransferDetails(address _account, address[3] calldata _addresses) external view returns(string memory currency, address[3] memory addresses) { currency = assets[_account].symbol; addresses = getRelatedAccounts(_addresses); } @@ -393,7 +393,7 @@ contract TokenIOStorage is Ownable { * @param _currency Pointer identifier for value in mapping * @return { "_value" : "Returns the uint value associated with the keys" } */ - function getBalance(address _address, string _currency) external view returns (uint256 value) { + function getBalance(address _address, string calldata _currency) external view returns (uint256 value) { //return getUint(keccak256(abi.encodePacked('token.balance', _address, _currency))); return balances[_address][_currency]; } @@ -405,7 +405,7 @@ contract TokenIOStorage is Ownable { * @param _value balance value * @return { "success" : "Returns true when successfully called from another contract" } */ - function setBalance(address _address, string _currency, uint _value) external onlyOwner returns (bool success) { + function setBalance(address _address, string calldata _currency, uint _value) external onlyOwner returns (bool success) { //setUint(keccak256(abi.encodePacked('token.balance', _address, _currency)), _value); balances[_address][_currency] = _value; return true; @@ -418,7 +418,7 @@ contract TokenIOStorage is Ownable { * @param _values balance values * @return { "success" : "Returns true when successfully called from another contract" } */ - function setBalances(address[3] _addresses, string _currency, uint[3] _values) external onlyOwner returns(bool success) { + function setBalances(address[3] calldata _addresses, string calldata _currency, uint[3] calldata _values) external onlyOwner returns(bool success) { for(uint i = 0; i < _addresses.length; i++) { balances[_addresses[i]][_currency] = _values[i]; } @@ -431,13 +431,13 @@ contract TokenIOStorage is Ownable { * @param _currency Pointer identifier for value in mapping * @return { "success" : "Returns true when successfully called from another contract" } */ - function deleteBalance(address _address, string _currency) external onlyOwner returns (bool success) { + function deleteBalance(address _address, string calldata _currency) external onlyOwner returns (bool success) { //setUint(keccak256(abi.encodePacked('token.balance', _address, _currency)), _value); delete balances[_address][_currency]; return true; } - function setTokenParams(address _address, string _name, string _symbol, string _tla, string _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { + function setTokenParams(address _address, string calldata _name, string calldata _symbol, string calldata _tla, string calldata _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { assets[_address] = AssetDetails(_name, _symbol, _tla, _version, _feeContract); decimals[_symbol] = _decimals; fxUSDBPSRates[_symbol] = _fxUSDBPSRate; @@ -449,7 +449,7 @@ contract TokenIOStorage is Ownable { * @param _address Pointer identifier for value in mapping * @return { "string" : "Returns the string value associated with the key" } */ - function getTokenName(address _address) external view returns(string) { + function getTokenName(address _address) external view returns(string memory) { return assets[_address].name; } @@ -459,7 +459,7 @@ contract TokenIOStorage is Ownable { * @param _tokenName token name value * @return { "success" : "Returns true when successfully called from another contract" } */ - function setTokenName(address _address, string _tokenName) external onlyOwner returns(bool success) { + function setTokenName(address _address, string calldata _tokenName) external onlyOwner returns(bool success) { assets[_address].name = _tokenName; return true; } @@ -479,7 +479,7 @@ contract TokenIOStorage is Ownable { * @param _address Pointer identifier for value in mapping * @return { "string" : "Returns the string value associated with the key" } */ - function getTokenSymbol(address _address) external view returns(string) { + function getTokenSymbol(address _address) external view returns(string memory) { return assets[_address].symbol; } @@ -489,7 +489,7 @@ contract TokenIOStorage is Ownable { * @param _value token symbol value * @return { "success" : "Returns true when successfully called from another contract" } */ - function setTokenSymbol(address _address, string _value) external onlyOwner returns (bool success) { + function setTokenSymbol(address _address, string calldata _value) external onlyOwner returns (bool success) { assets[_address].symbol = _value; return true; } @@ -509,7 +509,7 @@ contract TokenIOStorage is Ownable { * @param _address Pointer identifier for value in mapping * @return { "string" : "Returns the string value associated with the key" } */ - function getTokenTLA(address _address) external view returns(string) { + function getTokenTLA(address _address) external view returns(string memory) { return assets[_address].tla; } @@ -519,7 +519,7 @@ contract TokenIOStorage is Ownable { * @param _tokenTLA token TLA value * @return { "success" : "Returns true when successfully called from another contract" } */ - function setTokenTLA(address _address, string _tokenTLA) external onlyOwner returns(bool success) { + function setTokenTLA(address _address, string calldata _tokenTLA) external onlyOwner returns(bool success) { assets[_address].tla = _tokenTLA; return true; } @@ -539,7 +539,7 @@ contract TokenIOStorage is Ownable { * @param _address Pointer identifier for value in mapping * @return { "string" : "Returns the string value associated with the key" } */ - function getTokenVersion(address _address) external view returns(string) { + function getTokenVersion(address _address) external view returns(string memory) { return assets[_address].version; } @@ -549,7 +549,7 @@ contract TokenIOStorage is Ownable { * @param _tokenVersion token version value * @return { "success" : "Returns true when successfully called from another contract" } */ - function setTokenVersion(address _address, string _tokenVersion) external onlyOwner returns(bool success) { + function setTokenVersion(address _address, string calldata _tokenVersion) external onlyOwner returns(bool success) { assets[_address].version = _tokenVersion; return true; } @@ -569,7 +569,7 @@ contract TokenIOStorage is Ownable { * @param _currency Pointer identifier for value in mapping * @return { "uint" : "Returns the uint value associated with the key" } */ - function getTokenDecimals(string _currency) external view returns(uint) { + function getTokenDecimals(string calldata _currency) external view returns(uint) { return decimals[_currency]; } @@ -578,7 +578,7 @@ contract TokenIOStorage is Ownable { * @param _decimals decimals value * @return { "success" : "Returns true when successfully called from another contract" } */ - function setTokenDecimals(string _currency, uint _decimals) external onlyOwner returns(bool success) { + function setTokenDecimals(string calldata _currency, uint _decimals) external onlyOwner returns(bool success) { decimals[_currency] = _decimals; return true; } @@ -588,7 +588,7 @@ contract TokenIOStorage is Ownable { * @param _currency decimals value * @return { "success" : "Returns true when successfully called from another contract" } */ - function deleteTokenDecimals(string _currency) external onlyOwner returns(bool success) { + function deleteTokenDecimals(string calldata _currency) external onlyOwner returns(bool success) { delete decimals[_currency]; return true; } @@ -628,7 +628,7 @@ contract TokenIOStorage is Ownable { * @param _symbol Pointer identifier for value in mapping * @return { "uint" : "Returns the uint value associated with the key" } */ - function getTokenfxUSDBPSRate(string _symbol) external view returns(uint) { + function getTokenfxUSDBPSRate(string calldata _symbol) external view returns(uint) { return fxUSDBPSRates[_symbol]; } @@ -638,7 +638,7 @@ contract TokenIOStorage is Ownable { * @param _fxUSDBPSRate usdbps rate * @return { "uint" : "Returns the uint value associated with the key" } */ - function setTokenfxUSDBPSRate(string _symbol, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { + function setTokenfxUSDBPSRate(string calldata _symbol, uint _fxUSDBPSRate) external onlyOwner returns(bool success) { fxUSDBPSRates[_symbol] = _fxUSDBPSRate; return true; } @@ -648,7 +648,7 @@ contract TokenIOStorage is Ownable { * @param _symbol Pointer identifier for value in mapping * @return { "uint" : "Returns the uint value associated with the key" } */ - function deleteTokenfxUSDBPSRate(string _symbol) external onlyOwner returns(bool success) { + function deleteTokenfxUSDBPSRate(string calldata _symbol) external onlyOwner returns(bool success) { delete fxUSDBPSRates[_symbol]; return true; } diff --git a/truffle.js b/truffle.js index c25fba8..92dd2df 100644 --- a/truffle.js +++ b/truffle.js @@ -6,10 +6,10 @@ const NonceTrackerSubprovider = require("web3-provider-engine/subproviders/nonce module.exports = { networks: { develop: { - host: "0.0.0.0", - port: 9545, + host: "127.0.0.1", + port: 8545, network_id: "*", // Match any network id - gas: 7e6 + gas: 6e6 }, poa: { host: "104.236.47.153", @@ -46,6 +46,6 @@ module.exports = { enabled: true, runs: 200 }, - version: '0.4.24' + version: '0.5.2' } }; \ No newline at end of file From d4164e3a8576e0d3ae52008ef2c0183512a0b395 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Mon, 11 Feb 2019 21:57:41 +0200 Subject: [PATCH 30/40] solidity version migration --- test/TokenIOStorage.js | 4 ++-- token.config.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/TokenIOStorage.js b/test/TokenIOStorage.js index 900564f..09f3ace 100644 --- a/test/TokenIOStorage.js +++ b/test/TokenIOStorage.js @@ -127,7 +127,7 @@ contract("TokenIOStorage", function(accounts) { assert.equal(DELETE_TX['receipt']['status'], "0x1", "Transaction should succeed.") const GET_VALUE_END = await storage.getBytes(id) - assert.equal("0x", GET_VALUE_END, "Bytes value should be deleted from storage.") + assert.equal(null, GET_VALUE_END, "Bytes value should be deleted from storage.") }) it("Should set, get, and delete a bool value", async () => { @@ -240,7 +240,7 @@ contract("TokenIOStorage", function(accounts) { assert.equal(SET_TX['receipt']['status'], "0x1", "Transaction should succeed.") const GET_VALUE_BEG = await storage.getTokenFeeContract(id) - assert.equal(value, GET_VALUE_BEG, "Int value should be the same value retrieved from storage.") + assert.equal(value, GET_VALUE_BEG.toLowerCase(), "Int value should be the same value retrieved from storage.") const DELETE_TX = await storage.deleteTokenFeeContract(id) assert.equal(DELETE_TX['receipt']['status'], "0x1", "Transaction should succeed.") diff --git a/token.config.js b/token.config.js index 2987635..5fce97e 100644 --- a/token.config.js +++ b/token.config.js @@ -6,7 +6,7 @@ const USDx = { tokenTLA: 'USD', // tokenTLA tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 2, // tokenDecimals - feeContract: "0x0", // fee account + feeContract: "0x0000000000000000000000000000000000000000", // fee account fxBPSRate: 10000 } @@ -18,7 +18,7 @@ const USDc = { tokenTLA: 'USD', // tokenTLA tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 6, // tokenDecimals - feeContract: "0x0", // fee account + feeContract: "0x0000000000000000000000000000000000000000", // fee account fxBPSRate: 10000 } @@ -30,7 +30,7 @@ const MXNx = { tokenTLA: 'MXN', // tokenTLA tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 2, // tokenDecimals - feeContract: "0x0", // fee account + feeContract: "0x0000000000000000000000000000000000000000", // fee account fxBPSRate: 510 } @@ -42,7 +42,7 @@ const GBPx = { tokenTLA: 'GBP', // tokenTLA tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 2, // tokenDecimals - feeContract: "0x0", // fee account + feeContract: "0x0000000000000000000000000000000000000000", // fee account fxBPSRate: 13200 } @@ -54,7 +54,7 @@ const JPYx = { tokenTLA: 'JPY', // tokenTLA tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 0, // tokenDecimals - feeContract: "0x0", // fee account + feeContract: "0x0000000000000000000000000000000000000000", // fee account fxBPSRate: 90 } @@ -66,7 +66,7 @@ const EURx = { tokenTLA: 'EUR', // tokenTLA tokenVersion: 'v1.0.1', // tokenVersion tokenDecimals: 2, // tokenDecimals - feeContract: "0x0", // fee account + feeContract: "0x0000000000000000000000000000000000000000", // fee account fxBPSRate: 11700 } From 5c0d72fa0a5516e85eb3aba763f684747a85a404 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Sat, 16 Feb 2019 12:18:47 +0200 Subject: [PATCH 31/40] add proxy --- contracts/TokenIOERC20FeesApply.sol | 136 ++++++++------- contracts/TokenIOERC20FeesApplyProxy.sol | 147 ++++++++++++++++ contracts/TokenIOERC20Unlimited.sol | 2 +- contracts/TokenIOLib.sol | 51 ++++-- test/TokenIOERC20FeesApplyProxy.js | 203 +++++++++++++++++++++++ 5 files changed, 459 insertions(+), 80 deletions(-) create mode 100644 contracts/TokenIOERC20FeesApplyProxy.sol create mode 100644 test/TokenIOERC20FeesApplyProxy.js diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 712a3bd..34726ca 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -32,52 +32,59 @@ maintain data consistency between contract. contract TokenIOERC20FeesApply is Ownable { - using SafeMath for uint; - - //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage - using TokenIOLib for TokenIOLib.Data; - TokenIOLib.Data lib; - - event Transfer(address indexed from, address indexed to, uint256 amount); - - /** - * @notice Constructor method for ERC20 contract - * @param _storageContract address of TokenIOStorage contract - */ - constructor(address _storageContract) public { - //// @dev Set the storage contract for the interface - //// @dev This contract will be unable to use the storage constract until - //// @dev contract address is authorized with the storage contract - //// @dev Once authorized, Use the `setParams` method to set storage values - lib.Storage = TokenIOStorage(_storageContract); - - //// @dev set owner to contract initiator - owner[msg.sender] = true; - } + using SafeMath for uint; + //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage + using TokenIOLib for TokenIOLib.Data; + TokenIOLib.Data lib; - /** - @notice Sets erc20 globals and fee paramters - @param _name Full token name 'USD by token.io' - @param _symbol Symbol name 'USDx' - @param _tla Three letter abbreviation 'USD' - @param _version Release version 'v0.0.1' - @param _decimals Decimal precision - @param _feeContract Address of fee contract - @return { "success" : "Returns true if successfully called from another contract"} - */ - function setParams( - string memory _name, - string memory _symbol, - string memory _tla, - string memory _version, - uint _decimals, - address _feeContract, - uint _fxUSDBPSRate - ) onlyOwner public returns(bool success) { - require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), - "Error: Unable to set token params. Please check arguments."); - return true; + event Transfer(address indexed from, address indexed to, uint256 amount); + + address proxyImplementation; + + + /** + * @notice Constructor method for ERC20 contract + * @param _storageContract address of TokenIOStorage contract + */ + constructor(address _storageContract) public { + //// @dev Set the storage contract for the interface + //// @dev This contract will be unable to use the storage constract until + //// @dev contract address is authorized with the storage contract + //// @dev Once authorized, Use the `setParams` method to set storage values + lib.Storage = TokenIOStorage(_storageContract); + + //// @dev set owner to contract initiator + owner[msg.sender] = true; + } + + function initProxy(address _proxy) external onlyOwner { + proxyImplementation = _proxy; + } + + + + /** + @notice Sets erc20 globals and fee paramters + @param _name Full token name 'USD by token.io' + @param _symbol Symbol name 'USDx' + @param _tla Three letter abbreviation 'USD' + @param _version Release version 'v0.0.1' + @param _decimals Decimal precision + @param _feeContract Address of fee contract + @return { "success" : "Returns true if successfully called from another contract"} + */ + function setParams( + bytes32 _name, + bytes32 _symbol, + bytes32 _tla, + bytes32 _version, + uint _decimals, + address _feeContract, + uint _fxUSDBPSRate + ) onlyOwner public returns(bool success) { + require(lib.setTokenParams(lib.bytes32ToString(_name), lib.bytes32ToString(_symbol), lib.bytes32ToString(_tla), lib.bytes32ToString(_version), _decimals, _feeContract, _fxUSDBPSRate), + "Error: Unable to set token params. Please check arguments."); } /** @@ -85,7 +92,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_name" : "Returns name of token"} */ function name() public view returns (string memory _name) { - return lib.getTokenName(address(this)); + return lib.getTokenName(proxyImplementation); } /** @@ -93,7 +100,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_symbol" : "Returns symbol of token"} */ function symbol() public view returns (string memory _symbol) { - return lib.getTokenSymbol(address(this)); + return lib.getTokenSymbol(proxyImplementation); } /** @@ -101,7 +108,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_tla" : "Returns three-letter-abbreviation of token"} */ function tla() public view returns (string memory _tla) { - return lib.getTokenTLA(address(this)); + return lib.getTokenTLA(proxyImplementation); } /** @@ -109,7 +116,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_version" : "Returns version of token"} */ function version() public view returns (string memory _version) { - return lib.getTokenVersion(address(this)); + return lib.getTokenVersion(proxyImplementation); } /** @@ -117,7 +124,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_decimals" : "Returns number of decimals"} */ function decimals() public view returns (uint _decimals) { - return lib.getTokenDecimals(lib.getTokenSymbol(address(this))); + return lib.getTokenDecimals(lib.getTokenSymbol(proxyImplementation)); } /** @@ -125,7 +132,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"supply" : "Returns current total supply of token"} */ function totalSupply() public view returns (uint supply) { - return lib.getTokenSupply(lib.getTokenSymbol(address(this))); + return lib.getTokenSupply(lib.getTokenSymbol(proxyImplementation)); } /** @@ -135,7 +142,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"amount" : "Returns allowance of given account and spender"} */ function allowance(address account, address spender) public view returns (uint amount) { - return lib.getTokenAllowance(lib.getTokenSymbol(address(this)), account, spender); + return lib.getTokenAllowance(lib.getTokenSymbol(proxyImplementation), account, spender); } /** @@ -144,7 +151,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"balance" : "Returns balance amount"} */ function balanceOf(address account) public view returns (uint balance) { - return lib.getTokenBalance(lib.getTokenSymbol(address(this)), account); + return lib.getTokenBalance(lib.getTokenSymbol(proxyImplementation), account); } /** @@ -158,20 +165,25 @@ contract TokenIOERC20FeesApply is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { - feeAccount = lib.getFeeContract(address(this)); + feeAccount = lib.getFeeContract(proxyImplementation); (max, min, bps, flat) = lib.getFees(feeAccount); feeMsg = lib.getFeeMsg(feeAccount); } /** - * @notice Calculates fee of a given transfer amount + * @notice Calculates fee of a given transfer amount (external) * @param amount Amount to calculcate fee value * @return {"fees": "Returns the calculated transaction fees based on the fee contract parameters"} */ function calculateFees(uint amount) external view returns (uint fees) { - return calculateFees(lib.getFeeContract(address(this)), amount); + return calculateFees(lib.getFeeContract(proxyImplementation), amount); } + /** + * @notice Calculates fee of a given transfer amount (internal) + * @param amount Amount to calculcate fee value + * @return {"fees": "Returns the calculated transaction fees based on the fee contract parameters"} + */ function calculateFees(address feeContract, uint amount) internal view returns (uint fees) { return lib.calculateFees(feeContract, amount); } @@ -183,8 +195,8 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"success" : "Returns true if transfer succeeds"} */ function transfer(address to, uint amount) public notDeprecated returns(bool success) { - address feeContract = lib.getFeeContract(address(this)); - (string memory currency, address[3] memory addresses) = lib.getTransferDetails(address(this), [msg.sender, to, feeContract]); + address feeContract = lib.getFeeContract(proxyImplementation); + (string memory currency, address[3] memory addresses) = lib.getTransferDetails(proxyImplementation, [tx.origin, to, feeContract]); uint fees = calculateFees(feeContract, amount); uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; @@ -208,8 +220,8 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"success" : "Returns true if transferFrom succeeds"} */ function transferFrom(address from, address to, uint amount) public notDeprecated returns(bool success) { - address feeContract = lib.getFeeContract(address(this)); - (string memory currency, address[3] memory addresses) = lib.getTransferDetails(address(this), [from, to, feeContract]); + address feeContract = lib.getFeeContract(proxyImplementation); + (string memory currency, address[3] memory addresses) = lib.getTransferDetails(proxyImplementation, [from, to, feeContract]); uint fees = calculateFees(feeContract, amount); uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; @@ -221,7 +233,7 @@ contract TokenIOERC20FeesApply is Ownable { /// @notice This transaction will fail if the msg.sender does not have an approved allowance. require( - lib.updateAllowance(lib.getTokenSymbol(address(this)), from, amount.add(fees)), + lib.updateAllowance(lib.getTokenSymbol(proxyImplementation), from, amount.add(fees), tx.origin), "Error: Unable to update allowance for spender." ); @@ -251,14 +263,14 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"deprecated" : "Returns true if deprecated, false otherwise"} */ function deprecateInterface() public onlyOwner returns (bool deprecated) { - require(lib.setDeprecatedContract(address(this)), + require(lib.setDeprecatedContract(proxyImplementation), "Error: Unable to deprecate contract!"); return true; } modifier notDeprecated() { /// @notice throws if contract is deprecated - require(!lib.isContractDeprecated(address(this)), + require(!lib.isContractDeprecated(proxyImplementation), "Error: Contract has been deprecated, cannot perform operation!"); _; } diff --git a/contracts/TokenIOERC20FeesApplyProxy.sol b/contracts/TokenIOERC20FeesApplyProxy.sol new file mode 100644 index 0000000..2d02753 --- /dev/null +++ b/contracts/TokenIOERC20FeesApplyProxy.sol @@ -0,0 +1,147 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + + +contract TokenIOERC20FeesApplyProxy is Ownable { + + address tokenIOERC20FeesApplyImpl; + + constructor(address _tokenIOERC20FeesApplyImpl) public { + tokenIOERC20FeesApplyImpl = _tokenIOERC20FeesApplyImpl; + } + + function upgradeTokenImplamintation(address _newTokenIOERC20FeesApplyImpl) onlyOwner external { + require (_newTokenIOERC20FeesApplyImpl != address(0)); + tokenIOERC20FeesApplyImpl = _newTokenIOERC20FeesApplyImpl; + } + + function setParams( + string calldata _name, + string calldata _symbol, + string calldata _tla, + string calldata _version, + uint256 _decimals, + address _feeContract, + uint256 _fxUSDBPSRate + ) onlyOwner external returns(bool) { + (bool success, ) = tokenIOERC20FeesApplyImpl.call(abi.encodeWithSignature("setParams(bytes32,bytes32,bytes32,bytes32,uint256,address,uint256)", stringToBytes32(_name), stringToBytes32(_symbol), stringToBytes32(_tla), stringToBytes32(_version), _decimals, _feeContract, _fxUSDBPSRate)); + return success; + } + + function transfer(address to, uint256 amount) external returns(bool) { + (bool success, ) = tokenIOERC20FeesApplyImpl.call(abi.encodeWithSignature("transfer(address,uint256)", to, amount)); + require(success, "Unable to execute transfer"); + + return success; + } + + function transferFrom(address from, address to, uint256 amount) external returns(bool) { + (bool success, ) = tokenIOERC20FeesApplyImpl.call(abi.encodeWithSignature("transferFrom(address,address,uint256)", from, to, amount)); + require(success, "Unable to execute transferFrom"); + return success; + } + + function approve(address spender, uint256 amount) external returns (bool) { + (bool success, ) = tokenIOERC20FeesApplyImpl.call(abi.encodeWithSignature("approve(address,uint256)", spender, amount)); + require(success, "Unable to execute approve"); + return success; + } + + function name() external view returns (string memory) { + bytes memory payload = abi.encodeWithSignature("name()"); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToString(returnData); + } + + function symbol() external view returns (string memory) { + bytes memory payload = abi.encodeWithSignature("symbol()"); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToString(returnData); + } + + function tla() external view returns (string memory) { + bytes memory payload = abi.encodeWithSignature("tla()"); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToString(returnData); + } + + function version() external view returns (string memory) { + bytes memory payload = abi.encodeWithSignature("version()"); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToString(returnData); + } + + function decimals() external view returns (uint) { + bytes memory payload = abi.encodeWithSignature("decimals()"); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToUint256(returnData); + } + + function totalSupply() external view returns (uint256) { + bytes memory payload = abi.encodeWithSignature("totalSupply()"); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToUint256(returnData); + } + + function allowance(address account, address spender) external view returns (uint256) { + bytes memory payload = abi.encodeWithSignature("allowance(address,address)", account, spender); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToUint256(returnData); + } + + function balanceOf(address account) external view returns (uint256) { + bytes memory payload = abi.encodeWithSignature("balanceOf(address)", account); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToUint256(returnData); + } + + function calculateFees(uint amount) external view returns (uint256) { + bytes memory payload = abi.encodeWithSignature("calculateFees(uint256)", amount); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); + return bytesToUint256(returnData); + } + + function deprecateInterface() external onlyOwner returns (bool) { + bytes memory payload = abi.encodeWithSignature("deprecateInterface()"); + (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.call(payload); + return bytesToUint256(returnData) != 0; + } + + function stringToBytes32(string memory source) internal view returns (bytes32 result) { + bytes memory tempEmptyStringTest = bytes(source); + if (tempEmptyStringTest.length == 0) { + return 0x0; + } + + assembly { + result := mload(add(source, 32)) + } + } + + function bytesToString(bytes memory x) internal view returns (string memory) { + bytes memory bytesString = new bytes(20); + uint charCount = 0; + for (uint j = 0; j < 32; j++) { + byte char = byte(bytes32(bytesToUint256(x) * 2 ** (8 * j))); + if (char != 0) { + bytesString[charCount] = char; + charCount++; + } + } + bytes memory bytesStringTrimmed = new bytes(charCount); + for (uint j = 0; j < charCount; j++) { + bytesStringTrimmed[j] = bytesString[j]; + } + return string(bytesStringTrimmed); + } + + function bytesToUint256(bytes memory _b) internal view returns (uint256){ + uint256 number; + for(uint i=0;i<_b.length;i++){ + number = number + uint256(uint8(_b[i]))*(2**(8*(_b.length-(i+1)))); + } + return number; + } + +} diff --git a/contracts/TokenIOERC20Unlimited.sol b/contracts/TokenIOERC20Unlimited.sol index dd74985..11c11ac 100644 --- a/contracts/TokenIOERC20Unlimited.sol +++ b/contracts/TokenIOERC20Unlimited.sol @@ -180,7 +180,7 @@ contract TokenIOERC20Unlimited is Ownable { /// @notice This transaction will fail if the msg.sender does not have an approved allowance. require( - lib.updateAllowance(lib.getTokenSymbol(address(this)), from, amount), + lib.updateAllowance(lib.getTokenSymbol(address(this)), from, amount, tx.origin), "Error: Unable to update allowance for spender." ); diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 21ed2d6..44db6cf 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -49,7 +49,7 @@ library TokenIOLib { function setTokenParams(Data storage self, string memory _name, string memory _symbol, string memory _tla, string memory _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal returns(bool success) { require( - self.Storage.setTokenParams(address(this), _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + self.Storage.setTokenParams(msg.sender, _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract."); return true; } @@ -64,7 +64,7 @@ library TokenIOLib { */ function setTokenName(Data storage self, string memory tokenName) internal returns (bool success) { require( - self.Storage.setTokenName(address(this), tokenName), + self.Storage.setTokenName(msg.sender, tokenName), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -80,7 +80,7 @@ library TokenIOLib { */ function setTokenSymbol(Data storage self, string memory tokenSymbol) internal returns (bool success) { require( - self.Storage.setTokenSymbol(address(this), tokenSymbol), + self.Storage.setTokenSymbol(msg.sender, tokenSymbol), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -96,7 +96,7 @@ library TokenIOLib { */ function setTokenTLA(Data storage self, string memory tokenTLA) internal returns (bool success) { require( - self.Storage.setTokenTLA(address(this), tokenTLA), + self.Storage.setTokenTLA(msg.sender, tokenTLA), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -112,7 +112,7 @@ library TokenIOLib { */ function setTokenVersion(Data storage self, string memory tokenVersion) internal returns (bool success) { require( - self.Storage.setTokenVersion(address(this), tokenVersion), + self.Storage.setTokenVersion(msg.sender, tokenVersion), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -162,7 +162,7 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setFeeMsg(Data storage self, bytes memory feeMsg) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fee.msg', address(this))); + bytes32 id = keccak256(abi.encodePacked('fee.msg', msg.sender)); require( self.Storage.setBytes(id, feeMsg), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." @@ -182,7 +182,7 @@ library TokenIOLib { */ function setFeeContract(Data storage self, address feeContract) internal returns (bool success) { require( - self.Storage.setTokenFeeContract(address(this), feeContract), + self.Storage.setTokenFeeContract(msg.sender, feeContract), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -200,7 +200,7 @@ library TokenIOLib { function setTokenNameSpace(Data storage self, string memory currency) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('token.namespace', currency)); require( - self.Storage.setAddress(id, address(this)), + self.Storage.setAddress(id, msg.sender), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -595,7 +595,7 @@ library TokenIOLib { require(address(to) != address(0), "Error: `to` address cannot be null." ); require(amount > 0, "Error: `amount` must be greater than zero"); - address feeContract = getFeeContract(self, address(this)); + address feeContract = getFeeContract(self, msg.sender); uint fees = calculateFees(self, feeContract, amount); require( @@ -636,7 +636,7 @@ library TokenIOLib { "Error: `to` address must not be null." ); - address feeContract = getFeeContract(self, address(this)); + address feeContract = getFeeContract(self, msg.sender); uint fees = calculateFees(self, feeContract, amount); /// @dev NOTE: This transaction will fail if the spending amount exceeds the daily limit @@ -660,7 +660,7 @@ library TokenIOLib { /// @dev Attempt to update the spender allowance /// @notice this will throw if the allowance has not been set. require( - updateAllowance(self, currency, from, amount), + updateAllowance(self, currency, from, amount, tx.origin), "Error: Unable to update allowance for spender." ); @@ -711,8 +711,8 @@ library TokenIOLib { * @param amount Value to reduce allowance by (i.e. the amount spent) * @return { "success" : "Return true if successfully called from another contract" } */ - function updateAllowance(Data storage self, string memory currency, address account, uint amount) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, msg.sender))); + function updateAllowance(Data storage self, string memory currency, address account, uint amount, address sender) internal returns (bool success) { + bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, sender))); require( self.Storage.setUint(id, self.Storage.getUint(id).sub(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." @@ -733,27 +733,27 @@ library TokenIOLib { require(spender != address(0), "Error: `spender` address cannot be null."); - string memory currency = getTokenSymbol(self, address(this)); + string memory currency = getTokenSymbol(self, msg.sender); require( getTokenFrozenBalance(self, currency, getForwardedAccount(self, spender)) == 0, "Error: Spender must not have a frozen balance directly"); - bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, msg.sender), getForwardedAccount(self, spender))); + bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, tx.origin), getForwardedAccount(self, spender))); require( self.Storage.getUint(id_a) == 0 || amount == 0, "Error: Allowance must be zero (0) before setting an updated allowance for spender."); require( - self.Storage.getBalance(getForwardedAccount(self, msg.sender), currency) >= amount, + self.Storage.getBalance(getForwardedAccount(self, tx.origin), currency) >= amount, "Error: Allowance cannot exceed msg.sender token balance."); require( self.Storage.setUint(id_a, amount), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); - emit Approval(msg.sender, spender, amount); + emit Approval(tx.origin, spender, amount); return true; } @@ -1221,4 +1221,21 @@ library TokenIOLib { } + function bytes32ToString(Data storage self, bytes32 x) internal pure returns (string memory) { + bytes memory bytesString = new bytes(32); + uint charCount = 0; + for (uint j = 0; j < 32; j++) { + byte char = byte(bytes32(uint(x) * 2 ** (8 * j))); + if (char != 0) { + bytesString[charCount] = char; + charCount++; + } + } + bytes memory bytesStringTrimmed = new bytes(charCount); + for (uint j = 0; j < charCount; j++) { + bytesStringTrimmed[j] = bytesString[j]; + } + return string(bytesStringTrimmed); + } + } diff --git a/test/TokenIOERC20FeesApplyProxy.js b/test/TokenIOERC20FeesApplyProxy.js new file mode 100644 index 0000000..1df2d2a --- /dev/null +++ b/test/TokenIOERC20FeesApplyProxy.js @@ -0,0 +1,203 @@ +const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOERC20FeesApply = artifacts.require("./TokenIOERC20FeesApply.sol") +const TokenIOERC20FeesApplyProxy = artifacts.require("./TokenIOERC20FeesApplyProxy.sol") +const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") +const { mode, development, production } = require('../token.config.js') +const { utils } = require('ethers') + +const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode + == 'production' ? production : development //set stage + +contract("TokenIOERC20FeesApplyProxy", function(accounts) { + // pull in usdx params + const USDx = TOKEN_DETAILS['USDx'] + + // create test accounts + const TEST_ACCOUNT_1 = accounts[0] + const TEST_ACCOUNT_2 = accounts[1] + const TEST_ACCOUNT_3 = accounts[2] + + const DEPOSIT_AMOUNT = 10000e2 + const LIMIT_AMOUNT = (DEPOSIT_AMOUNT/2) + const TRANSFER_AMOUNT = (DEPOSIT_AMOUNT/4) + + const TOKEN_NAME = USDx.tokenName; + const TOKEN_SYMBOL = USDx.tokenSymbol + const TOKEN_TLA = USDx.tokenTLA + const TOKEN_VERSION = USDx.tokenVersion + const FEE_CONTRACT = USDx.feeContract + const TOKEN_DECIMALS = USDx.tokenDecimals + + beforeEach(async function () { + this.tokenIOStorage = await TokenIOStorage.deployed() + this.tokenIOERC20FeesApply = await TokenIOERC20FeesApply.deployed() + this.tokenIOCurrencyAuthority = await TokenIOCurrencyAuthority.deployed(); + this.tokenIOERC20FeesApplyProxy = await TokenIOERC20FeesApplyProxy.new(this.tokenIOERC20FeesApply.address); + await this.tokenIOERC20FeesApply.allowOwnership(this.tokenIOERC20FeesApplyProxy.address); + await this.tokenIOERC20FeesApply.initProxy(this.tokenIOERC20FeesApplyProxy.address); + }); + /* PARAMETERS */ + + describe('transfer', function () { + it('Should pass', async function () { + const kycReceipt1 = await this.tokenIOCurrencyAuthority.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt2 = await this.tokenIOCurrencyAuthority.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt3 = await this.tokenIOCurrencyAuthority.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") + + await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); + const tokenSymbol = await this.tokenIOERC20FeesApplyProxy.symbol() + assert.equal(tokenSymbol, 'USDx', "Incorrect token symbol") + const depositReceipt = await this.tokenIOCurrencyAuthority.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + + const balance1 = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2 = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() + + assert.equal(balance1, DEPOSIT_AMOUNT, "first account should contain all the deposit initially") + assert.equal(balance2, 0, "Second account should have zero balance") + + const transferReceipt = await this.tokenIOERC20FeesApplyProxy.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + + const balance1b = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2b = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() + + // calc fees + const TX_FEES = +(await this.tokenIOERC20FeesApplyProxy.calculateFees(TRANSFER_AMOUNT)).toString() + + // check spending limit remaining + // Spending limit should remain unchanged! + const SPENDING_LIMIT = +(await this.tokenIOCurrencyAuthority.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() + const SPENDING_REMAINING = +(await this.tokenIOCurrencyAuthority.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + + assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT), + "Remaining spending amount should remain equal to set limit amount") + + // calculate correct current balance + console.log("BALANCE: " + balance1b) + assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT-TX_FEES)) + assert.equal(balance2b, TRANSFER_AMOUNT) + }); + }); + + describe('approve', function () { + it('Should pass', async function () { + const kycReceipt1 = await this.tokenIOCurrencyAuthority.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") + await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); + const tokenSymbol = await this.tokenIOERC20FeesApplyProxy.symbol() + assert.equal(tokenSymbol, 'USDx', "Incorrect token symbol") + const depositReceipt = await this.tokenIOCurrencyAuthority.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + + const balance1a = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)) + const balance1b = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)) + console.log(balance1a) + + const approveReceipt = await this.tokenIOERC20FeesApplyProxy.approve(TEST_ACCOUNT_2, balance1a) + const allowance = +(await this.tokenIOERC20FeesApply.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + + assert.notEqual(allowance, 0, "Allowance should not equal zero.") + assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") + }); + }); + + describe('transferFrom', function () { + it('Should pass', async function () { + const TEST_ACT_1_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACT_2_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() + const TEST_ACT_3_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_3)).toString() + + assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") + assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") + + const BEG_ALLOWANCE = await this.tokenIOERC20FeesApplyProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) + + const TRANSFER_FROM_AMOUNT = +(await this.tokenIOCurrencyAuthority.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + const transferFromReceipt = await this.tokenIOERC20FeesApplyProxy.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) + + const TX_FEES = +(await this.tokenIOERC20FeesApplyProxy.calculateFees(TRANSFER_FROM_AMOUNT)).toString() + + const TEST_ACT_1_END_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)) + assert.equal(TEST_ACT_1_END_BALANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT-TX_FEES), "Ending balance should be net of transfer amount and fees") + + const TEST_ACT_3_END_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(TEST_ACT_3_END_BALANCE, TRANSFER_FROM_AMOUNT, "TEST_ACCOUNT_3 Balance should equal transfer amount"); + + const END_ALLOWANCE = +(await this.tokenIOERC20FeesApplyProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + assert.equal(END_ALLOWANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT-TX_FEES), "Allowance should be reduced by amount transferred") + }); + }); + + describe('calculateFees', function () { + it('Should pass', async function () { + const TX_FEES = +(await this.tokenIOERC20FeesApplyProxy.calculateFees(TRANSFER_AMOUNT)).toString() + assert.notEqual(TX_FEES, 0, "TX fee should not equal zero.") + }); + }); + + describe('balanceOf', function () { + it('Should pass', async function () { + const balance = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() + assert.equal(balance, TRANSFER_AMOUNT, "first account should contain all the deposit initially") + }); + }); + + describe('allowance', function () { + it('Should pass', async function () { + const allowance = await this.tokenIOERC20FeesApplyProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(allowance.toNumber(), 249848) + }); + }); + + describe('setParams', function () { + it('Should pass', async function () { + await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); + + let decimals = await this.tokenIOERC20FeesApplyProxy.decimals(); + assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") + }); + }); + + describe('name', function () { + it('Should pass', async function () { + await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); + + let name = await this.tokenIOERC20FeesApplyProxy.name(); + assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") + }); + }); + + describe('symbol', function () { + it('Should pass', async function () { + await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); + + let symbol = await this.tokenIOERC20FeesApplyProxy.symbol(); + assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") + }); + }); + + describe('version', function () { + it('Should pass', async function () { + await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); + + let version = await this.tokenIOERC20FeesApplyProxy.version(); + assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") + }); + }); + + describe('tla', function () { + it('Should pass', async function () { + await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); + + let tla = await this.tokenIOERC20FeesApplyProxy.tla(); + assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") + }); + }); + + describe('Total Supply', function () { + it('Should pass', async function () { + let totalSupply = await this.tokenIOERC20FeesApplyProxy.totalSupply(); + assert.equal(totalSupply.toNumber(), DEPOSIT_AMOUNT, "Token name should be set in the storage contract.") + }); + }); + +}) \ No newline at end of file From ed2fb5ff9801d5fc8aa87b04f3b88a73fafa55da Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Tue, 19 Feb 2019 09:01:53 +0200 Subject: [PATCH 32/40] adding proxies --- contracts/Proxy.sol | 67 + contracts/TokenIOAuthority.sol | 12 +- contracts/TokenIOAuthorityProxy.sol | 74 + contracts/TokenIOCurrencyAuthority.sol | 24 +- contracts/TokenIOCurrencyAuthorityProxy.sol | 131 + contracts/TokenIOERC20.sol | 35 +- contracts/TokenIOERC20FeesApply.sol | 145 +- contracts/TokenIOERC20FeesApplyProxy.sol | 153 +- contracts/TokenIOERC20Proxy.sol | 128 + contracts/TokenIOERC20Unlimited.sol | 41 +- contracts/TokenIOERC20UnlimitedProxy.sol | 128 + contracts/TokenIOFeeContract.sol | 22 +- contracts/TokenIOFeeContractProxy.sol | 56 + contracts/TokenIOLib.sol | 53 +- contracts/TokenIOMerchant.sol | 23 +- contracts/TokenIOMerchantProxy.sol | 50 + contracts/TokenIONameSpace.sol | 8 + contracts/TokenIONameSpaceProxy.sol | 31 + contracts/TokenIOProxy.sol | 75 + contracts/TokenIOStableSwap.sol | 14 +- contracts/TokenIOStableSwapProxy.sol | 182 + contracts/TokenIOStorage.sol | 2 +- deployed/mainnet-deprecated/TokenIOLib.json | 87990 ----------------- deployed/mainnet-v1.0.1/TokenIOLib.json | 87996 ------------------ package.json | 4 +- test/TokenIOERC20FeesApply.js | 4 +- test/TokenIOStableSwap.js | 5 +- 27 files changed, 1205 insertions(+), 176248 deletions(-) create mode 100644 contracts/Proxy.sol create mode 100644 contracts/TokenIOAuthorityProxy.sol create mode 100644 contracts/TokenIOCurrencyAuthorityProxy.sol create mode 100644 contracts/TokenIOERC20Proxy.sol create mode 100644 contracts/TokenIOERC20UnlimitedProxy.sol create mode 100644 contracts/TokenIOFeeContractProxy.sol create mode 100644 contracts/TokenIOMerchantProxy.sol create mode 100644 contracts/TokenIONameSpaceProxy.sol create mode 100644 contracts/TokenIOProxy.sol create mode 100644 contracts/TokenIOStableSwapProxy.sol delete mode 100644 deployed/mainnet-deprecated/TokenIOLib.json delete mode 100644 deployed/mainnet-v1.0.1/TokenIOLib.json diff --git a/contracts/Proxy.sol b/contracts/Proxy.sol new file mode 100644 index 0000000..85de2bf --- /dev/null +++ b/contracts/Proxy.sol @@ -0,0 +1,67 @@ +pragma solidity 0.5.2; + +/** + * @title Proxy + * @dev Implements delegation of calls to other contracts, with proper + * forwarding of return values and bubbling of failures. + * It defines a fallback function that delegates all calls to the address + * returned by the abstract _implementation() internal function. + */ +contract Proxy { + /** + * @dev Fallback function. + * Implemented entirely in `_fallback`. + */ + function () payable external { + _fallback(); + } + + /** + * @return The Address of the implementation. + */ + function _implementation() internal view returns (address); + + /** + * @dev Delegates execution to an implementation contract. + * This is a low level function that doesn't return to its internal call site. + * It will return to the external caller whatever the implementation returns. + * @param implementation Address to delegate. + */ + function _delegate(address implementation) internal { + assembly { + // Copy msg.data. We take full control of memory in this inline assembly + // block because it will not return to Solidity code. We overwrite the + // Solidity scratch pad at memory position 0. + calldatacopy(0, 0, calldatasize) + + // Call the implementation. + // out and outsize are 0 because we don't know the size yet. + let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0) + + // Copy the returned data. + returndatacopy(0, 0, returndatasize) + + switch result + // delegatecall returns 0 on error. + case 0 { revert(0, returndatasize) } + default { return(0, returndatasize) } + } + } + + /** + * @dev Function that is run as the first thing in the fallback function. + * Can be redefined in derived contracts to add functionality. + * Redefinitions must call super._willFallback(). + */ + function _willFallback() internal { + } + + /** + * @dev fallback implementation. + * Extracted to enable manual triggering. + */ + function _fallback() internal { + _willFallback(); + _delegate(_implementation()); + } +} diff --git a/contracts/TokenIOAuthority.sol b/contracts/TokenIOAuthority.sol index abeccf4..ea872f4 100644 --- a/contracts/TokenIOAuthority.sol +++ b/contracts/TokenIOAuthority.sol @@ -31,6 +31,8 @@ contract TokenIOAuthority is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; + address public proxyInstance; + /** * @notice Constructor method for Authority contract * @param _storageContract Ethereum Address of TokenIOStorage contract @@ -48,13 +50,19 @@ contract TokenIOAuthority is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } + /** * @notice Registers a firm as authorized true/false * @param firmName Name of firm * @param _authorized Authorization status * @return {"success" : "Returns true if lib.setRegisteredFirm succeeds"} */ - function setRegisteredFirm(string memory firmName, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) { + function setRegisteredFirm(string memory firmName, bool _authorized, address sender) public onlyAuthority(firmName, sender) returns (bool success) { /// @notice set firm registration status require( lib.setRegisteredFirm(firmName, _authorized), @@ -70,7 +78,7 @@ contract TokenIOAuthority is Ownable { * @param _authorized Authorization status * @return {"success" : "Returns true if lib.setRegisteredAuthority succeeds"} */ - function setRegisteredAuthority(string memory firmName, address authority, bool _authorized) public onlyAuthority(firmName, msg.sender) returns (bool success) { + function setRegisteredAuthority(string memory firmName, address authority, bool _authorized, address sender) public onlyAuthority(firmName, sender) returns (bool success) { /// @notice set authority of firm to given status require( lib.setRegisteredAuthority(firmName, authority, _authorized), diff --git a/contracts/TokenIOAuthorityProxy.sol b/contracts/TokenIOAuthorityProxy.sol new file mode 100644 index 0000000..44d4c50 --- /dev/null +++ b/contracts/TokenIOAuthorityProxy.sol @@ -0,0 +1,74 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + +interface TokenIOFeeContractI { + function setRegisteredFirm(string memory firmName, bool _authorized) public returns (bool success); + + function setRegisteredAuthority(string memory firmName, address authority, bool _authorized) public returns (bool success); + + function getFirmFromAuthority(address authority) public view returns (string memory firm); + + function isRegisteredFirm(string memory firmName) public view returns (bool status); + + function isRegisteredToFirm(string memory firmName, address authority) public view returns (bool registered); + + function isRegisteredAuthority(address authority) public view returns (bool registered); + + function setMasterFeeContract(address feeContract) public returns (bool success); +} + +contract TokenIOAuthorityProxy is Ownable { + + TokenIOAuthorityI tokenIOAuthorityImpl; + + constructor(address _tokenIOAuthorityImpl) public { + tokenIOAuthorityImpl = TokenIOFeeContractI(_tokenIOAuthorityImpl); + } + + function upgradeTokenImplamintation(address _newTokenIOAuthorityImpl) onlyOwner external { + require(_newTokenIOAuthorityImpl != address(0)); + tokenIOAuthorityImpl = TokenIOFeeContractI(_newTokenIOAuthorityImpl); + } + + function setRegisteredFirm(string memory firmName, bool _authorized) public returns (bool success) { + require( + tokenIOAuthorityImpl.setRegisteredFirm(firmName, _authorized, msg.sender), + "Unable to execute setRegisteredFirm" + ); + return true; + } + + function setRegisteredAuthority(string memory firmName, address authority, bool _authorized) public returns (bool success) { + require( + tokenIOAuthorityImpl.setRegisteredAuthority(firmName, _authorized, msg.sender), + "Unable to execute setRegisteredFirm" + ); + return true; + } + + function getFirmFromAuthority(address authority) public view returns (string memory firm) { + return tokenIOAuthorityImpl.getFirmFromAuthority(authority); + } + + function isRegisteredFirm(string memory firmName) public view returns (bool status) { + return tokenIOAuthorityImpl.isRegisteredFirm(firmName); + } + + function isRegisteredToFirm(string memory firmName, address authority) public view returns (bool registered) { + return tokenIOAuthorityImpl.isRegisteredToFirm(firmName, authority); + } + + function isRegisteredAuthority(address authority) public view returns (bool registered) { + return tokenIOAuthorityImpl.isRegisteredAuthority(authority); + } + + function setMasterFeeContract(address feeContract) public onlyOwner returns (bool success) { + require( + tokenIOAuthorityImpl.setMasterFeeContract(feeContract), + "Unable to execute setMasterFeeContract" + ); + return true; + } + +} diff --git a/contracts/TokenIOCurrencyAuthority.sol b/contracts/TokenIOCurrencyAuthority.sol index e149702..4652ed5 100644 --- a/contracts/TokenIOCurrencyAuthority.sol +++ b/contracts/TokenIOCurrencyAuthority.sol @@ -29,6 +29,8 @@ contract TokenIOCurrencyAuthority is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; + address public proxyInstance; + /** * @notice Constructor method for CurrencyAuthority contract * @param _storageContract Address of TokenIOStorage contract @@ -45,6 +47,12 @@ contract TokenIOCurrencyAuthority is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } + /** * @notice Gets balance of sepcified account for a given currency * @param currency Currency symbol 'USDx' @@ -71,7 +79,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function freezeAccount(address account, bool isAllowed, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function freezeAccount(address account, bool isAllowed, string memory issuerFirm, address sender) public onlyAuthority(issuerFirm, sender) returns (bool success) { // @notice updates account status // @dev !!! mutates storage state require( @@ -88,7 +96,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function approveKYC(address account, bool isApproved, uint limit, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function approveKYC(address account, bool isApproved, uint limit, string memory issuerFirm, address sender) public onlyAuthority(issuerFirm, sender) returns (bool success) { // @notice updates kyc approval status // @dev !!! mutates storage state require( @@ -120,7 +128,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function approveKYCAndDeposit(string memory currency, address account, uint amount, uint limit, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function approveKYCAndDeposit(string memory currency, address account, uint amount, uint limit, string memory issuerFirm, address sender) public onlyAuthority(issuerFirm, sender) returns (bool success) { /// @notice updates kyc approval status /// @dev !!! mutates storage state require( @@ -155,7 +163,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function setAccountSpendingLimit(address account, uint limit, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function setAccountSpendingLimit(address account, uint limit, string memory issuerFirm, address sender) public onlyAuthority(issuerFirm, sender) returns (bool success) { require( lib.setAccountSpendingLimit(account, limit), "Error: Unable to set initial spending limit for account. Please check issuerFirm and firm authority are registered" @@ -189,7 +197,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Firm setting the foreign currency exchange * @return { "success": "Returns true if successfully called from another contract"} */ - function setFxBpsRate(string memory currency, uint bpsRate, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function setFxBpsRate(string memory currency, uint bpsRate, string memory issuerFirm, address sender) public onlyAuthority(issuerFirm, sender) returns (bool success) { require( lib.setFxUSDBPSRate(currency, bpsRate), "Error: Unable to set FX USD basis points rate. Please ensure issuerFirm is authorized" @@ -214,7 +222,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function approveForwardedAccount(address originalAccount, address updatedAccount, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function approveForwardedAccount(address originalAccount, address updatedAccount, string memory issuerFirm, address sender) public onlyAuthority(issuerFirm, sender) returns (bool success) { // @notice updatesa forwarded account // @dev !!! mutates storage state require( @@ -231,7 +239,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder; * @return { "success": "Returns true if successfully called from another contract"} */ - function deposit(string memory currency, address account, uint amount, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function deposit(string memory currency, address account, uint amount, string memory issuerFirm, address sender) public onlyAuthority(issuerFirm, sender) returns (bool success) { require( lib.verifyAccount(account), "Error: Account is not verified!" @@ -253,7 +261,7 @@ contract TokenIOCurrencyAuthority is Ownable { * @param issuerFirm Name of the issuer firm with authority on account holder * @return { "success": "Returns true if successfully called from another contract"} */ - function withdraw(string memory currency, address account, uint amount, string memory issuerFirm) public onlyAuthority(issuerFirm, msg.sender) returns (bool success) { + function withdraw(string memory currency, address account, uint amount, string memory issuerFirm, address sender) public onlyAuthority(issuerFirm, sender) returns (bool success) { require( lib.verifyAccount(account), "Error: Account is not verified!" diff --git a/contracts/TokenIOCurrencyAuthorityProxy.sol b/contracts/TokenIOCurrencyAuthorityProxy.sol new file mode 100644 index 0000000..e37604a --- /dev/null +++ b/contracts/TokenIOCurrencyAuthorityProxy.sol @@ -0,0 +1,131 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + +interface TokenIOCurrencyAuthorityI { + function getTokenBalance(string memory currency, address account) public view returns (uint balance); + + function getTokenSupply(string memory currency) public view returns (uint supply); + + function freezeAccount(address account, bool isAllowed, string memory issuerFirm) public returns (bool success); + + function approveKYC(address account, bool isApproved, uint limit, string memory issuerFirm) public returns (bool success); + + function approveKYCAndDeposit(string memory currency, address account, uint amount, uint limit, string memory issuerFirm) public returns (bool success); + + function setAccountSpendingLimit(address account, uint limit, string memory issuerFirm) public returns (bool success); + + function getAccountSpendingRemaining(address account) public view returns (uint spendingRemaining); + + function getAccountSpendingLimit(address account) public view returns (uint spendingLimit); + + function setFxBpsRate(string memory currency, uint bpsRate, string memory issuerFirm) public returns (bool success); + + function getFxUSDAmount(string memory currency, uint fxAmount) public view returns (uint usdAmount); + + function approveForwardedAccount(address originalAccount, address updatedAccount, string memory issuerFirm) public returns (bool success); + + function deposit(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success); + + function withdraw(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success); +} + +contract TokenIOCurrencyAuthorityProxy is Ownable { + + TokenIOCurrencyAuthorityI tokenIOCurrencyAuthorityImpl; + + constructor(address _tokenIOCurrencyAuthorityImpl) public { + tokenIOCurrencyAuthorityImpl = TokenIOCurrencyAuthorityI(_tokenIOCurrencyAuthorityImpl); + } + + function upgradeTokenImplamintation(address _newTokenIOFeeContractImpl) onlyOwner external { + require(_newTokenIOFeeContractImpl != address(0)); + tokenIOCurrencyAuthorityImpl = TokenIOCurrencyAuthorityI(_newTokenIOCurrencyAuthorityImpl); + } + + function getTokenBalance(string memory currency, address account) public view returns (uint balance) { + return tokenIOCurrencyAuthorityImpl.getTokenBalance(currency, account); + } + + function getTokenSupply(string memory currency) public view returns (uint supply) { + return tokenIOCurrencyAuthorityImpl.getTokenSupply(currency); + } + + function freezeAccount(address account, bool isAllowed, string memory issuerFirm) public returns (bool success) { + require( + tokenIOCurrencyAuthorityImpl.freezeAccount(account, isAllowed, issuerFirm, msg.sender), + "Unable to execute freezeAccount" + ); + return true; + } + + function approveKYC(address account, bool isApproved, uint limit, string memory issuerFirm) public returns (bool success) { + require( + tokenIOCurrencyAuthorityImpl.approveKYC(account, isApproved, limit, issuerFirm, msg.sender), + "Unable to execute approveKYC" + ); + + return true; + } + + function approveKYCAndDeposit(string memory currency, address account, uint amount, uint limit, string memory issuerFirm) public returns (bool success) { + require( + tokenIOCurrencyAuthorityImpl.approveKYCAndDeposit(currency, account, amount, limit, issuerFirm, msg.sender), + "Unable to execute approveKYCAndDeposit" + ); + + return true; + } + + function setAccountSpendingLimit(address account, uint limit, string memory issuerFirm) public returns (bool success) { + require( + tokenIOCurrencyAuthorityImpl.setAccountSpendingLimit(account, limit, issuerFirm, msg.sender), + "Unable to execute setAccountSpendingLimit" + ); + return true; + } + + function getAccountSpendingRemaining(address account) public view returns (uint spendingRemaining) { + return tokenIOCurrencyAuthorityImpl.getAccountSpendingRemaining(account); + } + + function getAccountSpendingLimit(address account) public view returns (uint spendingLimit) { + return tokenIOCurrencyAuthorityImpl.getAccountSpendingLimit(account); + } + + function setFxBpsRate(string memory currency, uint bpsRate, string memory issuerFirm) public returns (bool success) { + require( + tokenIOCurrencyAuthorityImpl.setFxBpsRate(currency, bpsRate, issuerFirm, msg.sender), + "Unable to execute setFxBpsRate" + ); + return true; + } + + function getFxUSDAmount(string memory currency, uint fxAmount) public view returns (uint usdAmount) { + return tokenIOCurrencyAuthorityImpl.getFxUSDAmount(currency, fxAmount); + } + + function approveForwardedAccount(address originalAccount, address updatedAccount, string memory issuerFirm) public returns (bool success) { + require( + tokenIOCurrencyAuthorityImpl.approveForwardedAccount(originalAccount, updatedAccount, issuerFirm, msg.sender), + "Unable to execute approveForwardedAccount" + ); + return true; + } + + function deposit(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success) { + require( + tokenIOCurrencyAuthorityImpl.deposit(currency, account, amount, issuerFirm, msg.sender), + "Unable to execute deposit" + ); + return true; + } + + function withdraw(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success) { + require( + tokenIOCurrencyAuthorityImpl.withdraw(currency, account, amount, issuerFirm, msg.sender), + "Unable to execute withdraw" + ); + return true; + } +} diff --git a/contracts/TokenIOERC20.sol b/contracts/TokenIOERC20.sol index 560157d..1560310 100644 --- a/contracts/TokenIOERC20.sol +++ b/contracts/TokenIOERC20.sol @@ -35,6 +35,8 @@ contract TokenIOERC20 is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; + address public proxyInstance; + /** * @notice Constructor method for ERC20 contract * @param _storageContract address of TokenIOStorage contract @@ -50,6 +52,11 @@ contract TokenIOERC20 is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } /** @notice Sets erc20 globals and fee paramters @@ -80,7 +87,7 @@ contract TokenIOERC20 is Ownable { * @return {"_name" : "Returns name of token"} */ function name() public view returns (string memory _name) { - return lib.getTokenName(address(this)); + return lib.getTokenName(proxyInstance); } /** @@ -88,7 +95,7 @@ contract TokenIOERC20 is Ownable { * @return {"_symbol" : "Returns symbol of token"} */ function symbol() public view returns (string memory _symbol) { - return lib.getTokenSymbol(address(this)); + return lib.getTokenSymbol(proxyInstance); } /** @@ -96,7 +103,7 @@ contract TokenIOERC20 is Ownable { * @return {"_tla" : "Returns three-letter-abbreviation of token"} */ function tla() public view returns (string memory _tla) { - return lib.getTokenTLA(address(this)); + return lib.getTokenTLA(proxyInstance); } /** @@ -104,7 +111,7 @@ contract TokenIOERC20 is Ownable { * @return {"_version" : "Returns version of token"} */ function version() public view returns (string memory _version) { - return lib.getTokenVersion(address(this)); + return lib.getTokenVersion(proxyInstance); } /** @@ -112,7 +119,7 @@ contract TokenIOERC20 is Ownable { * @return {"_decimals" : "Returns number of decimals"} */ function decimals() public view returns (uint _decimals) { - return lib.getTokenDecimals(lib.getTokenSymbol(address(this))); + return lib.getTokenDecimals(lib.getTokenSymbol(proxyInstance)); } /** @@ -120,7 +127,7 @@ contract TokenIOERC20 is Ownable { * @return {"supply" : "Returns current total supply of token"} */ function totalSupply() public view returns (uint supply) { - return lib.getTokenSupply(lib.getTokenSymbol(address(this))); + return lib.getTokenSupply(lib.getTokenSymbol(proxyInstance)); } /** @@ -130,7 +137,7 @@ contract TokenIOERC20 is Ownable { * @return {"amount" : "Returns allowance of given account and spender"} */ function allowance(address account, address spender) public view returns (uint amount) { - return lib.getTokenAllowance(lib.getTokenSymbol(address(this)), account, spender); + return lib.getTokenAllowance(lib.getTokenSymbol(proxyInstance), account, spender); } /** @@ -139,7 +146,7 @@ contract TokenIOERC20 is Ownable { * @return {"balance" : "Returns balance amount"} */ function balanceOf(address account) public view returns (uint balance) { - return lib.getTokenBalance(lib.getTokenSymbol(address(this)), account); + return lib.getTokenBalance(lib.getTokenSymbol(proxyInstance), account); } /** @@ -153,7 +160,7 @@ contract TokenIOERC20 is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { - feeAccount = lib.getFeeContract(address(this)); + feeAccount = lib.getFeeContract(proxyInstance); (max, min, bps, flat) = lib.getFees(feeAccount); feeMsg = lib.getFeeMsg(feeAccount); } @@ -164,7 +171,7 @@ contract TokenIOERC20 is Ownable { * @return {"fees": "Returns the calculated transaction fees based on the fee contract parameters"} */ function calculateFees(uint amount) public view returns (uint fees) { - return lib.calculateFees(lib.getFeeContract(address(this)), amount); + return lib.calculateFees(lib.getFeeContract(proxyInstance), amount); } /** @@ -177,7 +184,7 @@ contract TokenIOERC20 is Ownable { /// @notice send transfer through library /// @dev !!! mutates storage state require( - lib.transfer(lib.getTokenSymbol(address(this)), to, amount, "0x0"), + lib.transfer(lib.getTokenSymbol(proxyInstance), to, amount, "0x0"), "Error: Unable to transfer funds. Please check your parameters." ); return true; @@ -194,7 +201,7 @@ contract TokenIOERC20 is Ownable { /// @notice sends transferFrom through library /// @dev !!! mutates storage state require( - lib.transferFrom(lib.getTokenSymbol(address(this)), from, to, amount, "0x0"), + lib.transferFrom(lib.getTokenSymbol(proxyInstance), from, to, amount, "0x0"), "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." ); return true; @@ -221,14 +228,14 @@ contract TokenIOERC20 is Ownable { * @return {"deprecated" : "Returns true if deprecated, false otherwise"} */ function deprecateInterface() public onlyOwner returns (bool deprecated) { - require(lib.setDeprecatedContract(address(this)), + require(lib.setDeprecatedContract(proxyInstance), "Error: Unable to deprecate contract!"); return true; } modifier notDeprecated() { /// @notice throws if contract is deprecated - require(!lib.isContractDeprecated(address(this)), + require(!lib.isContractDeprecated(proxyInstance), "Error: Contract has been deprecated, cannot perform operation!"); _; } diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 34726ca..0cf8d3e 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -32,59 +32,61 @@ maintain data consistency between contract. contract TokenIOERC20FeesApply is Ownable { - using SafeMath for uint; + using SafeMath for uint; - //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage - using TokenIOLib for TokenIOLib.Data; - TokenIOLib.Data lib; + //// @dev Set reference to TokenIOLib interface which proxies to TokenIOStorage + using TokenIOLib for TokenIOLib.Data; + TokenIOLib.Data lib; - event Transfer(address indexed from, address indexed to, uint256 amount); + address public proxyInstance; - address proxyImplementation; - + event Transfer(address indexed from, address indexed to, uint256 amount); - /** - * @notice Constructor method for ERC20 contract - * @param _storageContract address of TokenIOStorage contract - */ - constructor(address _storageContract) public { - //// @dev Set the storage contract for the interface - //// @dev This contract will be unable to use the storage constract until - //// @dev contract address is authorized with the storage contract - //// @dev Once authorized, Use the `setParams` method to set storage values - lib.Storage = TokenIOStorage(_storageContract); - - //// @dev set owner to contract initiator - owner[msg.sender] = true; - } - - function initProxy(address _proxy) external onlyOwner { - proxyImplementation = _proxy; - } - + /** + * @notice Constructor method for ERC20 contract + * @param _storageContract address of TokenIOStorage contract + */ + constructor(address _storageContract) public { + //// @dev Set the storage contract for the interface + //// @dev This contract will be unable to use the storage constract until + //// @dev contract address is authorized with the storage contract + //// @dev Once authorized, Use the `setParams` method to set storage values + lib.Storage = TokenIOStorage(_storageContract); + //// @dev set owner to contract initiator + owner[msg.sender] = true; + } - /** - @notice Sets erc20 globals and fee paramters - @param _name Full token name 'USD by token.io' - @param _symbol Symbol name 'USDx' - @param _tla Three letter abbreviation 'USD' - @param _version Release version 'v0.0.1' - @param _decimals Decimal precision - @param _feeContract Address of fee contract - @return { "success" : "Returns true if successfully called from another contract"} - */ - function setParams( - bytes32 _name, - bytes32 _symbol, - bytes32 _tla, - bytes32 _version, - uint _decimals, - address _feeContract, - uint _fxUSDBPSRate - ) onlyOwner public returns(bool success) { - require(lib.setTokenParams(lib.bytes32ToString(_name), lib.bytes32ToString(_symbol), lib.bytes32ToString(_tla), lib.bytes32ToString(_version), _decimals, _feeContract, _fxUSDBPSRate), - "Error: Unable to set token params. Please check arguments."); + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } + + + + /** + @notice Sets erc20 globals and fee paramters + @param _name Full token name 'USD by token.io' + @param _symbol Symbol name 'USDx' + @param _tla Three letter abbreviation 'USD' + @param _version Release version 'v0.0.1' + @param _decimals Decimal precision + @param _feeContract Address of fee contract + @return { "success" : "Returns true if successfully called from another contract"} + */ + function setParams( + string memory _name, + string memory _symbol, + string memory _tla, + string memory _version, + uint _decimals, + address _feeContract, + uint _fxUSDBPSRate + ) onlyOwner public returns(bool success) { + require(lib.setTokenParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Error: Unable to set token params. Please check arguments."); + return true; } /** @@ -92,7 +94,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_name" : "Returns name of token"} */ function name() public view returns (string memory _name) { - return lib.getTokenName(proxyImplementation); + return lib.getTokenName(proxyInstance); } /** @@ -100,7 +102,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_symbol" : "Returns symbol of token"} */ function symbol() public view returns (string memory _symbol) { - return lib.getTokenSymbol(proxyImplementation); + return lib.getTokenSymbol(proxyInstance); } /** @@ -108,7 +110,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_tla" : "Returns three-letter-abbreviation of token"} */ function tla() public view returns (string memory _tla) { - return lib.getTokenTLA(proxyImplementation); + return lib.getTokenTLA(proxyInstance); } /** @@ -116,7 +118,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_version" : "Returns version of token"} */ function version() public view returns (string memory _version) { - return lib.getTokenVersion(proxyImplementation); + return lib.getTokenVersion(proxyInstance); } /** @@ -124,7 +126,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"_decimals" : "Returns number of decimals"} */ function decimals() public view returns (uint _decimals) { - return lib.getTokenDecimals(lib.getTokenSymbol(proxyImplementation)); + return lib.getTokenDecimals(lib.getTokenSymbol(proxyInstance)); } /** @@ -132,7 +134,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"supply" : "Returns current total supply of token"} */ function totalSupply() public view returns (uint supply) { - return lib.getTokenSupply(lib.getTokenSymbol(proxyImplementation)); + return lib.getTokenSupply(lib.getTokenSymbol(proxyInstance)); } /** @@ -142,7 +144,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"amount" : "Returns allowance of given account and spender"} */ function allowance(address account, address spender) public view returns (uint amount) { - return lib.getTokenAllowance(lib.getTokenSymbol(proxyImplementation), account, spender); + return lib.getTokenAllowance(lib.getTokenSymbol(proxyInstance), account, spender); } /** @@ -151,7 +153,7 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"balance" : "Returns balance amount"} */ function balanceOf(address account) public view returns (uint balance) { - return lib.getTokenBalance(lib.getTokenSymbol(proxyImplementation), account); + return lib.getTokenBalance(lib.getTokenSymbol(proxyInstance), account); } /** @@ -165,25 +167,20 @@ contract TokenIOERC20FeesApply is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { - feeAccount = lib.getFeeContract(proxyImplementation); + feeAccount = lib.getFeeContract(proxyInstance); (max, min, bps, flat) = lib.getFees(feeAccount); feeMsg = lib.getFeeMsg(feeAccount); } /** - * @notice Calculates fee of a given transfer amount (external) + * @notice Calculates fee of a given transfer amount * @param amount Amount to calculcate fee value * @return {"fees": "Returns the calculated transaction fees based on the fee contract parameters"} */ function calculateFees(uint amount) external view returns (uint fees) { - return calculateFees(lib.getFeeContract(proxyImplementation), amount); + return calculateFees(lib.getFeeContract(proxyInstance), amount); } - /** - * @notice Calculates fee of a given transfer amount (internal) - * @param amount Amount to calculcate fee value - * @return {"fees": "Returns the calculated transaction fees based on the fee contract parameters"} - */ function calculateFees(address feeContract, uint amount) internal view returns (uint fees) { return lib.calculateFees(feeContract, amount); } @@ -194,9 +191,9 @@ contract TokenIOERC20FeesApply is Ownable { * @param amount Transfer amount * @return {"success" : "Returns true if transfer succeeds"} */ - function transfer(address to, uint amount) public notDeprecated returns(bool success) { - address feeContract = lib.getFeeContract(proxyImplementation); - (string memory currency, address[3] memory addresses) = lib.getTransferDetails(proxyImplementation, [tx.origin, to, feeContract]); + function transfer(address to, uint amount, address sender) public notDeprecated returns(bool success) { + address feeContract = lib.getFeeContract(proxyInstance); + (string memory currency, address[3] memory addresses) = lib.getTransferDetails(proxyInstance, [sender, to, feeContract]); uint fees = calculateFees(feeContract, amount); uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; @@ -207,7 +204,7 @@ contract TokenIOERC20FeesApply is Ownable { ); - emit Transfer(msg.sender, to, amount); + emit Transfer(sender, to, amount); return true; } @@ -220,8 +217,8 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"success" : "Returns true if transferFrom succeeds"} */ function transferFrom(address from, address to, uint amount) public notDeprecated returns(bool success) { - address feeContract = lib.getFeeContract(proxyImplementation); - (string memory currency, address[3] memory addresses) = lib.getTransferDetails(proxyImplementation, [from, to, feeContract]); + address feeContract = lib.getFeeContract(proxyInstance); + (string memory currency, address[3] memory addresses) = lib.getTransferDetails(proxyInstance, [from, to, feeContract]); uint fees = calculateFees(feeContract, amount); uint[3] memory balances = [lib.Storage.getBalance(addresses[0], currency).sub(amount.add(fees)), lib.Storage.getBalance(addresses[1], currency).add(amount), lib.Storage.getBalance(addresses[2], currency).add(fees)]; @@ -233,7 +230,7 @@ contract TokenIOERC20FeesApply is Ownable { /// @notice This transaction will fail if the msg.sender does not have an approved allowance. require( - lib.updateAllowance(lib.getTokenSymbol(proxyImplementation), from, amount.add(fees), tx.origin), + lib.updateAllowance(lib.getTokenSymbol(proxyInstance), from, amount.add(fees)), "Error: Unable to update allowance for spender." ); @@ -248,11 +245,11 @@ contract TokenIOERC20FeesApply is Ownable { * @param amount Allowance amount * @return {"success" : "Returns true if approve succeeds"} */ - function approve(address spender, uint amount) public notDeprecated returns (bool success) { + function approve(address spender, uint amount, address sender) public notDeprecated returns (bool success) { /// @notice sends approve through library /// @dev !!! mtuates storage states require( - lib.approveAllowance(spender, amount), + lib.approveAllowance(spender, amount, sender), "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." ); return true; @@ -263,14 +260,14 @@ contract TokenIOERC20FeesApply is Ownable { * @return {"deprecated" : "Returns true if deprecated, false otherwise"} */ function deprecateInterface() public onlyOwner returns (bool deprecated) { - require(lib.setDeprecatedContract(proxyImplementation), + require(lib.setDeprecatedContract(proxyInstance), "Error: Unable to deprecate contract!"); return true; } modifier notDeprecated() { /// @notice throws if contract is deprecated - require(!lib.isContractDeprecated(proxyImplementation), + require(!lib.isContractDeprecated(proxyInstance), "Error: Contract has been deprecated, cannot perform operation!"); _; } diff --git a/contracts/TokenIOERC20FeesApplyProxy.sol b/contracts/TokenIOERC20FeesApplyProxy.sol index 2d02753..26513ba 100644 --- a/contracts/TokenIOERC20FeesApplyProxy.sol +++ b/contracts/TokenIOERC20FeesApplyProxy.sol @@ -2,146 +2,127 @@ pragma solidity 0.5.2; import "./Ownable.sol"; +interface TokenIOERC20FeesApplyI { + function setParams(string calldata _name, string calldata _symbol, string calldata _tla, string calldata _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external returns(bool success); + + function name() external view returns (string memory _name); + + function symbol() external view returns (string memory _symbol); + + function tla() external view returns (string memory _tla); + + function version() external view returns (string memory _version); + + function decimals() external view returns (uint _decimals); + + function totalSupply() external view returns (uint supply); + + function allowance(address account, address spender) external view returns (uint amount); + + function balanceOf(address account) external view returns (uint balance); + + function getFeeParams() external view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount); + + function calculateFees(uint amount) external view returns (uint fees); + + function transfer(address to, uint amount) external returns(bool success); + + function transferFrom(address from, address to, uint amount) external returns(bool success); + + function approve(address spender, uint amount) external returns (bool success); + + function deprecateInterface() external returns (bool deprecated); +} contract TokenIOERC20FeesApplyProxy is Ownable { - address tokenIOERC20FeesApplyImpl; + TokenIOERC20FeesApplyI tokenIOERC20FeesApplyImpl; constructor(address _tokenIOERC20FeesApplyImpl) public { - tokenIOERC20FeesApplyImpl = _tokenIOERC20FeesApplyImpl; + tokenIOERC20FeesApplyImpl = TokenIOERC20FeesApplyI(_tokenIOERC20FeesApplyImpl); } function upgradeTokenImplamintation(address _newTokenIOERC20FeesApplyImpl) onlyOwner external { - require (_newTokenIOERC20FeesApplyImpl != address(0)); - tokenIOERC20FeesApplyImpl = _newTokenIOERC20FeesApplyImpl; + require(_newTokenIOERC20FeesApplyImpl != address(0)); + tokenIOERC20FeesApplyImpl = TokenIOERC20FeesApplyI(_newTokenIOERC20FeesApplyImpl); } function setParams( - string calldata _name, - string calldata _symbol, - string calldata _tla, - string calldata _version, + string memory _name, + string memory _symbol, + string memory _tla, + string memory _version, uint256 _decimals, address _feeContract, uint256 _fxUSDBPSRate - ) onlyOwner external returns(bool) { - (bool success, ) = tokenIOERC20FeesApplyImpl.call(abi.encodeWithSignature("setParams(bytes32,bytes32,bytes32,bytes32,uint256,address,uint256)", stringToBytes32(_name), stringToBytes32(_symbol), stringToBytes32(_tla), stringToBytes32(_version), _decimals, _feeContract, _fxUSDBPSRate)); - return success; + ) onlyOwner public returns(bool) { + require(tokenIOERC20FeesApplyImpl.setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Unable to execute setParams"); + return true; } function transfer(address to, uint256 amount) external returns(bool) { - (bool success, ) = tokenIOERC20FeesApplyImpl.call(abi.encodeWithSignature("transfer(address,uint256)", to, amount)); - require(success, "Unable to execute transfer"); + require(tokenIOERC20FeesApplyImpl.transfer(to, amount, msg.sender), + "Unable to execute transfer"); - return success; + return true; } function transferFrom(address from, address to, uint256 amount) external returns(bool) { - (bool success, ) = tokenIOERC20FeesApplyImpl.call(abi.encodeWithSignature("transferFrom(address,address,uint256)", from, to, amount)); - require(success, "Unable to execute transferFrom"); - return success; + require(tokenIOERC20FeesApplyImpl.transferFrom(from, to, amount), + "Unable to execute transferFrom"); + + return true; } function approve(address spender, uint256 amount) external returns (bool) { - (bool success, ) = tokenIOERC20FeesApplyImpl.call(abi.encodeWithSignature("approve(address,uint256)", spender, amount)); - require(success, "Unable to execute approve"); - return success; + require(tokenIOERC20FeesApplyImpl.approve(spender, amount, msg.sender), + "Unable to execute approve"); + + return true; } function name() external view returns (string memory) { - bytes memory payload = abi.encodeWithSignature("name()"); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToString(returnData); + return tokenIOERC20FeesApplyImpl.name(); } function symbol() external view returns (string memory) { - bytes memory payload = abi.encodeWithSignature("symbol()"); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToString(returnData); + return tokenIOERC20FeesApplyImpl.symbol(); } function tla() external view returns (string memory) { - bytes memory payload = abi.encodeWithSignature("tla()"); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToString(returnData); + return tokenIOERC20FeesApplyImpl.symbol(); } function version() external view returns (string memory) { - bytes memory payload = abi.encodeWithSignature("version()"); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToString(returnData); + return tokenIOERC20FeesApplyImpl.version(); } function decimals() external view returns (uint) { - bytes memory payload = abi.encodeWithSignature("decimals()"); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToUint256(returnData); + return tokenIOERC20FeesApplyImpl.decimals(); } function totalSupply() external view returns (uint256) { - bytes memory payload = abi.encodeWithSignature("totalSupply()"); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToUint256(returnData); + return tokenIOERC20FeesApplyImpl.totalSupply(); } function allowance(address account, address spender) external view returns (uint256) { - bytes memory payload = abi.encodeWithSignature("allowance(address,address)", account, spender); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToUint256(returnData); + return tokenIOERC20FeesApplyImpl.allowance(account, spender); } function balanceOf(address account) external view returns (uint256) { - bytes memory payload = abi.encodeWithSignature("balanceOf(address)", account); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToUint256(returnData); + return tokenIOERC20FeesApplyImpl.balanceOf(account); } function calculateFees(uint amount) external view returns (uint256) { - bytes memory payload = abi.encodeWithSignature("calculateFees(uint256)", amount); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.staticcall(payload); - return bytesToUint256(returnData); + return tokenIOERC20FeesApplyImpl.calculateFees(amount); } function deprecateInterface() external onlyOwner returns (bool) { - bytes memory payload = abi.encodeWithSignature("deprecateInterface()"); - (bool success, bytes memory returnData) = tokenIOERC20FeesApplyImpl.call(payload); - return bytesToUint256(returnData) != 0; - } - - function stringToBytes32(string memory source) internal view returns (bytes32 result) { - bytes memory tempEmptyStringTest = bytes(source); - if (tempEmptyStringTest.length == 0) { - return 0x0; - } - - assembly { - result := mload(add(source, 32)) - } - } - - function bytesToString(bytes memory x) internal view returns (string memory) { - bytes memory bytesString = new bytes(20); - uint charCount = 0; - for (uint j = 0; j < 32; j++) { - byte char = byte(bytes32(bytesToUint256(x) * 2 ** (8 * j))); - if (char != 0) { - bytesString[charCount] = char; - charCount++; - } - } - bytes memory bytesStringTrimmed = new bytes(charCount); - for (uint j = 0; j < charCount; j++) { - bytesStringTrimmed[j] = bytesString[j]; - } - return string(bytesStringTrimmed); - } - - function bytesToUint256(bytes memory _b) internal view returns (uint256){ - uint256 number; - for(uint i=0;i<_b.length;i++){ - number = number + uint256(uint8(_b[i]))*(2**(8*(_b.length-(i+1)))); - } - return number; + require(tokenIOERC20FeesApplyImpl.deprecateInterface(), + "Unable to execute deprecateInterface"); + + return true; } } diff --git a/contracts/TokenIOERC20Proxy.sol b/contracts/TokenIOERC20Proxy.sol new file mode 100644 index 0000000..c5a7965 --- /dev/null +++ b/contracts/TokenIOERC20Proxy.sol @@ -0,0 +1,128 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + +interface TokenIOERC20I { + function setParams(string calldata _name, string calldata _symbol, string calldata _tla, string calldata _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external returns(bool success); + + function name() external view returns (string memory _name); + + function symbol() external view returns (string memory _symbol); + + function tla() external view returns (string memory _tla); + + function version() external view returns (string memory _version); + + function decimals() external view returns (uint _decimals); + + function totalSupply() external view returns (uint supply); + + function allowance(address account, address spender) external view returns (uint amount); + + function balanceOf(address account) external view returns (uint balance); + + function getFeeParams() external view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount); + + function calculateFees(uint amount) external view returns (uint fees); + + function transfer(address to, uint amount) external returns(bool success); + + function transferFrom(address from, address to, uint amount) external returns(bool success); + + function approve(address spender, uint amount) external returns (bool success); + + function deprecateInterface() external returns (bool deprecated); +} + +contract TokenIOERC20Proxy is Ownable { + + TokenIOERC20I tokenIOERC20Impl; + + constructor(address _tokenIOERC20Impl) public { + tokenIOERC20Impl = TokenIOERC20I(_tokenIOERC20Impl); + } + + function upgradeTokenImplamintation(address _newTokenIOERC20Impl) onlyOwner external { + require(_newTokenIOERC20Impl != address(0)); + tokenIOERC20Impl = TokenIOERC20I(_newTokenIOERC20Impl); + } + + function setParams( + string memory _name, + string memory _symbol, + string memory _tla, + string memory _version, + uint256 _decimals, + address _feeContract, + uint256 _fxUSDBPSRate + ) onlyOwner public returns(bool) { + require(tokenIOERC20Impl.setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Unable to execute setParams"); + return true; + } + + function transfer(address to, uint256 amount) external returns(bool) { + require(tokenIOERC20Impl.transfer(to, amount, msg.sender), + "Unable to execute transfer"); + + return true; + } + + function transferFrom(address from, address to, uint256 amount) external returns(bool) { + require(tokenIOERC20Impl.transferFrom(from, to, amount), + "Unable to execute transferFrom"); + + return true; + } + + function approve(address spender, uint256 amount) external returns (bool) { + require(tokenIOERC20Impl.approve(spender, amount, msg.sender), + "Unable to execute approve"); + + return true; + } + + function name() external view returns (string memory) { + return tokenIOERC20Impl.name(); + } + + function symbol() external view returns (string memory) { + return tokenIOERC20Impl.symbol(); + } + + function tla() external view returns (string memory) { + return tokenIOERC20Impl.symbol(); + } + + function version() external view returns (string memory) { + return tokenIOERC20Impl.version(); + } + + function decimals() external view returns (uint) { + return tokenIOERC20Impl.decimals(); + } + + function totalSupply() external view returns (uint256) { + return tokenIOERC20Impl.totalSupply(); + } + + function allowance(address account, address spender) external view returns (uint256) { + return tokenIOERC20Impl.allowance(account, spender); + } + + function balanceOf(address account) external view returns (uint256) { + return tokenIOERC20Impl.balanceOf(account); + } + + function calculateFees(uint amount) external view returns (uint256) { + return tokenIOERC20Impl.calculateFees(amount); + } + + function deprecateInterface() external onlyOwner returns (bool) { + require(tokenIOERC20Impl.deprecateInterface(), + "Unable to execute deprecateInterface"); + + return true; + } + +} diff --git a/contracts/TokenIOERC20Unlimited.sol b/contracts/TokenIOERC20Unlimited.sol index 11c11ac..80543f3 100644 --- a/contracts/TokenIOERC20Unlimited.sol +++ b/contracts/TokenIOERC20Unlimited.sol @@ -37,6 +37,8 @@ contract TokenIOERC20Unlimited is Ownable { event Transfer(address indexed from, address indexed to, uint256 amount); + address public proxyInstance; + /** * @notice Constructor method for ERC20 contract * @param _storageContract address of TokenIOStorage contract @@ -52,6 +54,11 @@ contract TokenIOERC20Unlimited is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } /** @notice Sets erc20 globals and fee paramters @@ -82,7 +89,7 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"_name" : "Returns name of token"} */ function name() public view returns (string memory _name) { - return lib.getTokenName(address(this)); + return lib.getTokenName(proxyInstance); } /** @@ -90,7 +97,7 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"_symbol" : "Returns symbol of token"} */ function symbol() public view returns (string memory _symbol) { - return lib.getTokenSymbol(address(this)); + return lib.getTokenSymbol(proxyInstance); } /** @@ -98,7 +105,7 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"_tla" : "Returns three-letter-abbreviation of token"} */ function tla() public view returns (string memory _tla) { - return lib.getTokenTLA(address(this)); + return lib.getTokenTLA(proxyInstance); } /** @@ -106,7 +113,7 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"_version" : "Returns version of token"} */ function version() public view returns (string memory _version) { - return lib.getTokenVersion(address(this)); + return lib.getTokenVersion(proxyInstance); } /** @@ -114,7 +121,7 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"_decimals" : "Returns number of decimals"} */ function decimals() public view returns (uint _decimals) { - return lib.getTokenDecimals(lib.getTokenSymbol(address(this))); + return lib.getTokenDecimals(lib.getTokenSymbol(proxyInstance)); } /** @@ -122,7 +129,7 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"supply" : "Returns current total supply of token"} */ function totalSupply() public view returns (uint supply) { - return lib.getTokenSupply(lib.getTokenSymbol(address(this))); + return lib.getTokenSupply(lib.getTokenSymbol(proxyInstance)); } /** @@ -132,7 +139,7 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"amount" : "Returns allowance of given account and spender"} */ function allowance(address account, address spender) public view returns (uint amount) { - return lib.getTokenAllowance(lib.getTokenSymbol(address(this)), account, spender); + return lib.getTokenAllowance(lib.getTokenSymbol(proxyInstance), account, spender); } /** @@ -141,7 +148,7 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"balance" : "Returns balance amount"} */ function balanceOf(address account) public view returns (uint balance) { - return lib.getTokenBalance(lib.getTokenSymbol(address(this)), account); + return lib.getTokenBalance(lib.getTokenSymbol(proxyInstance), account); } /** @@ -150,16 +157,16 @@ contract TokenIOERC20Unlimited is Ownable { * @param amount Transfer amount * @return {"success" : "Returns true if transfer succeeds"} */ - function transfer(address to, uint amount) public notDeprecated returns (bool success) { + function transfer(address to, uint amount, address sender) public notDeprecated returns (bool success) { /// @notice send transfer through library /// @dev !!! mutates storage state require( - lib.forceTransfer(lib.getTokenSymbol(address(this)), msg.sender, to, amount, "0x0"), + lib.forceTransfer(lib.getTokenSymbol(proxyInstance), sender, to, amount, "0x0"), "Error: Unable to transfer funds. Please check your parameters." ); /// @dev Emit Log event - emit Transfer(msg.sender, to, amount); + emit Transfer(sender, to, amount); return true; } @@ -174,13 +181,13 @@ contract TokenIOERC20Unlimited is Ownable { /// @notice sends transferFrom through library /// @dev !!! mutates storage state require( - lib.forceTransfer(lib.getTokenSymbol(address(this)), from, to, amount, "0x0"), + lib.forceTransfer(lib.getTokenSymbol(proxyInstance), from, to, amount, "0x0"), "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." ); /// @notice This transaction will fail if the msg.sender does not have an approved allowance. require( - lib.updateAllowance(lib.getTokenSymbol(address(this)), from, amount, tx.origin), + lib.updateAllowance(lib.getTokenSymbol(proxyInstance), from, amount), "Error: Unable to update allowance for spender." ); @@ -194,11 +201,11 @@ contract TokenIOERC20Unlimited is Ownable { * @param amount Allowance amount * @return {"success" : "Returns true if approve succeeds"} */ - function approve(address spender, uint amount) public notDeprecated returns (bool success) { + function approve(address spender, uint amount, address sender) public notDeprecated returns (bool success) { /// @notice sends approve through library /// @dev !!! mtuates storage states require( - lib.approveAllowance(spender, amount), + lib.approveAllowance(spender, amount, sender), "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." ); return true; @@ -209,14 +216,14 @@ contract TokenIOERC20Unlimited is Ownable { * @return {"deprecated" : "Returns true if deprecated, false otherwise"} */ function deprecateInterface() public onlyOwner returns (bool deprecated) { - require(lib.setDeprecatedContract(address(this)), + require(lib.setDeprecatedContract(proxyInstance), "Error: Unable to deprecate contract!"); return true; } modifier notDeprecated() { /// @notice throws if contract is deprecated - require(!lib.isContractDeprecated(address(this)), + require(!lib.isContractDeprecated(proxyInstance), "Error: Contract has been deprecated, cannot perform operation!"); _; } diff --git a/contracts/TokenIOERC20UnlimitedProxy.sol b/contracts/TokenIOERC20UnlimitedProxy.sol new file mode 100644 index 0000000..7772313 --- /dev/null +++ b/contracts/TokenIOERC20UnlimitedProxy.sol @@ -0,0 +1,128 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + +interface TokenIOERC20UnlimitedI { + function setParams(string calldata _name, string calldata _symbol, string calldata _tla, string calldata _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external returns(bool success); + + function name() external view returns (string memory _name); + + function symbol() external view returns (string memory _symbol); + + function tla() external view returns (string memory _tla); + + function version() external view returns (string memory _version); + + function decimals() external view returns (uint _decimals); + + function totalSupply() external view returns (uint supply); + + function allowance(address account, address spender) external view returns (uint amount); + + function balanceOf(address account) external view returns (uint balance); + + function getFeeParams() external view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount); + + function calculateFees(uint amount) external view returns (uint fees); + + function transfer(address to, uint amount) external returns(bool success); + + function transferFrom(address from, address to, uint amount) external returns(bool success); + + function approve(address spender, uint amount) external returns (bool success); + + function deprecateInterface() external returns (bool deprecated); +} + +contract TokenIOERC20UnlimitedProxy is Ownable { + + TokenIOERC20UnlimitedI tokenIOERC20UnlimitedImpl; + + constructor(address _tokenIOERC20UnlimitedImpl) public { + tokenIOERC20UnlimitedImpl = TokenIOERC20UnlimitedI(_tokenIOERC20UnlimitedImpl); + } + + function upgradeTokenImplamintation(address _newTokenIOERC20UnlimitedImpl) onlyOwner external { + require(_newTokenIOERC20UnlimitedImpl != address(0)); + tokenIOERC20UnlimitedImpl = TokenIOERC20UnlimitedI(_newTokenIOERC20UnlimitedImpl); + } + + function setParams( + string memory _name, + string memory _symbol, + string memory _tla, + string memory _version, + uint256 _decimals, + address _feeContract, + uint256 _fxUSDBPSRate + ) onlyOwner public returns(bool) { + require(tokenIOERC20UnlimitedImpl.setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + "Unable to execute setParams"); + return true; + } + + function transfer(address to, uint256 amount) external returns(bool) { + require(tokenIOERC20UnlimitedImpl.transfer(to, amount, msg.sender), + "Unable to execute transfer"); + + return true; + } + + function transferFrom(address from, address to, uint256 amount) external returns(bool) { + require(tokenIOERC20UnlimitedImpl.transferFrom(from, to, amount), + "Unable to execute transferFrom"); + + return true; + } + + function approve(address spender, uint256 amount) external returns (bool) { + require(tokenIOERC20UnlimitedImpl.approve(spender, amount, msg.sender), + "Unable to execute approve"); + + return true; + } + + function name() external view returns (string memory) { + return tokenIOERC20UnlimitedImpl.name(); + } + + function symbol() external view returns (string memory) { + return tokenIOERC20UnlimitedImpl.symbol(); + } + + function tla() external view returns (string memory) { + return tokenIOERC20UnlimitedImpl.symbol(); + } + + function version() external view returns (string memory) { + return tokenIOERC20UnlimitedImpl.version(); + } + + function decimals() external view returns (uint) { + return tokenIOERC20UnlimitedImpl.decimals(); + } + + function totalSupply() external view returns (uint256) { + return tokenIOERC20UnlimitedImpl.totalSupply(); + } + + function allowance(address account, address spender) external view returns (uint256) { + return tokenIOERC20UnlimitedImpl.allowance(account, spender); + } + + function balanceOf(address account) external view returns (uint256) { + return tokenIOERC20UnlimitedImpl.balanceOf(account); + } + + function calculateFees(uint amount) external view returns (uint256) { + return tokenIOERC20UnlimitedImpl.calculateFees(amount); + } + + function deprecateInterface() external onlyOwner returns (bool) { + require(tokenIOERC20UnlimitedImpl.deprecateInterface(), + "Unable to execute deprecateInterface"); + + return true; + } + +} diff --git a/contracts/TokenIOFeeContract.sol b/contracts/TokenIOFeeContract.sol index eee007a..772338a 100644 --- a/contracts/TokenIOFeeContract.sol +++ b/contracts/TokenIOFeeContract.sol @@ -36,6 +36,7 @@ contract TokenIOFeeContract is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; + address public proxyInstance; /** * @notice Constructor method for ERC20 contract @@ -52,6 +53,12 @@ contract TokenIOFeeContract is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } + /** * @notice Set Fee Parameters for Fee Contract * @dev The min, max, flat transaction fees should be relative to decimal precision @@ -62,7 +69,7 @@ contract TokenIOFeeContract is Ownable { * returns {"success" : "Returns true if successfully called from another contract"} */ function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes memory feeMsg) public onlyOwner returns (bool success) { - require(lib.setFees(address(this), feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings"); + require(lib.setFees(proxyInstance, feeMax, feeMin, feeBps, feeFlat), "Error: Unable to set fee contract settings"); require(lib.setFeeMsg(feeMsg), "Error: Unable to set fee contract default message."); return true; } @@ -78,9 +85,10 @@ contract TokenIOFeeContract is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeContract) { - (max, min, bps, flat) = lib.getFees(address(this)); - feeMsg = lib.getFeeMsg(address(this)); - feeContract = address(this); + (max, min, bps, flat) = lib.getFees(proxyInstance); + feeMsg = lib.getFeeMsg(proxyInstance); + feeContract = proxyInstance; + return (max, min, bps, flat, feeMsg, feeContract); } /** @@ -89,7 +97,7 @@ contract TokenIOFeeContract is Ownable { * @return {"balance": "Balance of TokenIO TSM currency account"} */ function getTokenBalance(string memory currency) public view returns(uint balance) { - return lib.getTokenBalance(currency, address(this)); + return lib.getTokenBalance(currency, proxyInstance); } /** @notice Calculates fee of a given transfer amount @@ -97,7 +105,7 @@ contract TokenIOFeeContract is Ownable { * @return { "fees": "Returns the fees associated with this contract"} */ function calculateFees(uint amount) public view returns (uint fees) { - return lib.calculateFees(address(this), amount); + return lib.calculateFees(proxyInstance, amount); } @@ -111,7 +119,7 @@ contract TokenIOFeeContract is Ownable { */ function transferCollectedFees(string memory currency, address to, uint amount, bytes memory data) public onlyOwner returns (bool success) { require( - lib.forceTransfer(currency, address(this), to, amount, data), + lib.forceTransfer(currency, proxyInstance, to, amount, data), "Error: unable to transfer fees to account." ); return true; diff --git a/contracts/TokenIOFeeContractProxy.sol b/contracts/TokenIOFeeContractProxy.sol new file mode 100644 index 0000000..cec2a85 --- /dev/null +++ b/contracts/TokenIOFeeContractProxy.sol @@ -0,0 +1,56 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + +interface TokenIOFeeContractI { + function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes memory feeMsg) public returns (bool success); + + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeContract); + + function getTokenBalance(string memory currency) public view returns(uint balance); + + function calculateFees(uint amount) public view returns (uint fees); + + function transferCollectedFees(string memory currency, address to, uint amount, bytes memory data) public returns (bool success); +} + +contract TokenIOFeeContractProxy is Ownable { + + TokenIOFeeContractI tokenIOFeeContractImpl; + + constructor(address _tokenIOFeeContractImpl) public { + tokenIOFeeContractImpl = TokenIOFeeContractI(_tokenIOFeeContractImpl); + } + + function upgradeTokenImplamintation(address _newTokenIOFeeContractImpl) onlyOwner external { + require(_newTokenIOFeeContractImpl != address(0)); + tokenIOFeeContractImpl = TokenIOFeeContractI(_newTokenIOFeeContractImpl); + } + + function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes memory feeMsg) public returns (bool success) { + require(tokenIOFeeContractImpl.setFeeParams(feeBps, feeMin, feeMax, feeFlat, feeMsg), + "Unable to execute setFeeParams"); + return true; + } + + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeContract) { + return tokenIOFeeContractImpl.getFeeParams(); + } + + function getTokenBalance(string memory currency) public view returns(uint balance) { + return tokenIOFeeContractImpl.getFeeParams(currency); + } + + function calculateFees(uint amount) public view returns (uint fees) { + return tokenIOFeeContractImpl.calculateFees(amount); + } + + function transferCollectedFees(string memory currency, address to, uint amount, bytes memory data) public onlyOwner returns (bool success) { + require( + tokenIOFeeContractImpl.transferCollectedFees(currency, proxyInstance, to, amount, data), + "Unable to execute transferCollectedFees" + ); + return true; + } + +} diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 44db6cf..0b88452 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -49,7 +49,7 @@ library TokenIOLib { function setTokenParams(Data storage self, string memory _name, string memory _symbol, string memory _tla, string memory _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal returns(bool success) { require( - self.Storage.setTokenParams(msg.sender, _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + self.Storage.setTokenParams(self.proxyInstance, _name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract."); return true; } @@ -64,7 +64,7 @@ library TokenIOLib { */ function setTokenName(Data storage self, string memory tokenName) internal returns (bool success) { require( - self.Storage.setTokenName(msg.sender, tokenName), + self.Storage.setTokenName(self.proxyInstance, tokenName), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -80,7 +80,7 @@ library TokenIOLib { */ function setTokenSymbol(Data storage self, string memory tokenSymbol) internal returns (bool success) { require( - self.Storage.setTokenSymbol(msg.sender, tokenSymbol), + self.Storage.setTokenSymbol(self.proxyInstance, tokenSymbol), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -96,7 +96,7 @@ library TokenIOLib { */ function setTokenTLA(Data storage self, string memory tokenTLA) internal returns (bool success) { require( - self.Storage.setTokenTLA(msg.sender, tokenTLA), + self.Storage.setTokenTLA(self.proxyInstance, tokenTLA), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -112,7 +112,7 @@ library TokenIOLib { */ function setTokenVersion(Data storage self, string memory tokenVersion) internal returns (bool success) { require( - self.Storage.setTokenVersion(msg.sender, tokenVersion), + self.Storage.setTokenVersion(self.proxyInstance, tokenVersion), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -162,7 +162,7 @@ library TokenIOLib { * @return {"success" : "Returns true when successfully called from another contract"} */ function setFeeMsg(Data storage self, bytes memory feeMsg) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('fee.msg', msg.sender)); + bytes32 id = keccak256(abi.encodePacked('fee.msg', self.proxyInstance)); require( self.Storage.setBytes(id, feeMsg), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." @@ -182,7 +182,7 @@ library TokenIOLib { */ function setFeeContract(Data storage self, address feeContract) internal returns (bool success) { require( - self.Storage.setTokenFeeContract(msg.sender, feeContract), + self.Storage.setTokenFeeContract(self.proxyInstance, feeContract), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -200,7 +200,7 @@ library TokenIOLib { function setTokenNameSpace(Data storage self, string memory currency) internal returns (bool success) { bytes32 id = keccak256(abi.encodePacked('token.namespace', currency)); require( - self.Storage.setAddress(id, msg.sender), + self.Storage.setAddress(id, self.proxyInstance), "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." ); return true; @@ -595,7 +595,7 @@ library TokenIOLib { require(address(to) != address(0), "Error: `to` address cannot be null." ); require(amount > 0, "Error: `amount` must be greater than zero"); - address feeContract = getFeeContract(self, msg.sender); + address feeContract = getFeeContract(self, self.proxyInstance); uint fees = calculateFees(self, feeContract, amount); require( @@ -636,7 +636,7 @@ library TokenIOLib { "Error: `to` address must not be null." ); - address feeContract = getFeeContract(self, msg.sender); + address feeContract = getFeeContract(self, self.proxyInstance); uint fees = calculateFees(self, feeContract, amount); /// @dev NOTE: This transaction will fail if the spending amount exceeds the daily limit @@ -660,7 +660,7 @@ library TokenIOLib { /// @dev Attempt to update the spender allowance /// @notice this will throw if the allowance has not been set. require( - updateAllowance(self, currency, from, amount, tx.origin), + updateAllowance(self, currency, from, amount), "Error: Unable to update allowance for spender." ); @@ -711,8 +711,8 @@ library TokenIOLib { * @param amount Value to reduce allowance by (i.e. the amount spent) * @return { "success" : "Return true if successfully called from another contract" } */ - function updateAllowance(Data storage self, string memory currency, address account, uint amount, address sender) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, sender))); + function updateAllowance(Data storage self, string memory currency, address account, uint amount) internal returns (bool success) { + bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, msg.sender))); require( self.Storage.setUint(id, self.Storage.getUint(id).sub(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." @@ -729,31 +729,31 @@ library TokenIOLib { * @param amount Value to set for spender allowance * @return { "success" : "Return true if successfully called from another contract" } */ - function approveAllowance(Data storage self, address spender, uint amount) internal returns (bool success) { + function approveAllowance(Data storage self, address spender, uint amount, address sender) internal returns (bool success) { require(spender != address(0), "Error: `spender` address cannot be null."); - string memory currency = getTokenSymbol(self, msg.sender); + string memory currency = getTokenSymbol(self, self.proxyInstance); require( getTokenFrozenBalance(self, currency, getForwardedAccount(self, spender)) == 0, "Error: Spender must not have a frozen balance directly"); - bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, tx.origin), getForwardedAccount(self, spender))); + bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, sender), getForwardedAccount(self, spender))); require( self.Storage.getUint(id_a) == 0 || amount == 0, "Error: Allowance must be zero (0) before setting an updated allowance for spender."); require( - self.Storage.getBalance(getForwardedAccount(self, tx.origin), currency) >= amount, + self.Storage.getBalance(getForwardedAccount(self, sender), currency) >= amount, "Error: Allowance cannot exceed msg.sender token balance."); require( self.Storage.setUint(id_a, amount), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract."); - emit Approval(tx.origin, spender, amount); + emit Approval(sender, spender, amount); return true; } @@ -1221,21 +1221,4 @@ library TokenIOLib { } - function bytes32ToString(Data storage self, bytes32 x) internal pure returns (string memory) { - bytes memory bytesString = new bytes(32); - uint charCount = 0; - for (uint j = 0; j < 32; j++) { - byte char = byte(bytes32(uint(x) * 2 ** (8 * j))); - if (char != 0) { - bytesString[charCount] = char; - charCount++; - } - } - bytes memory bytesStringTrimmed = new bytes(charCount); - for (uint j = 0; j < charCount; j++) { - bytesStringTrimmed[j] = bytesString[j]; - } - return string(bytesStringTrimmed); - } - } diff --git a/contracts/TokenIOMerchant.sol b/contracts/TokenIOMerchant.sol index 8de1e2e..efcd4c8 100644 --- a/contracts/TokenIOMerchant.sol +++ b/contracts/TokenIOMerchant.sol @@ -31,6 +31,8 @@ contract TokenIOMerchant is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; + address public proxyInstance; + /** * @notice Constructor method for Merchant contract * @param _storageContract Ethereum Address of TokenIOStorage contract @@ -48,6 +50,12 @@ contract TokenIOMerchant is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } + /** @notice Sets Merchant globals and fee paramters @param feeContract Address of fee contract @@ -72,10 +80,11 @@ contract TokenIOMerchant is Ownable { } */ function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { - address feeContract = lib.getFeeContract(address(this)); + address feeContract = lib.getFeeContract(proxyInstance); (max, min, bps, flat) = lib.getFees(feeContract); feeMsg = lib.getFeeMsg(feeContract); feeAccount = feeContract; + return (bps, min, max, flat, feeMsg, feeAccount); } /** @@ -84,7 +93,7 @@ contract TokenIOMerchant is Ownable { * @return {"fees": "Returns the calculated transaction fees based on the fee contract parameters"} */ function calculateFees(uint amount) public view returns (uint fees) { - return lib.calculateFees(lib.getFeeContract(address(this)), amount); + return lib.calculateFees(lib.getFeeContract(proxyInstance), amount); } /** @@ -96,22 +105,22 @@ contract TokenIOMerchant is Ownable { * @param data Optional data to be included when paying the merchant (e.g. item receipt) * @return { "success" : "Returns true if successfully called from another contract"} */ - function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success) { + function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data, address sender) public returns (bool success) { uint fees = calculateFees(amount); /// @dev note the spending amount limit is gross of fees - require(lib.setAccountSpendingAmount(msg.sender, lib.getFxUSDAmount(currency, amount)), + require(lib.setAccountSpendingAmount(sender, lib.getFxUSDAmount(currency, amount)), "Error: Unable to set account spending amount."); - require(lib.forceTransfer(currency, msg.sender, merchant, amount, data), + require(lib.forceTransfer(currency, sender, merchant, amount, data), "Error: Unable to transfer funds to account"); - address feeContract = lib.getFeeContract(address(this)); + address feeContract = lib.getFeeContract(proxyInstance); /// @dev If merchantPaysFees == true, the merchant will pay the fees to the fee contract; if (merchantPaysFees) { require(lib.forceTransfer(currency, merchant, feeContract, fees, lib.getFeeMsg(feeContract)), "Error: Unable to transfer fees to fee contract."); } else { - require(lib.forceTransfer(currency, msg.sender, feeContract, fees, lib.getFeeMsg(feeContract)), + require(lib.forceTransfer(currency, sender, feeContract, fees, lib.getFeeMsg(feeContract)), "Error: Unable to transfer fees to fee contract."); } diff --git a/contracts/TokenIOMerchantProxy.sol b/contracts/TokenIOMerchantProxy.sol new file mode 100644 index 0000000..1f3504f --- /dev/null +++ b/contracts/TokenIOMerchantProxy.sol @@ -0,0 +1,50 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + +interface TokenIOFeeContractI { + function setParams(address feeContract) public returns (bool success); + + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount); + + function calculateFees(uint amount) public view returns (uint fees); + + function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success); +} + +contract TokenIOAuthorityProxy is Ownable { + + TokenIOAuthorityI tokenIOAuthorityImpl; + + constructor(address _tokenIOAuthorityImpl) public { + tokenIOAuthorityImpl = TokenIOFeeContractI(_tokenIOAuthorityImpl); + } + + function upgradeTokenImplamintation(address _newTokenIOAuthorityImpl) onlyOwner external { + require(_newTokenIOAuthorityImpl != address(0)); + tokenIOAuthorityImpl = TokenIOFeeContractI(_newTokenIOAuthorityImpl); + } + + function setParams(address feeContract) public onlyOwner returns (bool success) { + require(tokenIOAuthorityImpl.setParams(feeContract), + "Unable to execute setParams"); + + return true; + } + + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { + return tokenIOAuthorityImpl.getFeeParams(); + } + + function calculateFees(uint amount) public view returns (uint fees) { + return tokenIOAuthorityImpl.calculateFees(amount); + } + + function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success) { + require(tokenIOAuthorityImpl.pay(currency, merchant, amount, merchantPaysFees, data, msg.sender), + "Unable to execute pay"); + + return true; + } + +} diff --git a/contracts/TokenIONameSpace.sol b/contracts/TokenIONameSpace.sol index 2844e53..8cf163d 100644 --- a/contracts/TokenIONameSpace.sol +++ b/contracts/TokenIONameSpace.sol @@ -36,6 +36,8 @@ contract TokenIONameSpace is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; + address public proxyInstance; + /** * @notice Constructor method for TokenIONameSpace contract * @param _storageContract address of TokenIOStorage contract @@ -51,6 +53,12 @@ contract TokenIONameSpace is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } + /** * @notice Returns the address of the contract associated with the currency symbol * @notice This method may be deprecated or refactored to allow for multiple interfaces diff --git a/contracts/TokenIONameSpaceProxy.sol b/contracts/TokenIONameSpaceProxy.sol new file mode 100644 index 0000000..f68303e --- /dev/null +++ b/contracts/TokenIONameSpaceProxy.sol @@ -0,0 +1,31 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + +interface TokenIONameSpaceI { + function setParams(address feeContract) public returns (bool success); + + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount); + + function calculateFees(uint amount) public view returns (uint fees); + + function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success); +} + +contract TokenIONameSpaceProxy is Ownable { + + TokenIONameSpaceI tokenIONameSpaceImpl; + + constructor(address _tokenIONameSpaceImpl) public { + tokenIONameSpaceImpl = TokenIONameSpaceI(_tokenIONameSpaceImpl); + } + + function upgradeTokenImplamintation(address _newTokenIONameSpaceImpl) onlyOwner external { + require(_newTokenIONameSpaceImpl != address(0)); + tokenIONameSpaceImpl = TokenIONameSpaceI(_newTokenIONameSpaceImpl); + } + + function getTokenNameSpace(string memory currency) public view returns (address contractAddress) { + return tokenIONameSpaceImpl.getTokenNameSpace(currency); + } +} diff --git a/contracts/TokenIOProxy.sol b/contracts/TokenIOProxy.sol new file mode 100644 index 0000000..9ab6c4d --- /dev/null +++ b/contracts/TokenIOProxy.sol @@ -0,0 +1,75 @@ +pragma solidity 0.5.2; + +import './Proxy.sol'; +import 'openzeppelin-solidity/contracts/AddressUtils.sol'; + +/** + * @title UpgradeabilityProxy + * @dev This contract implements a proxy that allows to change the + * implementation address to which it will delegate. + * Such a change is called an implementation upgrade. + */ +contract UpgradeabilityProxy is Proxy { + /** + * @dev Emitted when the implementation is upgraded. + * @param implementation Address of the new implementation. + */ + event Upgraded(address indexed implementation); + + /** + * @dev Storage slot with the address of the current implementation. + * This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is + * validated in the constructor. + */ + bytes32 private constant IMPLEMENTATION_SLOT = 0x7e235f0bf3755f015349e092818fe693d19574feacbff657f1086fae31a7bd8f; + + /** + * @dev Contract constructor. + * @param _implementation Address of the initial implementation. + * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. + * It should include the signature and the parameters of the function to be called, as described in + * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. + * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. + */ + constructor(address _implementation, bytes _data) public payable { + assert(IMPLEMENTATION_SLOT == keccak256("org.token.io")); + _setImplementation(_implementation); + if(_data.length > 0) { + require(_implementation.delegatecall(_data)); + } + } + + /** + * @dev Returns the current implementation. + * @return Address of the current implementation + */ + function _implementation() internal view returns (address impl) { + bytes32 slot = IMPLEMENTATION_SLOT; + assembly { + impl := sload(slot) + } + } + + /** + * @dev Upgrades the proxy to a new implementation. + * @param newImplementation Address of the new implementation. + */ + function _upgradeTo(address newImplementation) internal { + _setImplementation(newImplementation); + emit Upgraded(newImplementation); + } + + /** + * @dev Sets the implementation address of the proxy. + * @param newImplementation Address of the new implementation. + */ + function _setImplementation(address newImplementation) private { + require(AddressUtils.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); + + bytes32 slot = IMPLEMENTATION_SLOT; + + assembly { + sstore(slot, newImplementation) + } + } +} diff --git a/contracts/TokenIOStableSwap.sol b/contracts/TokenIOStableSwap.sol index 8f69743..21398bd 100644 --- a/contracts/TokenIOStableSwap.sol +++ b/contracts/TokenIOStableSwap.sol @@ -43,6 +43,8 @@ contract TokenIOStableSwap is Ownable { event AllowedERC20Asset(address asset, string currency); event RemovedERC20Asset(address asset, string currency); + address public proxyInstance; + /** * @notice Constructor method for TokenIOStableSwap contract * @param _storageContract address of TokenIOStorage contract @@ -58,6 +60,12 @@ contract TokenIOStableSwap is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + } + /** * @notice Allows the address of the asset to be accepted by this contract by the currency type. This method is only called by admins. * @notice This method may be deprecated or refactored to allow for multiple interfaces @@ -221,7 +229,7 @@ contract TokenIOStableSwap is Ownable { /// @dev the amount being transferred must be in the same decimal representation of the asset /// e.g. If decimals = 6 and want to transfer $100.00 the amount passed to this contract should be 100e6 (100 * 10 ** 6) require( - ERC20Interface(fromAsset).transferFrom(msg.sender, address(this), amount), + ERC20Interface(fromAsset).transferFrom(msg.sender, proxyInstance, amount), 'Error: Unable to transferFrom your asset holdings. Please ensure this contract has an approved allowance equal to or greater than the amount called in transferFrom method.' ); @@ -281,14 +289,14 @@ contract TokenIOStableSwap is Ownable { * @return {"deprecated" : "Returns true if deprecated, false otherwise"} */ function deprecateInterface() public onlyOwner returns (bool deprecated) { - require(lib.setDeprecatedContract(address(this)), + require(lib.setDeprecatedContract(proxyInstance), "Error: Unable to deprecate contract!"); return true; } modifier notDeprecated() { /// @notice throws if contract is deprecated - require(!lib.isContractDeprecated(address(this)), + require(!lib.isContractDeprecated(proxyInstance), "Error: Contract has been deprecated, cannot perform operation!"); _; } diff --git a/contracts/TokenIOStableSwapProxy.sol b/contracts/TokenIOStableSwapProxy.sol new file mode 100644 index 0000000..07c0079 --- /dev/null +++ b/contracts/TokenIOStableSwapProxy.sol @@ -0,0 +1,182 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; + +interface TokenIOStableSwapI { + function allowAsset(address asset, string memory currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public returns (bool success); + + function removeAsset(address asset) public returns (bool success); + + function isAllowedAsset(address asset, string memory currency) public view returns (bool allowed); + + function getAssetCurrency(address asset) public view returns (string memory currency); + + function setTokenXCurrency(address asset, string memory currency) public returns (bool success); + + function isTokenXContract(address asset, string memory currency) public view returns (bool isX); + + function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public returns (bool success); + + function calcAssetFees(address asset, uint amount) public view returns (uint fees); + + function convert(address fromAsset, address toAsset, uint amount) public returns (bool success); + + function transferCollectedFees(address asset, address to, uint amount) public returns (bool success); + + function deprecateInterface() public returns (bool deprecated); +} + +contract TokenIOStableSwapProxy is Ownable { + + TokenIOStableSwapI tokenIOStableSwapImpl; + + constructor(address _tokenIOStableSwapImpl) public { + tokenIOStableSwapImpl = TokenIOFeeContractI(_tokenIOStableSwapImpl); + } + + function upgradeTokenImplamintation(address _newTokenIOStableSwapImpl) onlyOwner external { + require(_newTokenIOStableSwapImpl != address(0)); + tokenIOStableSwapImpl = TokenIOFeeContractI(_newTokenIOStableSwapImpl); + } + + function allowAsset(address asset, string memory currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner returns (bool success) { + require( + tokenIOStableSwapImpl.allowAsset(asset, currency, feeBps, feeMin, feeMax, feeFlat), + "Unable to execute allowAsset" + ); + + return true; + } + + function removeAsset(address asset) public onlyOwner returns (bool success) { + require( + tokenIOStableSwapImpl.removeAsset(asset), + "Unable to execute removeAsset" + ); + + return true; + } + + /** + * @notice Return boolean if the asset is an allowed stable asset for the corresponding currency + * @param asset Ethereum address of the ERC20 compliant smart contract to check allowed status of + * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) + * @return {"allowed": "Returns true if the asset is allowed"} + */ + function isAllowedAsset(address asset, string memory currency) public view returns (bool allowed) { + return tokenIOStableSwapImpl.isAllowedAsset(asset, currency); + } + + /** + * Set the Three Letter Abbrevation for the currency associated to the asset + * @param asset Ethereum address of the asset to set the currency for + * @param currency string Currency of the asset (NOTE: This is the currency for the asset) + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function setAssetCurrency(address asset, string memory currency) public onlyOwner returns (bool success) { + require( + tokenIOStableSwapImpl.setAssetCurrency(asset, currency), + "Unable to execute setAssetCurrency" + ); + + return true; + } + + /** + * Get the Currency for an associated asset; + * @param asset Ethereum address of the asset to get the currency for + * @return {"currency": "Returns the Currency of the asset if the asset has been allowed."} + */ + function getAssetCurrency(address asset) public view returns (string memory currency) { + return tokenIOStableSwapImpl.getAssetCurrency(asset); + } + + /** + * @notice Register the address of the asset as a Token X asset for a specific currency + * @notice This method may be deprecated or refactored to allow for multiple interfaces + * @param asset Ethereum address of the ERC20 compliant Token X asset + * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function setTokenXCurrency(address asset, string memory currency) public onlyOwner returns (bool success) { + require( + tokenIOStableSwapImpl.setTokenXCurrency(asset, currency), + "Unable to execute setTokenXCurrency" + ); + + return true; + } + + /** + * @notice Return boolean if the asset is a registered Token X asset for the corresponding currency + * @param asset Ethereum address of the asset to check if is a registered Token X stable coin asset + * @param currency string Currency symbol of the token (e.g. `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CHF`, `NOK`, `NZD`, `SEK`) + * @return {"allowed": "Returns true if the asset is allowed"} + */ + function isTokenXContract(address asset, string memory currency) public view returns (bool isX) { + return tokenIOStableSwapImpl.isTokenXContract(asset, currency); + } + + /** + * @notice Set BPS, Min, Max, and Flat fee params for asset + * @param asset Ethereum address of the asset to set fees for. + * @param feeBps Basis points Swap Fee + * @param feeMin Minimum Swap Fees + * @param feeMax Maximum Swap Fee + * @param feeFlat Flat Swap Fee + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner returns (bool success) { + require(tokenIOStableSwapImpl.setAssetFeeParams(asset, feeMax, feeMin, feeBps, feeFlat), "Unable to execute setAssetFeeParams"); + + return true; + } + + /** + * [calcAssetFees description] + * @param asset Ethereum address of the asset to calculate fees based on + * @param amount Amount to calculate fees on + * @return { "fees" : "Returns the fees for the amount associated with the asset contract"} + */ + function calcAssetFees(address asset, uint amount) public view returns (uint fees) { + return tokenIOStableSwapImpl.calcAssetFees(asset, amount); + } + + /** + * @notice Return boolean if the asset is a registered Token X asset for the corresponding currency + * @notice Amounts will always be passed in according to the decimal representation of the `fromAsset` token; + * @param fromAsset Ethereum address of the asset with allowance for this contract to transfer and + * @param toAsset Ethereum address of the asset to check if is a registered Token X stable coin asset + * @param amount Amount of fromAsset to be transferred. + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function convert(address fromAsset, address toAsset, uint amount) public returns (bool success) { + require(tokenIOStableSwapImpl.convert(fromAsset, toAsset, amount), 'Unable to execute convert'); + + return true; + } + + /** + * Allow this contract to transfer collected fees to another contract; + * @param asset Ethereum address of asset to transfer + * @param to Transfer collected fees to the following account; + * @param amount Amount of fromAsset to be transferred. + * @return { "success" : "Returns true if successfully called from another contract"} + */ + function transferCollectedFees(address asset, address to, uint amount) public onlyOwner returns (bool success) { + require(tokenIOStableSwapImpl.transferCollectedFees(asset, to, amount), "Unable to execute convert"); + + return true; + } + + /** + * @notice gets currency status of contract + * @return {"deprecated" : "Returns true if deprecated, false otherwise"} + */ + function deprecateInterface() public onlyOwner returns (bool deprecated) { + require(tokenIOStableSwapImpl.deprecateInterface(), + "Error: Unable to deprecate contract!"); + return true; + } + +} diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 054e1e3..4a1df8e 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -37,7 +37,7 @@ Changes: must take ownership of the TokenIO contract, it will require using the public methods to update changes to the underlying data. The updated contract must use a standard call to original TokenIO contract such that the request is made from - the upgraded contract and not the transaction origin (tx.origin) of the signing + the upgraded contract and not the transaction origin (msg.sender) of the signing account. diff --git a/deployed/mainnet-deprecated/TokenIOLib.json b/deployed/mainnet-deprecated/TokenIOLib.json deleted file mode 100644 index b9fd646..0000000 --- a/deployed/mainnet-deprecated/TokenIOLib.json +++ /dev/null @@ -1,87990 +0,0 @@ -{ - "contractName": "TokenIOLib", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "currency", - "type": "string" - }, - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "currency", - "type": "string" - }, - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "currency", - "type": "string" - }, - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "name": "data", - "type": "bytes" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "status", - "type": "bool" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "KYCApproval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "status", - "type": "bool" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "AccountStatus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "tokenASymbol", - "type": "string" - }, - { - "indexed": false, - "name": "tokenBSymbol", - "type": "string" - }, - { - "indexed": false, - "name": "tokenAValue", - "type": "uint256" - }, - { - "indexed": false, - "name": "tokenBValue", - "type": "uint256" - }, - { - "indexed": false, - "name": "expiration", - "type": "uint256" - }, - { - "indexed": false, - "name": "transactionHash", - "type": "bytes32" - } - ], - "name": "FxSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "originalAccount", - "type": "address" - }, - { - "indexed": true, - "name": "forwardedAccount", - "type": "address" - } - ], - "name": "AccountForward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "authority", - "type": "address" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "NewAuthority", - "type": "event" - } - ], - "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058207e6fbcbb3ce1f753b1bea39be6bffaecd82c9addb4491097191a91f6849cc83d0029", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058207e6fbcbb3ce1f753b1bea39be6bffaecd82c9addb4491097191a91f6849cc83d0029", - "sourceMap": "900:63992:8:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", - "deployedSourceMap": "900:63992:8:-;;;;;;;;", - "source": "pragma solidity 0.4.24;\n\n\n/**\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title TokenIOLib\n\n@author Ryan Tate , Sean Pollock \n\n@notice This library proxies the TokenIOStorage contract for the interface contract,\nallowing the library and the interfaces to remain stateless, and share a universally\navailable storage contract between interfaces.\n\n\n*/\n\n\nimport \"./SafeMath.sol\";\nimport \"./TokenIOStorage.sol\";\n\n\nlibrary TokenIOLib {\n\n /// @dev all math operating are using SafeMath methods to check for overflow/underflows\n using SafeMath for uint;\n\n /// @dev the Data struct uses the Storage contract for stateful setters\n struct Data {\n TokenIOStorage Storage;\n }\n\n /// @notice Not using `Log` prefix for events to be consistent with ERC20 named events;\n event Approval(address indexed owner, address indexed spender, uint amount);\n event Deposit(string currency, address indexed account, uint amount, string issuerFirm);\n event Withdraw(string currency, address indexed account, uint amount, string issuerFirm);\n event Transfer(string currency, address indexed from, address indexed to, uint amount, bytes data);\n event KYCApproval(address indexed account, bool status, string issuerFirm);\n event AccountStatus(address indexed account, bool status, string issuerFirm);\n event FxSwap(string tokenASymbol,string tokenBSymbol,uint tokenAValue,uint tokenBValue, uint expiration, bytes32 transactionHash);\n event AccountForward(address indexed originalAccount, address indexed forwardedAccount);\n event NewAuthority(address indexed authority, string issuerFirm);\n\n /**\n * @notice Set the token name for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenName Name of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenName(Data storage self, string tokenName) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.name', address(this)));\n require(\n self.Storage.setString(id, tokenName),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token symbol for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenSymbol Symbol of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenSymbol(Data storage self, string tokenSymbol) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.symbol', address(this)));\n require(\n self.Storage.setString(id, tokenSymbol),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token three letter abreviation (TLA) for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenTLA TLA of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenTLA(Data storage self, string tokenTLA) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.tla', address(this)));\n require(\n self.Storage.setString(id, tokenTLA),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token version for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenVersion(Data storage self, string tokenVersion) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.version', address(this)));\n require(\n self.Storage.setString(id, tokenVersion),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token decimals for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @dev This method is not set to the address of the contract, rather is maped to currency\n * @dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param tokenDecimals Decimal representation of the token contract unit amount\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenDecimals(Data storage self, string currency, uint tokenDecimals) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.decimals', currency));\n require(\n self.Storage.setUint(id, tokenDecimals),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set basis point fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeBPS Basis points fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeBPS(Data storage self, uint feeBPS) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.bps', address(this)));\n require(\n self.Storage.setUint(id, feeBPS),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set minimum fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMin Minimum fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMin(Data storage self, uint feeMin) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.min', address(this)));\n require(\n self.Storage.setUint(id, feeMin),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set maximum fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMax Maximum fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMax(Data storage self, uint feeMax) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.max', address(this)));\n require(\n self.Storage.setUint(id, feeMax),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set flat fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeFlat Flat fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeFlat(Data storage self, uint feeFlat) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.flat', address(this)));\n require(\n self.Storage.setUint(id, feeFlat),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set fee message for contract interface\n * @dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n * @dev Fee messages vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMsg Fee message included in a transaction with fees\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMsg(Data storage self, bytes feeMsg) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.msg', address(this)));\n require(\n self.Storage.setBytes(id, feeMsg),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set fee contract for a contract interface\n * @dev feeContract must be a TokenIOFeeContract storage approved contract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @dev | This must be called directly from the interface contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeContract Set the fee contract for `this` contract address interface\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeContract(Data storage self, address feeContract) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.account', address(this)));\n require(\n self.Storage.setAddress(id, feeContract),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n * @dev | This should only be called once from a token interface contract;\n * @dev | This method has an `internal` view\n * @dev | This method is experimental and may be deprecated/refactored\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenNameSpace(Data storage self, string currency) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.namespace', currency));\n require(\n self.Storage.setAddress(id, address(this)),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the KYC approval status (true/false) for a given account\n * @dev | This method has an `internal` view\n * @dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n * @dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param isApproved Boolean (true/false) KYC approval status for a given account\n * @param issuerFirm Firm name for issuing KYC approval\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setKYCApproval(Data storage self, address account, bool isApproved, string issuerFirm) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account)));\n require(\n self.Storage.setBool(id, isApproved),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n\n /// @dev NOTE: Issuer is logged for setting account KYC status\n emit KYCApproval(account, isApproved, issuerFirm);\n return true;\n }\n\n /**\n * @notice Set the global approval status (true/false) for a given account\n * @dev | This method has an `internal` view\n * @dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n * @dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param isAllowed Boolean (true/false) global status for a given account\n * @param issuerFirm Firm name for issuing approval\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setAccountStatus(Data storage self, address account, bool isAllowed, string issuerFirm) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account)));\n require(\n self.Storage.setBool(id, isAllowed),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n\n /// @dev NOTE: Issuer is logged for setting account status\n emit AccountStatus(account, isAllowed, issuerFirm);\n return true;\n }\n\n\n /**\n * @notice Set a forwarded address for an account.\n * @dev | This method has an `internal` view\n * @dev | Forwarded accounts must be set by an authority in case of account recovery;\n * @dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n * @dev | All transactions will be logged under the same KYC information as the original account holder;\n * @param self Internal storage proxying TokenIOStorage contract\n * @param originalAccount Original registered Ethereum address of the account holder\n * @param forwardedAccount Forwarded Ethereum address of the account holder\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setForwardedAccount(Data storage self, address originalAccount, address forwardedAccount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('master.account', forwardedAccount));\n require(\n self.Storage.setAddress(id, originalAccount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Get the original address for a forwarded account\n * @dev | This method has an `internal` view\n * @dev | Will return the registered account for the given forwarded account\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}\n */\n function getForwardedAccount(Data storage self, address account) internal view returns (address registeredAccount) {\n bytes32 id = keccak256(abi.encodePacked('master.account', account));\n address originalAccount = self.Storage.getAddress(id);\n if (originalAccount != 0x0) {\n return originalAccount;\n } else {\n return account;\n }\n }\n\n /**\n * @notice Get KYC approval status for the account holder\n * @dev | This method has an `internal` view\n * @dev | All forwarded accounts will use the original account's status\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"status\" : \"Returns the KYC approval status for an account holder\" }\n */\n function getKYCApproval(Data storage self, address account) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Get global approval status for the account holder\n * @dev | This method has an `internal` view\n * @dev | All forwarded accounts will use the original account's status\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"status\" : \"Returns the global approval status for an account holder\" }\n */\n function getAccountStatus(Data storage self, address account) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Get the contract interface address associated with token symbol\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }\n */\n function getTokenNameSpace(Data storage self, string currency) internal view returns (address contractAddress) {\n bytes32 id = keccak256(abi.encodePacked('token.namespace', currency));\n return self.Storage.getAddress(id);\n }\n\n /**\n * @notice Get the token name for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenName\" : \"Name of the token contract\"}\n */\n function getTokenName(Data storage self, address contractAddress) internal view returns (string tokenName) {\n bytes32 id = keccak256(abi.encodePacked('token.name', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token symbol for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenSymbol\" : \"Symbol of the token contract\"}\n */\n function getTokenSymbol(Data storage self, address contractAddress) internal view returns (string tokenSymbol) {\n bytes32 id = keccak256(abi.encodePacked('token.symbol', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token Three letter abbreviation (TLA) for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenTLA\" : \"TLA of the token contract\"}\n */\n function getTokenTLA(Data storage self, address contractAddress) internal view returns (string tokenTLA) {\n bytes32 id = keccak256(abi.encodePacked('token.tla', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token version for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenVersion\" : \"Semantic version of the token contract\"}\n */\n function getTokenVersion(Data storage self, address contractAddress) internal view returns (string) {\n bytes32 id = keccak256(abi.encodePacked('token.version', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token decimals for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"tokenDecimals\" : \"Decimals of the token contract\"}\n */\n function getTokenDecimals(Data storage self, string currency) internal view returns (uint tokenDecimals) {\n bytes32 id = keccak256(abi.encodePacked('token.decimals', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}\n */\n function getFeeBPS(Data storage self, address contractAddress) internal view returns (uint feeBps) {\n bytes32 id = keccak256(abi.encodePacked('fee.bps', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}\n */\n function getFeeMin(Data storage self, address contractAddress) internal view returns (uint feeMin) {\n bytes32 id = keccak256(abi.encodePacked('fee.min', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}\n */\n function getFeeMax(Data storage self, address contractAddress) internal view returns (uint feeMax) {\n bytes32 id = keccak256(abi.encodePacked('fee.max', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the flat fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}\n */\n function getFeeFlat(Data storage self, address contractAddress) internal view returns (uint feeFlat) {\n bytes32 id = keccak256(abi.encodePacked('fee.flat', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the flat message of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}\n */\n function getFeeMsg(Data storage self, address contractAddress) internal view returns (bytes feeMsg) {\n bytes32 id = keccak256(abi.encodePacked('fee.msg', contractAddress));\n return self.Storage.getBytes(id);\n }\n\n /**\n * @notice Set the master fee contract used as the default fee contract when none is provided\n * @dev | This method has an `internal` view\n * @dev | This value is set in the TokenIOAuthority contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setMasterFeeContract(Data storage self, address contractAddress) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.contract.master'));\n require(\n self.Storage.setAddress(id, contractAddress),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Get the master fee contract set via the TokenIOAuthority contract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}\n */\n function getMasterFeeContract(Data storage self) internal view returns (address masterFeeContract) {\n bytes32 id = keccak256(abi.encodePacked('fee.contract.master'));\n return self.Storage.getAddress(id);\n }\n\n /**\n * @notice Get the fee contract set for a contract interface\n * @dev | This method has an `internal` view\n * @dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n * @dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}\n */\n function getFeeContract(Data storage self, address contractAddress) internal view returns (address feeContract) {\n bytes32 id = keccak256(abi.encodePacked('fee.account', contractAddress));\n\n address feeAccount = self.Storage.getAddress(id);\n if (feeAccount == 0x0) {\n return getMasterFeeContract(self);\n } else {\n return feeAccount;\n }\n }\n\n /**\n * @notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return { \"supply\" : \"Returns the token supply of the given currency\"}\n */\n function getTokenSupply(Data storage self, string currency) internal view returns (uint supply) {\n bytes32 id = keccak256(abi.encodePacked('token.supply', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the token spender allowance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param spender Ethereum address of spender\n * @return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}\n */\n function getTokenAllowance(Data storage self, string currency, address account, address spender) internal view returns (uint allowance) {\n bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, spender)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @return { \"balance\" : \"Return the balance of a given account for a specified currency\"}\n */\n function getTokenBalance(Data storage self, string currency, address account) internal view returns (uint balance) {\n bytes32 id = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}\n */\n function getTokenFrozenBalance(Data storage self, string currency, address account) internal view returns (uint frozenBalance) {\n bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @param amount Amount of tokens to freeze for account\n * @return { \"success\" : \"Return true if successfully called from another contract\"}\n */\n function setTokenFrozenBalance(Data storage self, string currency, address account, uint amount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account)));\n require(\n self.Storage.setUint(id, amount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the fee contract\n * @param amount Transaction value\n * @return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }\n */\n function calculateFees(Data storage self, address contractAddress, uint amount) internal view returns (uint calculatedFees) {\n\n uint maxFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.max', contractAddress)));\n uint minFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.min', contractAddress)));\n uint bpsFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.bps', contractAddress)));\n uint flatFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.flat', contractAddress)));\n uint fees = ((amount.mul(bpsFee)).div(10000)).add(flatFee);\n\n if (fees > maxFee) {\n return maxFee;\n } else if (fees < minFee) {\n return minFee;\n } else {\n return fees;\n }\n }\n\n /**\n * @notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param accountA Ethereum address of first account holder to verify\n * @param accountB Ethereum address of second account holder to verify\n * @return { \"verified\" : \"Returns true if both accounts are successfully verified\" }\n */\n function verifyAccounts(Data storage self, address accountA, address accountB) internal view returns (bool verified) {\n require(\n verifyAccount(self, accountA),\n \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"\n );\n require(\n verifyAccount(self, accountB),\n \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"\n );\n return true;\n }\n\n /**\n * @notice Verified KYC and global status for a single account and return true or throw if account is not verified\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder to verify\n * @return { \"verified\" : \"Returns true if account is successfully verified\" }\n */\n function verifyAccount(Data storage self, address account) internal view returns (bool verified) {\n require(\n getKYCApproval(self, account),\n \"Error: Account does not have KYC approval.\"\n );\n require(\n getAccountStatus(self, account),\n \"Error: Account status is `false`. Account status must be `true`.\"\n );\n return true;\n }\n\n\n /**\n * @notice Transfer an amount of currency token from msg.sender account to another specified account\n * @dev This function is called by an interface that is accessible directly to the account holder\n * @dev | This method has an `internal` view\n * @dev | This method uses `forceTransfer()` low-level api\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function transfer(Data storage self, string currency, address to, uint amount, bytes data) internal returns (bool success) {\n require(address(to) != 0x0, \"Error: `to` address cannot be null.\" );\n require(amount > 0, \"Error: `amount` must be greater than zero\");\n\n address feeContract = getFeeContract(self, address(this));\n uint fees = calculateFees(self, feeContract, amount);\n\n require(\n setAccountSpendingAmount(self, msg.sender, getFxUSDAmount(self, currency, amount)),\n \"Error: Unable to set spending amount for account.\");\n\n require(\n forceTransfer(self, currency, msg.sender, to, amount, data),\n \"Error: Unable to transfer funds to account.\");\n\n // @dev transfer fees to fee contract\n require(\n forceTransfer(self, currency, msg.sender, feeContract, fees, getFeeMsg(self, feeContract)),\n \"Error: Unable to transfer fees to fee contract.\");\n\n return true;\n }\n\n /**\n * @notice Transfer an amount of currency token from account to another specified account via an approved spender account\n * @dev This function is called by an interface that is accessible directly to the account spender\n * @dev | This method has an `internal` view\n * @dev | Transactions will fail if the spending amount exceeds the daily limit\n * @dev | This method uses `forceTransfer()` low-level api\n * @dev | This method implements ERC20 transferFrom() method with approved spender behavior\n * @dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param from Ethereum address of account to send currency amount from\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) {\n require(\n address(to) != 0x0,\n \"Error: `to` address must not be null.\"\n );\n\n address feeContract = getFeeContract(self, address(this));\n uint fees = calculateFees(self, feeContract, amount);\n\n /// @dev NOTE: This transaction will fail if the spending amount exceeds the daily limit\n require(\n setAccountSpendingAmount(self, from, getFxUSDAmount(self, currency, amount)),\n \"Error: Unable to set account spending amount.\"\n );\n\n /// @dev Attempt to transfer the amount\n require(\n forceTransfer(self, currency, from, to, amount, data),\n \"Error: Unable to transfer funds to account.\"\n );\n\n // @dev transfer fees to fee contract\n require(\n forceTransfer(self, currency, from, feeContract, fees, getFeeMsg(self, feeContract)),\n \"Error: Unable to transfer fees to fee contract.\"\n );\n\n /// @dev Attempt to update the spender allowance\n require(\n updateAllowance(self, currency, from, amount),\n \"Error: Unable to update allowance for spender.\"\n );\n\n return true;\n }\n\n /**\n * @notice Low-level transfer method\n * @dev | This method has an `internal` view\n * @dev | This method does not include fees or approved allowances.\n * @dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param from Ethereum address of account to send currency amount from\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) {\n require(\n address(to) != 0x0,\n \"Error: `to` address must not be null.\"\n );\n\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, from)));\n bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, to)));\n\n require(\n self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n require(\n self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n\n emit Transfer(currency, from, to, amount, data);\n\n return true;\n }\n\n /**\n * @notice Low-level method to update spender allowance for account\n * @dev | This method is called inside the `transferFrom()` method\n * @dev | msg.sender == spender address\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @param amount Value to reduce allowance by (i.e. the amount spent)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function updateAllowance(Data storage self, string currency, address account, uint amount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, msg.sender)));\n require(\n self.Storage.setUint(id, self.Storage.getUint(id).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Low-level method to set the allowance for a spender\n * @dev | This method is called inside the `approve()` ERC20 method\n * @dev | msg.sender == account holder\n * @param self Internal storage proxying TokenIOStorage contract\n * @param spender Ethereum address of account spender\n * @param amount Value to set for spender allowance\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function approveAllowance(Data storage self, address spender, uint amount) internal returns (bool success) {\n require(spender != 0x0,\n \"Error: `spender` address cannot be null.\");\n\n string memory currency = getTokenSymbol(self, address(this));\n\n require(\n getTokenFrozenBalance(self, currency, getForwardedAccount(self, spender)) == 0,\n \"Error: Spender must not have a frozen balance directly\");\n\n bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, msg.sender), getForwardedAccount(self, spender)));\n bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, msg.sender)));\n\n require(\n self.Storage.getUint(id_a) == 0 || amount == 0,\n \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\");\n\n require(\n self.Storage.getUint(id_b) >= amount,\n \"Error: Allowance cannot exceed msg.sender token balance.\");\n\n require(\n self.Storage.setUint(id_a, amount),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Approval(msg.sender, spender, amount);\n\n return true;\n }\n\n /**\n * @notice Deposit an amount of currency into the Ethereum account holder\n * @dev | The total supply of the token increases only when new funds are deposited 1:1\n * @dev | This method should only be called by authorized issuer firms\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder to deposit funds for\n * @param amount Value of currency to deposit for account\n * @param issuerFirm Name of the issuing firm authorizing the deposit\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function deposit(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) {\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm));\n bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency));\n\n\n require(self.Storage.setUint(id_a, self.Storage.getUint(id_a).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(self.Storage.setUint(id_c, self.Storage.getUint(id_c).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Deposit(currency, account, amount, issuerFirm);\n\n return true;\n\n }\n\n /**\n * @notice Withdraw an amount of currency from the Ethereum account holder\n * @dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n * @dev | This method should only be called by authorized issuer firms\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder to deposit funds for\n * @param amount Value of currency to withdraw for account\n * @param issuerFirm Name of the issuing firm authorizing the withdraw\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function withdraw(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) {\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm)); // possible for issuer to go negative\n bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency));\n\n require(\n self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(\n self.Storage.setUint(id_b, self.Storage.getUint(id_b).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(\n self.Storage.setUint(id_c, self.Storage.getUint(id_c).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Withdraw(currency, account, amount, issuerFirm);\n\n return true;\n\n }\n\n /**\n * @notice Method for setting a registered issuer firm\n * @dev | Only Token, Inc. and other authorized institutions may set a registered firm\n * @dev | The TokenIOAuthority.sol interface wraps this method\n * @dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the firm to be registered\n * @param approved Approval status to set for the firm (true/false)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setRegisteredFirm(Data storage self, string issuerFirm, bool approved) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm));\n require(\n self.Storage.setBool(id, approved),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Method for setting a registered issuer firm authority\n * @dev | Only Token, Inc. and other approved institutions may set a registered firm\n * @dev | The TokenIOAuthority.sol interface wraps this method\n * @dev | Authority can only be set for a registered issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the firm to be registered to authority\n * @param authorityAddress Ethereum address of the firm authority to be approved\n * @param approved Approval status to set for the firm authority (true/false)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setRegisteredAuthority(Data storage self, string issuerFirm, address authorityAddress, bool approved) internal returns (bool success) {\n require(\n isRegisteredFirm(self, issuerFirm),\n \"Error: `issuerFirm` must be registered.\");\n\n bytes32 id_a = keccak256(abi.encodePacked('registered.authority', issuerFirm, authorityAddress));\n bytes32 id_b = keccak256(abi.encodePacked('registered.authority.firm', authorityAddress));\n\n require(\n self.Storage.setBool(id_a, approved),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n require(\n self.Storage.setString(id_b, issuerFirm),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n\n return true;\n }\n\n /**\n * @notice Get the issuer firm registered to the authority Ethereum address\n * @dev | Only one firm can be registered per authority\n * @param self Internal storage proxying TokenIOStorage contract\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"issuerFirm\" : \"Name of the firm registered to authority\" }\n */\n function getFirmFromAuthority(Data storage self, address authorityAddress) internal view returns (string issuerFirm) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority.firm', getForwardedAccount(self, authorityAddress)));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Return the boolean (true/false) registration status for an issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the issuer firm\n * @return { \"registered\" : \"Return if the issuer firm has been registered\" }\n */\n function isRegisteredFirm(Data storage self, string issuerFirm) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the issuer firm\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }\n */\n function isRegisteredToFirm(Data storage self, string issuerFirm, address authorityAddress) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority', issuerFirm, getForwardedAccount(self, authorityAddress)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return if an authority address is registered\n * @dev | This also checks the status of the registered issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"registered\" : \"Return if the authority is registered\" }\n */\n function isRegisteredAuthority(Data storage self, address authorityAddress) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority', getFirmFromAuthority(self, getForwardedAccount(self, authorityAddress)), getForwardedAccount(self, authorityAddress)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return boolean transaction status if the transaction has been used\n * @param self Internal storage proxying TokenIOStorage contract\n * @param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n * @return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}\n */\n function getTxStatus(Data storage self, bytes32 txHash) internal view returns (bool txStatus) {\n bytes32 id = keccak256(abi.encodePacked('tx.status', txHash));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Set transaction status if the transaction has been used\n * @param self Internal storage proxying TokenIOStorage contract\n * @param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setTxStatus(Data storage self, bytes32 txHash) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('tx.status', txHash));\n /// @dev Ensure transaction has not yet been used;\n require(!getTxStatus(self, txHash),\n \"Error: Transaction status must be false before setting the transaction status.\");\n\n /// @dev Update the status of the transaction;\n require(self.Storage.setBool(id, true),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Accepts a signed fx request to swap currency pairs at a given amount;\n * @dev | This method can be called directly between peers\n * @dev | This method does not take transaction fees from the swap\n * @param self Internal storage proxying TokenIOStorage contract\n * @param requester address Requester is the orginator of the offer and must\n * match the signature of the payload submitted by the fulfiller\n * @param symbolA Symbol of the currency desired\n * @param symbolB Symbol of the currency offered\n * @param valueA Amount of the currency desired\n * @param valueB Amount of the currency offered\n * @param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n * @param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n * @param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n * @param expiration Expiration of the offer; Offer is good until expired\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function execSwap(\n Data storage self,\n address requester,\n string symbolA,\n string symbolB,\n uint valueA,\n uint valueB,\n uint8 sigV,\n bytes32 sigR,\n bytes32 sigS,\n uint expiration\n ) internal returns (bool success) {\n\n bytes32 fxTxHash = keccak256(abi.encodePacked(requester, symbolA, symbolB, valueA, valueB, expiration));\n\n /// @notice check that sender and requester accounts are verified\n /// @notice Only verified accounts can perform currency swaps\n require(\n verifyAccounts(self, msg.sender, requester),\n \"Error: Only verified accounts can perform currency swaps.\");\n\n /// @dev Immediately set this transaction to be confirmed before updating any params;\n require(\n setTxStatus(self, fxTxHash),\n \"Error: Failed to set transaction status to fulfilled.\");\n\n /// @dev Ensure contract has not yet expired;\n require(expiration >= now, \"Error: Transaction has expired!\");\n\n /// @dev Recover the address of the signature from the hashed digest;\n /// @dev Ensure it equals the requester's address\n require(\n ecrecover(fxTxHash, sigV, sigR, sigS) == requester,\n \"Error: Address derived from transaction signature does not match the requester address\");\n\n /// @dev Transfer funds from each account to another.\n require(\n forceTransfer(self, symbolA, msg.sender, requester, valueA, \"0x0\"),\n \"Error: Unable to transfer funds to account.\");\n\n require(\n forceTransfer(self, symbolB, requester, msg.sender, valueB, \"0x0\"),\n \"Error: Unable to transfer funds to account.\");\n\n emit FxSwap(symbolA, symbolB, valueA, valueB, expiration, fxTxHash);\n\n return true;\n }\n\n /**\n * @notice Deprecate a contract interface\n * @dev | This is a low-level method to deprecate a contract interface.\n * @dev | This is useful if the interface needs to be updated or becomes out of date\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Ethereum address of the contract interface\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function setDeprecatedContract(Data storage self, address contractAddress) internal returns (bool success) {\n require(contractAddress != 0x0,\n \"Error: cannot deprecate a null address.\");\n\n bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress));\n\n require(self.Storage.setBool(id, true),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Return the deprecation status of a contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Ethereum address of the contract interface\n * @return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}\n */\n function isContractDeprecated(Data storage self, address contractAddress) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Set the Account Spending Period Limit as UNIX timestamp\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param period Unix timestamp of the spending period\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingPeriod(Data storage self, address account, uint period) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('limit.spending.period', account));\n require(self.Storage.setUint(id, period),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Get the Account Spending Period Limit as UNIX timestamp\n * @dev | Each account has it's own daily spending limit\n * @dev | If the current spending period has expired, it will be set upon next `transfer()`\n * or `transferFrom()` request\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"period\" : \"Returns Unix timestamp of the current spending period\"}\n */\n function getAccountSpendingPeriod(Data storage self, address account) internal view returns (uint period) {\n bytes32 id = keccak256(abi.encodePacked('limit.spending.period', account));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the account spending limit amount\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param limit Spending limit amount\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingLimit(Data storage self, address account, uint limit) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.limit', account));\n require(self.Storage.setUint(id, limit),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Get the account spending limit amount\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"limit\" : \"Returns the account spending limit amount\"}\n */\n function getAccountSpendingLimit(Data storage self, address account) internal view returns (uint limit) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.limit', account));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the account spending amount for the daily period\n * @dev | Each account has it's own daily spending limit\n * @dev | This transaction will throw if the new spending amount is greater than the limit\n * @dev | This method is called in the `transfer()` and `transferFrom()` methods\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param amount Set the amount spent for the daily period\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingAmount(Data storage self, address account, uint amount) internal returns (bool success) {\n\n /// @dev NOTE: Always ensure the period is current when checking the daily spend limit\n require(updateAccountSpendingPeriod(self, account),\n \"Error: Unable to update account spending period.\");\n\n uint updatedAmount = getAccountSpendingAmount(self, account).add(amount);\n\n /// @dev Ensure the spend limit is greater than the amount spend for the period\n require(\n getAccountSpendingLimit(self, account) >= updatedAmount,\n \"Error: Account cannot exceed its daily spend limit.\");\n\n /// @dev Update the spending period amount if within limit\n bytes32 id = keccak256(abi.encodePacked('account.spending.amount', account, getAccountSpendingPeriod(self, account)));\n require(self.Storage.setUint(id, updatedAmount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Low-level API to ensure the account spending period is always current\n * @dev | This method is internally called by `setAccountSpendingAmount()` to ensure\n * spending period is always the most current daily period.\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function updateAccountSpendingPeriod(Data storage self, address account) internal returns (bool success) {\n uint begDate = getAccountSpendingPeriod(self, account);\n if (begDate > now) {\n return true;\n } else {\n uint duration = 86400; // 86400 seconds in a day\n require(\n setAccountSpendingPeriod(self, account, begDate.add(((now.sub(begDate)).div(duration).add(1)).mul(duration))),\n \"Error: Unable to update account spending period.\");\n\n return true;\n }\n }\n\n /**\n * @notice Return the amount spent during the current period\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"amount\" : \"Returns the amount spent by the account during the current period\"}\n */\n function getAccountSpendingAmount(Data storage self, address account) internal view returns (uint amount) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.amount', account, getAccountSpendingPeriod(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Return the amount remaining during the current period\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}\n */\n function getAccountSpendingRemaining(Data storage self, address account) internal view returns (uint remainingLimit) {\n return getAccountSpendingLimit(self, account).sub(getAccountSpendingAmount(self, account));\n }\n\n /**\n * @notice Set the foreign currency exchange rate to USD in basis points\n * @dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param bpsRate Basis point rate of foreign currency exchange rate to USD\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function setFxUSDBPSRate(Data storage self, string currency, uint bpsRate) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency));\n require(\n self.Storage.setUint(id, bpsRate),\n \"Error: Unable to update account spending period.\");\n\n return true;\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount in basis points\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDBPSRate(Data storage self, string currency) internal view returns (uint bpsRate) {\n bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param fxAmount Amount of foreign currency to exchange into USD\n * @return {\"amount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDAmount(Data storage self, string currency, uint fxAmount) internal view returns (uint amount) {\n uint usdDecimals = getTokenDecimals(self, 'USDx');\n uint fxDecimals = getTokenDecimals(self, currency);\n /// @dev ensure decimal precision is normalized to USD decimals\n uint usdAmount = ((fxAmount.mul(getFxUSDBPSRate(self, currency)).div(10000)).mul(10**usdDecimals)).div(10**fxDecimals);\n return usdAmount;\n }\n\n\n}\n", - "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", - "ast": { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", - "exportedSymbols": { - "TokenIOLib": [ - 4622 - ] - }, - "id": 4623, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1638, - "literals": [ - "solidity", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:23:8" - }, - { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", - "file": "./SafeMath.sol", - "id": 1639, - "nodeType": "ImportDirective", - "scope": 4623, - "sourceUnit": 286, - "src": "842:24:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", - "file": "./TokenIOStorage.sol", - "id": 1640, - "nodeType": "ImportDirective", - "scope": 4623, - "sourceUnit": 5242, - "src": "867:30:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 4622, - "linearizedBaseContracts": [ - 4622 - ], - "name": "TokenIOLib", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 1643, - "libraryName": { - "contractScope": null, - "id": 1641, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 285, - "src": "1020:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$285", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "1014:24:8", - "typeName": { - "id": 1642, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1033:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "canonicalName": "TokenIOLib.Data", - "id": 1646, - "members": [ - { - "constant": false, - "id": 1645, - "name": "Storage", - "nodeType": "VariableDeclaration", - "scope": 1646, - "src": "1134:22:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - }, - "typeName": { - "contractScope": null, - "id": 1644, - "name": "TokenIOStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5241, - "src": "1134:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Data", - "nodeType": "StructDefinition", - "scope": 4622, - "src": "1116:45:8", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice Not using `Log` prefix for events to be consistent with ERC20 named events;", - "id": 1654, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1653, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1648, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1654, - "src": "1270:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1647, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1270:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1650, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1654, - "src": "1293:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1649, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1293:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1652, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1654, - "src": "1318:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1651, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1318:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1269:61:8" - }, - "src": "1255:76:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1664, - "name": "Deposit", - "nodeType": "EventDefinition", - "parameters": { - "id": 1663, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1656, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1664, - "src": "1348:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1655, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1348:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1658, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1664, - "src": "1365:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1657, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1365:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1660, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1664, - "src": "1390:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1659, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1390:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1662, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1664, - "src": "1403:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1661, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1403:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1347:74:8" - }, - "src": "1334:88:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1674, - "name": "Withdraw", - "nodeType": "EventDefinition", - "parameters": { - "id": 1673, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1666, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1674, - "src": "1440:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1665, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1440:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1668, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1674, - "src": "1457:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1667, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1457:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1670, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1674, - "src": "1482:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1669, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1482:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1672, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1674, - "src": "1495:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1671, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1495:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1439:74:8" - }, - "src": "1425:89:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1686, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 1685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1676, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1532:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1675, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1532:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1678, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1549:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1677, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1549:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1680, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1571:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1679, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1571:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1682, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1591:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1681, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1591:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1684, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1604:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1683, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1604:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1531:84:8" - }, - "src": "1517:99:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1694, - "name": "KYCApproval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1693, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1688, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1694, - "src": "1637:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1687, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1637:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1690, - "indexed": false, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1694, - "src": "1662:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1689, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1662:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1692, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1694, - "src": "1675:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1691, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1675:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1636:57:8" - }, - "src": "1619:75:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1702, - "name": "AccountStatus", - "nodeType": "EventDefinition", - "parameters": { - "id": 1701, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1696, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1702, - "src": "1717:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1695, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1717:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1698, - "indexed": false, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1702, - "src": "1742:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1697, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1742:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1700, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1702, - "src": "1755:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1699, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1755:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1716:57:8" - }, - "src": "1697:77:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1716, - "name": "FxSwap", - "nodeType": "EventDefinition", - "parameters": { - "id": 1715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1704, - "indexed": false, - "name": "tokenASymbol", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1790:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1703, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1790:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1706, - "indexed": false, - "name": "tokenBSymbol", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1810:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1705, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1810:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1708, - "indexed": false, - "name": "tokenAValue", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1830:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1707, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1830:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1710, - "indexed": false, - "name": "tokenBValue", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1847:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1709, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1847:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1712, - "indexed": false, - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1865:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1711, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1865:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1714, - "indexed": false, - "name": "transactionHash", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1882:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1713, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1882:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1789:117:8" - }, - "src": "1777:130:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1722, - "name": "AccountForward", - "nodeType": "EventDefinition", - "parameters": { - "id": 1721, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1718, - "indexed": true, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 1722, - "src": "1931:31:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1931:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1720, - "indexed": true, - "name": "forwardedAccount", - "nodeType": "VariableDeclaration", - "scope": 1722, - "src": "1964:32:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1719, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1964:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1930:67:8" - }, - "src": "1910:88:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1728, - "name": "NewAuthority", - "nodeType": "EventDefinition", - "parameters": { - "id": 1727, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1724, - "indexed": true, - "name": "authority", - "nodeType": "VariableDeclaration", - "scope": 1728, - "src": "2020:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1723, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2020:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1726, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1728, - "src": "2047:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1725, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2047:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2019:46:8" - }, - "src": "2001:65:8" - }, - { - "body": { - "id": 1761, - "nodeType": "Block", - "src": "2556:275:8", - "statements": [ - { - "assignments": [ - 1738 - ], - "declarations": [ - { - "constant": false, - "id": 1738, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1762, - "src": "2562:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1737, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2562:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1748, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d65", - "id": 1742, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2602:12:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - "value": "token.name" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "2624:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2616:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2616:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1740, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "2585:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1741, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2585:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2585:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1739, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "2575:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2575:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2562:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1753, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1738, - "src": "2675:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1754, - "name": "tokenName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1732, - "src": "2679:9:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1750, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1730, - "src": "2652:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1751, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "2652:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1752, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "2652:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2652:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1756, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2697:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1749, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "2637:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2637:172:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1758, - "nodeType": "ExpressionStatement", - "src": "2637:172:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1759, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2822:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1736, - "id": 1760, - "nodeType": "Return", - "src": "2815:11:8" - } - ] - }, - "documentation": "@notice Set the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenName Name of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1762, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1733, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1730, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1762, - "src": "2487:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1729, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "2487:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1732, - "name": "tokenName", - "nodeType": "VariableDeclaration", - "scope": 1762, - "src": "2506:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1731, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2506:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2486:37:8" - }, - "payable": false, - "returnParameters": { - "id": 1736, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1735, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1762, - "src": "2542:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1734, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2542:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2541:14:8" - }, - "scope": 4622, - "src": "2465:366:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1795, - "nodeType": "Block", - "src": "3331:279:8", - "statements": [ - { - "assignments": [ - 1772 - ], - "declarations": [ - { - "constant": false, - "id": 1772, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1796, - "src": "3337:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1771, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3337:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1782, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e73796d626f6c", - "id": 1776, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3377:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - "value": "token.symbol" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1778, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "3401:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3393:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3393:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1774, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "3360:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1775, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3360:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3360:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1773, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "3350:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3350:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3337:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1787, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1772, - "src": "3452:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1788, - "name": "tokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1766, - "src": "3456:11:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1784, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1764, - "src": "3429:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1785, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "3429:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "3429:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3429:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3476:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "3414:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3414:174:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1792, - "nodeType": "ExpressionStatement", - "src": "3414:174:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1793, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3601:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1770, - "id": 1794, - "nodeType": "Return", - "src": "3594:11:8" - } - ] - }, - "documentation": "@notice Set the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenSymbol Symbol of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1796, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenSymbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1767, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1764, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1796, - "src": "3260:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1763, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "3260:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1766, - "name": "tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 1796, - "src": "3279:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1765, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3279:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3259:39:8" - }, - "payable": false, - "returnParameters": { - "id": 1770, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1769, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1796, - "src": "3317:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1768, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3317:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3316:14:8" - }, - "scope": 4622, - "src": "3236:374:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1829, - "nodeType": "Block", - "src": "4122:273:8", - "statements": [ - { - "assignments": [ - 1806 - ], - "declarations": [ - { - "constant": false, - "id": 1806, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1830, - "src": "4128:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1805, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4128:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1816, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e746c61", - "id": 1810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4168:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - "value": "token.tla" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1812, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "4189:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1811, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4181:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4181:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1808, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "4151:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4151:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4151:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1807, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "4141:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4141:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4128:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1821, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1806, - "src": "4240:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1822, - "name": "tokenTLA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1800, - "src": "4244:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1818, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1798, - "src": "4217:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1819, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "4217:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "4217:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4217:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1824, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4261:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1817, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "4202:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4202:171:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1826, - "nodeType": "ExpressionStatement", - "src": "4202:171:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1827, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4386:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1804, - "id": 1828, - "nodeType": "Return", - "src": "4379:11:8" - } - ] - }, - "documentation": "@notice Set the token three letter abreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenTLA TLA of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1830, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenTLA", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1798, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1830, - "src": "4054:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1797, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "4054:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1800, - "name": "tokenTLA", - "nodeType": "VariableDeclaration", - "scope": 1830, - "src": "4073:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1799, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4073:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4053:36:8" - }, - "payable": false, - "returnParameters": { - "id": 1804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1803, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1830, - "src": "4108:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1802, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4108:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4107:14:8" - }, - "scope": 4622, - "src": "4033:362:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1863, - "nodeType": "Block", - "src": "4944:281:8", - "statements": [ - { - "assignments": [ - 1840 - ], - "declarations": [ - { - "constant": false, - "id": 1840, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1864, - "src": "4950:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1839, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4950:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1850, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e76657273696f6e", - "id": 1844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4990:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - "value": "token.version" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1846, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "5015:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1845, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5007:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5007:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1842, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "4973:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4973:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4973:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1841, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "4963:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4963:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4950:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1855, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1840, - "src": "5066:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1856, - "name": "tokenVersion", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1834, - "src": "5070:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1852, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1832, - "src": "5043:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1853, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "5043:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "5043:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5043:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5091:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1851, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "5028:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5028:175:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1860, - "nodeType": "ExpressionStatement", - "src": "5028:175:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1861, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5216:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1838, - "id": 1862, - "nodeType": "Return", - "src": "5209:11:8" - } - ] - }, - "documentation": "@notice Set the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1864, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenVersion", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1835, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1832, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1864, - "src": "4872:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1831, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "4872:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1834, - "name": "tokenVersion", - "nodeType": "VariableDeclaration", - "scope": 1864, - "src": "4891:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1833, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4891:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4871:40:8" - }, - "payable": false, - "returnParameters": { - "id": 1838, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1837, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1864, - "src": "4930:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1836, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4930:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4929:14:8" - }, - "scope": 4622, - "src": "4847:378:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1897, - "nodeType": "Block", - "src": "6053:276:8", - "statements": [ - { - "assignments": [ - 1876 - ], - "declarations": [ - { - "constant": false, - "id": 1876, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "6059:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1875, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6059:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1884, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e646563696d616c73", - "id": 1880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6099:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - "value": "token.decimals" - }, - { - "argumentTypes": null, - "id": 1881, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1868, - "src": "6117:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1878, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "6082:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6082:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6082:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1877, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "6072:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6072:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6059:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1889, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1876, - "src": "6169:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1890, - "name": "tokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1870, - "src": "6173:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1886, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1866, - "src": "6148:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1887, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "6148:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "6148:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6148:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6195:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1885, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "6133:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6133:174:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1894, - "nodeType": "ExpressionStatement", - "src": "6133:174:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1895, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6320:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1874, - "id": 1896, - "nodeType": "Return", - "src": "6313:11:8" - } - ] - }, - "documentation": "@notice Set the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@dev This method is not set to the address of the contract, rather is maped to currency\n@dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param tokenDecimals Decimal representation of the token contract unit amount\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1898, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenDecimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1871, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1866, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "5965:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1865, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "5965:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1868, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "5984:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1867, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5984:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1870, - "name": "tokenDecimals", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "6001:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1869, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6001:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5964:56:8" - }, - "payable": false, - "returnParameters": { - "id": 1874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1873, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "6039:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1872, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6039:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6038:14:8" - }, - "scope": 4622, - "src": "5939:390:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1931, - "nodeType": "Block", - "src": "6889:267:8", - "statements": [ - { - "assignments": [ - 1908 - ], - "declarations": [ - { - "constant": false, - "id": 1908, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1932, - "src": "6895:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1907, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6895:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1918, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 1912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6935:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1914, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "6954:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6946:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6946:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1910, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "6918:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6918:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6918:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1909, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "6908:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6908:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6895:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1923, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1908, - "src": "7003:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1924, - "name": "feeBPS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1902, - "src": "7007:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1920, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1900, - "src": "6982:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1921, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "6982:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "6982:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6982:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7022:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1919, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "6967:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6967:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1928, - "nodeType": "ExpressionStatement", - "src": "6967:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7147:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1906, - "id": 1930, - "nodeType": "Return", - "src": "7140:11:8" - } - ] - }, - "documentation": "@notice Set basis point fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeBPS Basis points fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1932, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeBPS", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1903, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1900, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1932, - "src": "6825:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1899, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "6825:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1902, - "name": "feeBPS", - "nodeType": "VariableDeclaration", - "scope": 1932, - "src": "6844:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1901, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6844:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6824:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1905, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1932, - "src": "6875:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1904, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6875:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6874:14:8" - }, - "scope": 4622, - "src": "6806:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1965, - "nodeType": "Block", - "src": "7707:267:8", - "statements": [ - { - "assignments": [ - 1942 - ], - "declarations": [ - { - "constant": false, - "id": 1942, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1966, - "src": "7713:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1941, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7713:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1952, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 1946, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7753:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1948, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "7772:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1947, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7764:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7764:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1944, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "7736:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1945, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7736:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7736:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1943, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "7726:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7726:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7713:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1957, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1942, - "src": "7821:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1958, - "name": "feeMin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "7825:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1954, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1934, - "src": "7800:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1955, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "7800:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "7800:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7800:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1960, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7840:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1953, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "7785:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7785:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1962, - "nodeType": "ExpressionStatement", - "src": "7785:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7965:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1940, - "id": 1964, - "nodeType": "Return", - "src": "7958:11:8" - } - ] - }, - "documentation": "@notice Set minimum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMin Minimum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1966, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1934, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1966, - "src": "7643:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1933, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "7643:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1936, - "name": "feeMin", - "nodeType": "VariableDeclaration", - "scope": 1966, - "src": "7662:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1935, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7662:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7642:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1940, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1939, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1966, - "src": "7693:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1938, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7693:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7692:14:8" - }, - "scope": 4622, - "src": "7624:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1999, - "nodeType": "Block", - "src": "8525:267:8", - "statements": [ - { - "assignments": [ - 1976 - ], - "declarations": [ - { - "constant": false, - "id": 1976, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2000, - "src": "8531:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1975, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8531:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1986, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 1980, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8571:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1982, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "8590:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8582:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8582:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1978, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "8554:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1979, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8554:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8554:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1977, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "8544:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8544:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8531:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1991, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1976, - "src": "8639:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1992, - "name": "feeMax", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1970, - "src": "8643:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1988, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1968, - "src": "8618:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1989, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "8618:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "8618:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8618:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8658:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1987, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "8603:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8603:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1996, - "nodeType": "ExpressionStatement", - "src": "8603:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8783:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1974, - "id": 1998, - "nodeType": "Return", - "src": "8776:11:8" - } - ] - }, - "documentation": "@notice Set maximum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMax Maximum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2000, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMax", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1971, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1968, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2000, - "src": "8461:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1967, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "8461:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1970, - "name": "feeMax", - "nodeType": "VariableDeclaration", - "scope": 2000, - "src": "8480:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1969, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8480:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8460:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1974, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1973, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2000, - "src": "8511:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1972, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8511:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8510:14:8" - }, - "scope": 4622, - "src": "8442:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2033, - "nodeType": "Block", - "src": "9340:269:8", - "statements": [ - { - "assignments": [ - 2010 - ], - "declarations": [ - { - "constant": false, - "id": 2010, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2034, - "src": "9346:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2009, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9346:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2020, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2014, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9386:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2016, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "9406:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 2015, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9398:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9398:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2012, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "9369:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2013, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9369:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9369:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2011, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "9359:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9359:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9346:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2025, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2010, - "src": "9455:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2026, - "name": "feeFlat", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2004, - "src": "9459:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2022, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2002, - "src": "9434:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2023, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "9434:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "9434:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 2027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9434:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9475:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2021, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "9419:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9419:168:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2030, - "nodeType": "ExpressionStatement", - "src": "9419:168:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2031, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9600:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2008, - "id": 2032, - "nodeType": "Return", - "src": "9593:11:8" - } - ] - }, - "documentation": "@notice Set flat fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeFlat Flat fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2034, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeFlat", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2005, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2002, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2034, - "src": "9275:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2001, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "9275:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2004, - "name": "feeFlat", - "nodeType": "VariableDeclaration", - "scope": 2034, - "src": "9294:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2003, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9294:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9274:33:8" - }, - "payable": false, - "returnParameters": { - "id": 2008, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2007, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2034, - "src": "9326:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2006, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9326:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9325:14:8" - }, - "scope": 4622, - "src": "9255:354:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2067, - "nodeType": "Block", - "src": "10190:268:8", - "statements": [ - { - "assignments": [ - 2044 - ], - "declarations": [ - { - "constant": false, - "id": 2044, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2068, - "src": "10196:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2043, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10196:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2054, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d7367", - "id": 2048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10236:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - "value": "fee.msg" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2050, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "10255:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 2049, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10247:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10247:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2046, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "10219:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2047, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10219:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10219:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2045, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "10209:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10209:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10196:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2059, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2044, - "src": "10305:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2060, - "name": "feeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2038, - "src": "10309:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2056, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2036, - "src": "10283:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2057, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "10283:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2058, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBytes", - "nodeType": "MemberAccess", - "referencedDeclaration": 5026, - "src": "10283:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,bytes memory) external returns (bool)" - } - }, - "id": 2061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10283:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2062, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10324:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2055, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "10268:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10268:168:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2064, - "nodeType": "ExpressionStatement", - "src": "10268:168:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10449:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2042, - "id": 2066, - "nodeType": "Return", - "src": "10442:11:8" - } - ] - }, - "documentation": "@notice Set fee message for contract interface\n@dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n@dev Fee messages vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMsg Fee message included in a transaction with fees\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2068, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMsg", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2039, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2036, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2068, - "src": "10125:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2035, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "10125:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2038, - "name": "feeMsg", - "nodeType": "VariableDeclaration", - "scope": 2068, - "src": "10144:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2037, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10144:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10124:33:8" - }, - "payable": false, - "returnParameters": { - "id": 2042, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2041, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2068, - "src": "10176:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2040, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10176:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10175:14:8" - }, - "scope": 4622, - "src": "10106:352:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2101, - "nodeType": "Block", - "src": "11123:279:8", - "statements": [ - { - "assignments": [ - 2078 - ], - "declarations": [ - { - "constant": false, - "id": 2078, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2102, - "src": "11129:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2077, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11129:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2088, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6163636f756e74", - "id": 2082, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - "value": "fee.account" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2084, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "11192:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 2083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11184:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11184:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2080, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "11152:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11152:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11152:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2079, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "11142:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11142:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11129:70:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2093, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2078, - "src": "11244:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2094, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "11248:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2090, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2070, - "src": "11220:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2091, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "11220:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4966, - "src": "11220:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11220:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2096, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11268:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2089, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "11205:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11205:175:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2098, - "nodeType": "ExpressionStatement", - "src": "11205:175:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11393:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2076, - "id": 2100, - "nodeType": "Return", - "src": "11386:11:8" - } - ] - }, - "documentation": "@notice Set fee contract for a contract interface\n@dev feeContract must be a TokenIOFeeContract storage approved contract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@dev | This must be called directly from the interface contract\n@param self Internal storage proxying TokenIOStorage contract\n@param feeContract Set the fee contract for `this` contract address interface\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2102, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2073, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2070, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2102, - "src": "11051:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2069, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "11051:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2072, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 2102, - "src": "11070:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11070:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11050:40:8" - }, - "payable": false, - "returnParameters": { - "id": 2076, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2075, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2102, - "src": "11109:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2074, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11109:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11108:14:8" - }, - "scope": 4622, - "src": "11027:375:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2135, - "nodeType": "Block", - "src": "12037:280:8", - "statements": [ - { - "assignments": [ - 2112 - ], - "declarations": [ - { - "constant": false, - "id": 2112, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2136, - "src": "12043:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2111, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12043:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2120, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d657370616365", - "id": 2116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12083:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - "value": "token.namespace" - }, - { - "argumentTypes": null, - "id": 2117, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2106, - "src": "12102:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2114, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "12066:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12066:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12066:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2113, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "12056:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12056:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12043:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2125, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2112, - "src": "12157:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2127, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "12169:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 2126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12161:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12161:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2122, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2104, - "src": "12133:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2123, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "12133:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4966, - "src": "12133:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12133:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2130, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12183:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "12118:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12118:177:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2132, - "nodeType": "ExpressionStatement", - "src": "12118:177:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12308:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2110, - "id": 2134, - "nodeType": "Return", - "src": "12301:11:8" - } - ] - }, - "documentation": "@notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n@dev | This should only be called once from a token interface contract;\n@dev | This method has an `internal` view\n@dev | This method is experimental and may be deprecated/refactored\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2136, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenNameSpace", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2104, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2136, - "src": "11969:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2103, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "11969:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2106, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2136, - "src": "11988:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2105, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11988:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11968:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2110, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2109, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2136, - "src": "12023:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2108, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12023:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12022:14:8" - }, - "scope": 4622, - "src": "11942:375:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2180, - "nodeType": "Block", - "src": "13115:435:8", - "statements": [ - { - "assignments": [ - 2150 - ], - "declarations": [ - { - "constant": false, - "id": 2150, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13123:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2149, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13123:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2161, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e6b7963", - "id": 2154, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13163:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - "value": "account.kyc" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2156, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2138, - "src": "13198:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2157, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2140, - "src": "13204:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2155, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "13178:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13178:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "13146:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13146:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13146:67:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2151, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "13136:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13136:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13123:91:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2166, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2150, - "src": "13260:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2167, - "name": "isApproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2142, - "src": "13264:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2163, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2138, - "src": "13239:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2164, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "13239:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "13239:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 2168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13239:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13285:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2162, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "13222:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13222:177:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2171, - "nodeType": "ExpressionStatement", - "src": "13222:177:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2173, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2140, - "src": "13494:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2174, - "name": "isApproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2142, - "src": "13503:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2175, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2144, - "src": "13515:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2172, - "name": "KYCApproval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1694, - "src": "13482:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,bool,string memory)" - } - }, - "id": 2176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13482:44:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2177, - "nodeType": "EmitStatement", - "src": "13477:49:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13541:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2148, - "id": 2179, - "nodeType": "Return", - "src": "13534:11:8" - } - ] - }, - "documentation": "@notice Set the KYC approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isApproved Boolean (true/false) KYC approval status for a given account\n@param issuerFirm Firm name for issuing KYC approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2181, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setKYCApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2145, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2138, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13011:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2137, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "13011:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2140, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13030:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2139, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13030:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2142, - "name": "isApproved", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13047:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2141, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13047:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2144, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13064:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2143, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "13064:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13010:72:8" - }, - "payable": false, - "returnParameters": { - "id": 2148, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2147, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13101:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2146, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13101:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13100:14:8" - }, - "scope": 4622, - "src": "12987:563:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2225, - "nodeType": "Block", - "src": "14345:419:8", - "statements": [ - { - "assignments": [ - 2195 - ], - "declarations": [ - { - "constant": false, - "id": 2195, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14351:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2194, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14351:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2206, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e616c6c6f776564", - "id": 2199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14391:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - "value": "account.allowed" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2201, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2183, - "src": "14430:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2202, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2185, - "src": "14436:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2200, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "14410:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14410:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2197, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "14374:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14374:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14374:71:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2196, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "14364:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14364:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14351:95:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2211, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2195, - "src": "14488:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2212, - "name": "isAllowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "14492:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2208, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2183, - "src": "14467:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2209, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "14467:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "14467:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 2213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14467:35:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2214, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14510:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2207, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "14452:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14452:170:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2216, - "nodeType": "ExpressionStatement", - "src": "14452:170:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2218, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2185, - "src": "14711:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2219, - "name": "isAllowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "14720:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2220, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "14731:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2217, - "name": "AccountStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1702, - "src": "14697:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,bool,string memory)" - } - }, - "id": 2221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14697:45:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2222, - "nodeType": "EmitStatement", - "src": "14692:50:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2223, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14755:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2193, - "id": 2224, - "nodeType": "Return", - "src": "14748:11:8" - } - ] - }, - "documentation": "@notice Set the global approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isAllowed Boolean (true/false) global status for a given account\n@param issuerFirm Firm name for issuing approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2226, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2183, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14242:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2182, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "14242:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2185, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14261:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2184, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14261:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2187, - "name": "isAllowed", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14278:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2186, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14278:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2189, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14294:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2188, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14294:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14241:71:8" - }, - "payable": false, - "returnParameters": { - "id": 2193, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2192, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14331:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2191, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14331:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14330:14:8" - }, - "scope": 4622, - "src": "14216:548:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2259, - "nodeType": "Block", - "src": "15649:289:8", - "statements": [ - { - "assignments": [ - 2238 - ], - "declarations": [ - { - "constant": false, - "id": 2238, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15655:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2237, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15655:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2246, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6d61737465722e6163636f756e74", - "id": 2242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15695:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - "value": "master.account" - }, - { - "argumentTypes": null, - "id": 2243, - "name": "forwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "15713:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2240, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "15678:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15678:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15678:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2239, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "15668:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15668:63:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15655:76:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2251, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2238, - "src": "15776:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2252, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2230, - "src": "15780:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2248, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2228, - "src": "15752:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2249, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "15752:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4966, - "src": "15752:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15752:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2254, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15804:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2247, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "15737:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15737:179:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2256, - "nodeType": "ExpressionStatement", - "src": "15737:179:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15929:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2236, - "id": 2258, - "nodeType": "Return", - "src": "15922:11:8" - } - ] - }, - "documentation": "@notice Set a forwarded address for an account.\n@dev | This method has an `internal` view\n@dev | Forwarded accounts must be set by an authority in case of account recovery;\n@dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n@dev | All transactions will be logged under the same KYC information as the original account holder;\n@param self Internal storage proxying TokenIOStorage contract\n@param originalAccount Original registered Ethereum address of the account holder\n@param forwardedAccount Forwarded Ethereum address of the account holder\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2260, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setForwardedAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2233, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2228, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15547:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2227, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "15547:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2230, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15566:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15566:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2232, - "name": "forwardedAccount", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15591:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2231, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15591:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15546:70:8" - }, - "payable": false, - "returnParameters": { - "id": 2236, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2235, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15635:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2234, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15635:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15634:14:8" - }, - "scope": 4622, - "src": "15518:420:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2297, - "nodeType": "Block", - "src": "16517:242:8", - "statements": [ - { - "assignments": [ - 2270 - ], - "declarations": [ - { - "constant": false, - "id": 2270, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16523:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2269, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16523:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2278, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6d61737465722e6163636f756e74", - "id": 2274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16563:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - "value": "master.account" - }, - { - "argumentTypes": null, - "id": 2275, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2264, - "src": "16581:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2272, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "16546:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16546:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16546:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2271, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "16536:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16536:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16523:67:8" - }, - { - "assignments": [ - 2280 - ], - "declarations": [ - { - "constant": false, - "id": 2280, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16596:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2279, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16596:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2286, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2284, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2270, - "src": "16646:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2281, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2262, - "src": "16622:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2282, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "16622:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5180, - "src": "16622:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16622:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16596:53:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2287, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "16659:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2288, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16678:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "16659:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2295, - "nodeType": "Block", - "src": "16726:29:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2293, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2264, - "src": "16741:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2268, - "id": 2294, - "nodeType": "Return", - "src": "16734:14:8" - } - ] - }, - "id": 2296, - "nodeType": "IfStatement", - "src": "16655:100:8", - "trueBody": { - "id": 2292, - "nodeType": "Block", - "src": "16683:37:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2290, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "16698:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2268, - "id": 2291, - "nodeType": "Return", - "src": "16691:22:8" - } - ] - } - } - ] - }, - "documentation": "@notice Get the original address for a forwarded account\n@dev | This method has an `internal` view\n@dev | Will return the registered account for the given forwarded account\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}", - "id": 2298, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getForwardedAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2265, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2262, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16431:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2261, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "16431:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2264, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16450:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2263, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16450:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16430:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2268, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2267, - "name": "registeredAccount", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16490:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2266, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16490:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16489:27:8" - }, - "scope": 4622, - "src": "16402:357:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2326, - "nodeType": "Block", - "src": "17258:143:8", - "statements": [ - { - "assignments": [ - 2308 - ], - "declarations": [ - { - "constant": false, - "id": 2308, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17266:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2307, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17266:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2319, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e6b7963", - "id": 2312, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17306:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - "value": "account.kyc" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2314, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2300, - "src": "17341:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2315, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2302, - "src": "17347:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2313, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "17321:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17321:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2310, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "17289:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2311, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17289:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17289:67:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2309, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "17279:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17279:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17266:91:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2323, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2308, - "src": "17393:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2320, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2300, - "src": "17372:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2321, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "17372:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "17372:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 2324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17372:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2306, - "id": 2325, - "nodeType": "Return", - "src": "17365:31:8" - } - ] - }, - "documentation": "@notice Get KYC approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the KYC approval status for an account holder\" }", - "id": 2327, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getKYCApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2300, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17186:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2299, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "17186:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2302, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17205:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2301, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17205:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17185:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2306, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2305, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17245:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2304, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17245:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17244:13:8" - }, - "scope": 4622, - "src": "17162:239:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2355, - "nodeType": "Block", - "src": "17908:143:8", - "statements": [ - { - "assignments": [ - 2337 - ], - "declarations": [ - { - "constant": false, - "id": 2337, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2356, - "src": "17914:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2336, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17914:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2348, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e616c6c6f776564", - "id": 2341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17954:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - "value": "account.allowed" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2343, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "17993:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2331, - "src": "17999:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2342, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "17973:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17973:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2339, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "17937:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2340, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17937:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17937:71:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2338, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "17927:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17927:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17914:95:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2352, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2337, - "src": "18043:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2349, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "18022:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2350, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "18022:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "18022:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 2353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18022:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2335, - "id": 2354, - "nodeType": "Return", - "src": "18015:31:8" - } - ] - }, - "documentation": "@notice Get global approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the global approval status for an account holder\" }", - "id": 2356, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2332, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2329, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2356, - "src": "17836:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2328, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "17836:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2331, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2356, - "src": "17855:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2330, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17855:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17835:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2335, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2334, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 2356, - "src": "17895:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2333, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17895:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17894:13:8" - }, - "scope": 4622, - "src": "17810:241:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2381, - "nodeType": "Block", - "src": "18535:120:8", - "statements": [ - { - "assignments": [ - 2366 - ], - "declarations": [ - { - "constant": false, - "id": 2366, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2382, - "src": "18541:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2365, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "18541:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2374, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d657370616365", - "id": 2370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18581:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - "value": "token.namespace" - }, - { - "argumentTypes": null, - "id": 2371, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2360, - "src": "18600:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2368, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "18564:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18564:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18564:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2367, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "18554:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18554:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18541:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2378, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2366, - "src": "18647:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2375, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2358, - "src": "18623:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2376, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "18623:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5180, - "src": "18623:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18623:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2364, - "id": 2380, - "nodeType": "Return", - "src": "18616:34:8" - } - ] - }, - "documentation": "@notice Get the contract interface address associated with token symbol\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }", - "id": 2382, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenNameSpace", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2358, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2382, - "src": "18451:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2357, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "18451:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2360, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2382, - "src": "18470:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2359, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "18470:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18450:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2364, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2363, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2382, - "src": "18510:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2362, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18510:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18509:25:8" - }, - "scope": 4622, - "src": "18424:231:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2407, - "nodeType": "Block", - "src": "19153:121:8", - "statements": [ - { - "assignments": [ - 2392 - ], - "declarations": [ - { - "constant": false, - "id": 2392, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2408, - "src": "19159:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2391, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19159:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2400, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d65", - "id": 2396, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19199:12:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - "value": "token.name" - }, - { - "argumentTypes": null, - "id": 2397, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2386, - "src": "19213:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2394, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "19182:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2395, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19182:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19182:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2393, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "19172:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19172:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19159:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2404, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "19266:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2401, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "19243:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2402, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "19243:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "19243:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19243:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2390, - "id": 2406, - "nodeType": "Return", - "src": "19236:33:8" - } - ] - }, - "documentation": "@notice Get the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenName\" : \"Name of the token contract\"}", - "id": 2408, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2387, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2384, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2408, - "src": "19068:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2383, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "19068:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2386, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2408, - "src": "19087:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2385, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19087:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19067:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2390, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2389, - "name": "tokenName", - "nodeType": "VariableDeclaration", - "scope": 2408, - "src": "19135:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2388, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "19135:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19134:18:8" - }, - "scope": 4622, - "src": "19046:228:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2433, - "nodeType": "Block", - "src": "19782:123:8", - "statements": [ - { - "assignments": [ - 2418 - ], - "declarations": [ - { - "constant": false, - "id": 2418, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2434, - "src": "19788:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2417, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19788:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2426, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e73796d626f6c", - "id": 2422, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19828:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - "value": "token.symbol" - }, - { - "argumentTypes": null, - "id": 2423, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2412, - "src": "19844:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2420, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "19811:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19811:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19811:49:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2419, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "19801:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19801:60:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19788:73:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2430, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2418, - "src": "19897:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2427, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "19874:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2428, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "19874:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "19874:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19874:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2416, - "id": 2432, - "nodeType": "Return", - "src": "19867:33:8" - } - ] - }, - "documentation": "@notice Get the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenSymbol\" : \"Symbol of the token contract\"}", - "id": 2434, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenSymbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2410, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2434, - "src": "19695:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2409, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "19695:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2412, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2434, - "src": "19714:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2411, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19714:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19694:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2415, - "name": "tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 2434, - "src": "19762:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2414, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "19762:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19761:20:8" - }, - "scope": 4622, - "src": "19671:234:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2459, - "nodeType": "Block", - "src": "20426:120:8", - "statements": [ - { - "assignments": [ - 2444 - ], - "declarations": [ - { - "constant": false, - "id": 2444, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2460, - "src": "20432:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2443, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "20432:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2452, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e746c61", - "id": 2448, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20472:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - "value": "token.tla" - }, - { - "argumentTypes": null, - "id": 2449, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2438, - "src": "20485:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2446, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "20455:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2447, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20455:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20455:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2445, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "20445:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20445:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20432:70:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2456, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2444, - "src": "20538:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2453, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2436, - "src": "20515:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2454, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "20515:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2455, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "20515:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20515:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2442, - "id": 2458, - "nodeType": "Return", - "src": "20508:33:8" - } - ] - }, - "documentation": "@notice Get the token Three letter abbreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenTLA\" : \"TLA of the token contract\"}", - "id": 2460, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenTLA", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2439, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2436, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2460, - "src": "20342:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2435, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "20342:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2438, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2460, - "src": "20361:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2437, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20361:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20341:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2442, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2441, - "name": "tokenTLA", - "nodeType": "VariableDeclaration", - "scope": 2460, - "src": "20409:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2440, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "20409:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20408:17:8" - }, - "scope": 4622, - "src": "20321:225:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2485, - "nodeType": "Block", - "src": "21055:124:8", - "statements": [ - { - "assignments": [ - 2470 - ], - "declarations": [ - { - "constant": false, - "id": 2470, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "21061:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2469, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "21061:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2478, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e76657273696f6e", - "id": 2474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21101:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - "value": "token.version" - }, - { - "argumentTypes": null, - "id": 2475, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2464, - "src": "21118:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2472, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "21084:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21084:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21084:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2471, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "21074:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21074:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21061:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2482, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2470, - "src": "21171:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2479, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2462, - "src": "21148:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2480, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "21148:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "21148:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21148:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2468, - "id": 2484, - "nodeType": "Return", - "src": "21141:33:8" - } - ] - }, - "documentation": "@notice Get the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenVersion\" : \"Semantic version of the token contract\"}", - "id": 2486, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenVersion", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2465, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2462, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "20980:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2461, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "20980:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2464, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "20999:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2463, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20999:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20979:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2467, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "21047:6:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2466, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "21047:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21046:8:8" - }, - "scope": 4622, - "src": "20955:224:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2511, - "nodeType": "Block", - "src": "21690:116:8", - "statements": [ - { - "assignments": [ - 2496 - ], - "declarations": [ - { - "constant": false, - "id": 2496, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2512, - "src": "21696:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2495, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "21696:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2504, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e646563696d616c73", - "id": 2500, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21736:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - "value": "token.decimals" - }, - { - "argumentTypes": null, - "id": 2501, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2490, - "src": "21754:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2498, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "21719:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2499, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21719:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21719:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2497, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "21709:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21709:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21696:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2508, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2496, - "src": "21798:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2505, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2488, - "src": "21777:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "21777:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "21777:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21777:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2494, - "id": 2510, - "nodeType": "Return", - "src": "21770:31:8" - } - ] - }, - "documentation": "@notice Get the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"tokenDecimals\" : \"Decimals of the token contract\"}", - "id": 2512, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenDecimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2491, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2488, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2512, - "src": "21611:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2487, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "21611:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2490, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2512, - "src": "21630:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2489, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "21630:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21610:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2494, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2493, - "name": "tokenDecimals", - "nodeType": "VariableDeclaration", - "scope": 2512, - "src": "21670:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2492, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "21670:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21669:20:8" - }, - "scope": 4622, - "src": "21585:221:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2537, - "nodeType": "Block", - "src": "22295:116:8", - "statements": [ - { - "assignments": [ - 2522 - ], - "declarations": [ - { - "constant": false, - "id": 2522, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2538, - "src": "22301:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2521, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "22301:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2530, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 2526, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22341:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "id": 2527, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2516, - "src": "22352:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2524, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "22324:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22324:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22324:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2523, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "22314:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22314:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "22301:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2534, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "22403:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2531, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2514, - "src": "22382:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2532, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "22382:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "22382:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22382:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2520, - "id": 2536, - "nodeType": "Return", - "src": "22375:31:8" - } - ] - }, - "documentation": "@notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}", - "id": 2538, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeBPS", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2517, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2514, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2538, - "src": "22215:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2513, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "22215:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2516, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2538, - "src": "22234:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22234:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22214:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2520, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2519, - "name": "feeBps", - "nodeType": "VariableDeclaration", - "scope": 2538, - "src": "22282:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2518, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "22282:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22281:13:8" - }, - "scope": 4622, - "src": "22196:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2563, - "nodeType": "Block", - "src": "22890:116:8", - "statements": [ - { - "assignments": [ - 2548 - ], - "declarations": [ - { - "constant": false, - "id": 2548, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2564, - "src": "22896:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2547, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "22896:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2556, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 2552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22936:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "id": 2553, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2542, - "src": "22947:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2550, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "22919:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22919:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22919:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2549, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "22909:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22909:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "22896:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2560, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2548, - "src": "22998:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2557, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2540, - "src": "22977:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2558, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "22977:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "22977:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22977:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2546, - "id": 2562, - "nodeType": "Return", - "src": "22970:31:8" - } - ] - }, - "documentation": "@notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}", - "id": 2564, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2543, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2540, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2564, - "src": "22810:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2539, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "22810:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2542, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2564, - "src": "22829:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2541, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22829:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22809:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2546, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2545, - "name": "feeMin", - "nodeType": "VariableDeclaration", - "scope": 2564, - "src": "22877:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2544, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "22877:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22876:13:8" - }, - "scope": 4622, - "src": "22791:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2589, - "nodeType": "Block", - "src": "23485:116:8", - "statements": [ - { - "assignments": [ - 2574 - ], - "declarations": [ - { - "constant": false, - "id": 2574, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2590, - "src": "23491:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2573, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "23491:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2582, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 2578, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23531:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "id": 2579, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2568, - "src": "23542:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2576, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "23514:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23514:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23514:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2575, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "23504:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23504:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "23491:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2586, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2574, - "src": "23593:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2583, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2566, - "src": "23572:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2584, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "23572:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "23572:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23572:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2572, - "id": 2588, - "nodeType": "Return", - "src": "23565:31:8" - } - ] - }, - "documentation": "@notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}", - "id": 2590, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMax", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2569, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2566, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2590, - "src": "23405:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2565, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "23405:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2568, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2590, - "src": "23424:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2567, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23424:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23404:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2572, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2571, - "name": "feeMax", - "nodeType": "VariableDeclaration", - "scope": 2590, - "src": "23472:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2570, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "23472:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23471:13:8" - }, - "scope": 4622, - "src": "23386:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2615, - "nodeType": "Block", - "src": "24077:117:8", - "statements": [ - { - "assignments": [ - 2600 - ], - "declarations": [ - { - "constant": false, - "id": 2600, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2616, - "src": "24083:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2599, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "24083:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2608, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24123:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "id": 2605, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2594, - "src": "24135:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2602, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "24106:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2603, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24106:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24106:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2601, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "24096:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24096:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24083:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2612, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2600, - "src": "24186:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2609, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2592, - "src": "24165:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "24165:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "24165:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24165:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2598, - "id": 2614, - "nodeType": "Return", - "src": "24158:31:8" - } - ] - }, - "documentation": "@notice Get the flat fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}", - "id": 2616, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeFlat", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2592, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2616, - "src": "23996:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2591, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "23996:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2594, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2616, - "src": "24015:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2593, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24015:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23995:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2597, - "name": "feeFlat", - "nodeType": "VariableDeclaration", - "scope": 2616, - "src": "24063:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2596, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "24063:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24062:14:8" - }, - "scope": 4622, - "src": "23976:218:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2641, - "nodeType": "Block", - "src": "24682:117:8", - "statements": [ - { - "assignments": [ - 2626 - ], - "declarations": [ - { - "constant": false, - "id": 2626, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2642, - "src": "24688:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2625, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "24688:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2634, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d7367", - "id": 2630, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24728:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - "value": "fee.msg" - }, - { - "argumentTypes": null, - "id": 2631, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2620, - "src": "24739:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2628, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "24711:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2629, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24711:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24711:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2627, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "24701:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24701:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24688:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2638, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2626, - "src": "24791:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2635, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2618, - "src": "24769:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2636, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "24769:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBytes", - "nodeType": "MemberAccess", - "referencedDeclaration": 5216, - "src": "24769:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes32) view external returns (bytes memory)" - } - }, - "id": 2639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24769:25:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2624, - "id": 2640, - "nodeType": "Return", - "src": "24762:32:8" - } - ] - }, - "documentation": "@notice Get the flat message of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}", - "id": 2642, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMsg", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2621, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2618, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2642, - "src": "24601:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2617, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "24601:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2620, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2642, - "src": "24620:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24620:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24600:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2624, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2623, - "name": "feeMsg", - "nodeType": "VariableDeclaration", - "scope": 2642, - "src": "24668:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2622, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "24668:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24667:14:8" - }, - "scope": 4622, - "src": "24582:217:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2672, - "nodeType": "Block", - "src": "25356:276:8", - "statements": [ - { - "assignments": [ - 2652 - ], - "declarations": [ - { - "constant": false, - "id": 2652, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2673, - "src": "25362:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2651, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "25362:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2659, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e636f6e74726163742e6d6173746572", - "id": 2656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25402:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - }, - "value": "fee.contract.master" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2654, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "25385:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2655, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25385:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2657, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25385:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2653, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "25375:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25375:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25362:63:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2664, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2652, - "src": "25470:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2665, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2646, - "src": "25474:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2661, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2644, - "src": "25446:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2662, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "25446:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4966, - "src": "25446:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25446:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25498:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2660, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "25431:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25431:179:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2669, - "nodeType": "ExpressionStatement", - "src": "25431:179:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25623:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2650, - "id": 2671, - "nodeType": "Return", - "src": "25616:11:8" - } - ] - }, - "documentation": "@notice Set the master fee contract used as the default fee contract when none is provided\n@dev | This method has an `internal` view\n@dev | This value is set in the TokenIOAuthority contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2673, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setMasterFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2644, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2673, - "src": "25280:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2643, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "25280:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2646, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2673, - "src": "25299:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2645, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25299:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25279:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2650, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2649, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2673, - "src": "25342:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2648, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "25342:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25341:14:8" - }, - "scope": 4622, - "src": "25250:382:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2695, - "nodeType": "Block", - "src": "26025:114:8", - "statements": [ - { - "assignments": [ - 2681 - ], - "declarations": [ - { - "constant": false, - "id": 2681, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2696, - "src": "26031:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2680, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "26031:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2688, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e636f6e74726163742e6d6173746572", - "id": 2685, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26071:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - }, - "value": "fee.contract.master" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2683, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "26054:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26054:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2686, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26054:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2682, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "26044:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2687, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26044:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26031:63:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2692, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2681, - "src": "26131:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2689, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "26107:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2690, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "26107:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5180, - "src": "26107:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26107:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2679, - "id": 2694, - "nodeType": "Return", - "src": "26100:34:8" - } - ] - }, - "documentation": "@notice Get the master fee contract set via the TokenIOAuthority contract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}", - "id": 2696, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getMasterFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2676, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2675, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2696, - "src": "25956:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2674, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "25956:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25955:19:8" - }, - "payable": false, - "returnParameters": { - "id": 2679, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2678, - "name": "masterFeeContract", - "nodeType": "VariableDeclaration", - "scope": 2696, - "src": "25998:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2677, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25998:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25997:27:8" - }, - "scope": 4622, - "src": "25926:213:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2735, - "nodeType": "Block", - "src": "26838:252:8", - "statements": [ - { - "assignments": [ - 2706 - ], - "declarations": [ - { - "constant": false, - "id": 2706, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26844:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2705, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "26844:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2714, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6163636f756e74", - "id": 2710, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26884:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - "value": "fee.account" - }, - { - "argumentTypes": null, - "id": 2711, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "26899:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2708, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "26867:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26867:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26867:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2707, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "26857:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26857:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26844:72:8" - }, - { - "assignments": [ - 2716 - ], - "declarations": [ - { - "constant": false, - "id": 2716, - "name": "feeAccount", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26923:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2715, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26923:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2722, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2720, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2706, - "src": "26968:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2717, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2698, - "src": "26944:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2718, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "26944:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5180, - "src": "26944:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26944:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26923:48:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2723, - "name": "feeAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2716, - "src": "26981:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26995:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "26981:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2733, - "nodeType": "Block", - "src": "27054:32:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2731, - "name": "feeAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2716, - "src": "27069:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2704, - "id": 2732, - "nodeType": "Return", - "src": "27062:17:8" - } - ] - }, - "id": 2734, - "nodeType": "IfStatement", - "src": "26977:109:8", - "trueBody": { - "id": 2730, - "nodeType": "Block", - "src": "27000:48:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2727, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2698, - "src": "27036:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - ], - "id": 2726, - "name": "getMasterFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2696, - "src": "27015:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer) view returns (address)" - } - }, - "id": 2728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27015:26:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2704, - "id": 2729, - "nodeType": "Return", - "src": "27008:33:8" - } - ] - } - } - ] - }, - "documentation": "@notice Get the fee contract set for a contract interface\n@dev | This method has an `internal` view\n@dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n@dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}", - "id": 2736, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2701, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2698, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26750:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2697, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "26750:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2700, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26769:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2699, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26769:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26749:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2704, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2703, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26817:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2702, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26817:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26816:21:8" - }, - "scope": 4622, - "src": "26726:364:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2761, - "nodeType": "Block", - "src": "27553:114:8", - "statements": [ - { - "assignments": [ - 2746 - ], - "declarations": [ - { - "constant": false, - "id": 2746, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2762, - "src": "27559:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2745, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "27559:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2754, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 2750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27599:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 2751, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2740, - "src": "27615:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2748, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "27582:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2749, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27582:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2752, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27582:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2747, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "27572:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27572:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "27559:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2758, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2746, - "src": "27659:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2755, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2738, - "src": "27638:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2756, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "27638:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "27638:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27638:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2744, - "id": 2760, - "nodeType": "Return", - "src": "27631:31:8" - } - ] - }, - "documentation": "@notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"supply\" : \"Returns the token supply of the given currency\"}", - "id": 2762, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2738, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2762, - "src": "27481:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2737, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "27481:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2740, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2762, - "src": "27500:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2739, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "27500:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27480:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2744, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2743, - "name": "supply", - "nodeType": "VariableDeclaration", - "scope": 2762, - "src": "27540:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2742, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "27540:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27539:13:8" - }, - "scope": 4622, - "src": "27457:210:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2799, - "nodeType": "Block", - "src": "28194:189:8", - "statements": [ - { - "assignments": [ - 2776 - ], - "declarations": [ - { - "constant": false, - "id": 2776, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28200:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2775, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "28200:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2792, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 2780, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28240:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 2781, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2766, - "src": "28259:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2783, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2764, - "src": "28289:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2784, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2768, - "src": "28295:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2782, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "28269:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28269:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2787, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2764, - "src": "28325:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2788, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2770, - "src": "28331:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2786, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "28305:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28305:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2778, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "28223:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28223:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28223:117:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2777, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "28213:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28213:128:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "28200:141:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2796, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "28375:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2793, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2764, - "src": "28354:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2794, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "28354:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "28354:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28354:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2774, - "id": 2798, - "nodeType": "Return", - "src": "28347:31:8" - } - ] - }, - "documentation": "@notice Get the token spender allowance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param spender Ethereum address of spender\n@return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}", - "id": 2800, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2764, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28085:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2763, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "28085:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2766, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28104:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2765, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "28104:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2768, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28121:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2767, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28121:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2770, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28138:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2769, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28138:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28084:70:8" - }, - "payable": false, - "returnParameters": { - "id": 2774, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2773, - "name": "allowance", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28178:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2772, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "28178:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28177:16:8" - }, - "scope": 4622, - "src": "28058:325:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2831, - "nodeType": "Block", - "src": "28906:151:8", - "statements": [ - { - "assignments": [ - 2812 - ], - "declarations": [ - { - "constant": false, - "id": 2812, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28912:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "28912:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2824, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 2816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28952:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 2817, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2804, - "src": "28969:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2819, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2802, - "src": "28999:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2820, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2806, - "src": "29005:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2818, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "28979:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28979:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2814, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "28935:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28935:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28935:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2813, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "28925:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28925:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "28912:103:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2828, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2812, - "src": "29049:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2825, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2802, - "src": "29028:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2826, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "29028:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "29028:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29028:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2810, - "id": 2830, - "nodeType": "Return", - "src": "29021:31:8" - } - ] - }, - "documentation": "@notice Get the token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"balance\" : \"Return the balance of a given account for a specified currency\"}", - "id": 2832, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2802, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28816:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2801, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "28816:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2804, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28835:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2803, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "28835:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2806, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28852:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2805, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28852:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28815:53:8" - }, - "payable": false, - "returnParameters": { - "id": 2810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2809, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28892:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2808, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "28892:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28891:14:8" - }, - "scope": 4622, - "src": "28791:266:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2863, - "nodeType": "Block", - "src": "29612:150:8", - "statements": [ - { - "assignments": [ - 2844 - ], - "declarations": [ - { - "constant": false, - "id": 2844, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29618:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2843, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "29618:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2856, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e66726f7a656e", - "id": 2848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "29658:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - "value": "token.frozen" - }, - { - "argumentTypes": null, - "id": 2849, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2836, - "src": "29674:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2851, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "29704:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2852, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2838, - "src": "29710:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2850, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "29684:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29684:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2846, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "29641:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "29641:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29641:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2845, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "29631:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29631:89:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "29618:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2860, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2844, - "src": "29754:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2857, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "29733:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2858, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "29733:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "29733:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29733:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2842, - "id": 2862, - "nodeType": "Return", - "src": "29726:31:8" - } - ] - }, - "documentation": "@notice Get the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}", - "id": 2864, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenFrozenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2839, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2834, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29516:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2833, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "29516:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2836, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29535:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2835, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "29535:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2838, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29552:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "29552:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "29515:53:8" - }, - "payable": false, - "returnParameters": { - "id": 2842, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2841, - "name": "frozenBalance", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29592:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2840, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "29592:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "29591:20:8" - }, - "scope": 4622, - "src": "29485:277:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2903, - "nodeType": "Block", - "src": "30358:303:8", - "statements": [ - { - "assignments": [ - 2878 - ], - "declarations": [ - { - "constant": false, - "id": 2878, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30364:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2877, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "30364:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2890, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e66726f7a656e", - "id": 2882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30404:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - "value": "token.frozen" - }, - { - "argumentTypes": null, - "id": 2883, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2868, - "src": "30420:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2885, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2866, - "src": "30450:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2886, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "30456:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2884, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "30430:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30430:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2880, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "30387:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "30387:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30387:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2879, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "30377:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30377:89:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "30364:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2895, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2878, - "src": "30508:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2896, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2872, - "src": "30512:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2892, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2866, - "src": "30487:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2893, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "30487:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "30487:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 2897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30487:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30527:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2891, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "30472:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30472:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2900, - "nodeType": "ExpressionStatement", - "src": "30472:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30652:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2876, - "id": 2902, - "nodeType": "Return", - "src": "30645:11:8" - } - ] - }, - "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Amount of tokens to freeze for account\n@return { \"success\" : \"Return true if successfully called from another contract\"}", - "id": 2904, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenFrozenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2873, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2866, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30260:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2865, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "30260:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2868, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30279:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2867, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "30279:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2870, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30296:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2869, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "30296:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2872, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30313:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2871, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "30313:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "30259:66:8" - }, - "payable": false, - "returnParameters": { - "id": 2876, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2875, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30344:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2874, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "30344:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "30343:14:8" - }, - "scope": 4622, - "src": "30229:432:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3003, - "nodeType": "Block", - "src": "31192:598:8", - "statements": [ - { - "assignments": [ - 2916 - ], - "declarations": [ - { - "constant": false, - "id": 2916, - "name": "maxFee", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31199:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2915, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31199:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2928, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 2923, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31261:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "id": 2924, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2908, - "src": "31272:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2921, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "31244:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31244:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31244:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2920, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "31234:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31234:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2917, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "31213:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2918, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "31213:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "31213:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31213:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31199:91:8" - }, - { - "assignments": [ - 2930 - ], - "declarations": [ - { - "constant": false, - "id": 2930, - "name": "minFee", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31296:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2929, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31296:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2942, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 2937, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31358:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "id": 2938, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2908, - "src": "31369:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2935, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "31341:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2936, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31341:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31341:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2934, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "31331:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31331:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2931, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "31310:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2932, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "31310:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "31310:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31310:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31296:91:8" - }, - { - "assignments": [ - 2944 - ], - "declarations": [ - { - "constant": false, - "id": 2944, - "name": "bpsFee", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31393:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2943, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31393:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2956, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 2951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31455:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "id": 2952, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2908, - "src": "31466:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2949, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "31438:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31438:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31438:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2948, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "31428:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31428:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2945, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "31407:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2946, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "31407:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "31407:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31407:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31393:91:8" - }, - { - "assignments": [ - 2958 - ], - "declarations": [ - { - "constant": false, - "id": 2958, - "name": "flatFee", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31490:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2957, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31490:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2970, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31553:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "id": 2966, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2908, - "src": "31565:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2963, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "31536:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31536:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31536:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2962, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "31526:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31526:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2959, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "31505:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2960, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "31505:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "31505:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31505:78:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31490:93:8" - }, - { - "assignments": [ - 2972 - ], - "declarations": [ - { - "constant": false, - "id": 2972, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31589:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2971, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31589:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2985, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2983, - "name": "flatFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2958, - "src": "31639:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3130303030", - "id": 2979, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31627:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - }, - "value": "10000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2975, - "name": "bpsFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2944, - "src": "31614:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2973, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2910, - "src": "31603:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "31603:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31603:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2977, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31602:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "31602:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31602:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2981, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31601:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "31601:37:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31601:46:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31589:58:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2986, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "31658:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2987, - "name": "maxFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2916, - "src": "31665:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31658:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2992, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "31711:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 2993, - "name": "minFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "31718:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31711:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3000, - "nodeType": "Block", - "src": "31760:26:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2998, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "31775:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2914, - "id": 2999, - "nodeType": "Return", - "src": "31768:11:8" - } - ] - }, - "id": 3001, - "nodeType": "IfStatement", - "src": "31707:79:8", - "trueBody": { - "id": 2997, - "nodeType": "Block", - "src": "31726:28:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2995, - "name": "minFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "31741:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2914, - "id": 2996, - "nodeType": "Return", - "src": "31734:13:8" - } - ] - } - }, - "id": 3002, - "nodeType": "IfStatement", - "src": "31654:132:8", - "trueBody": { - "id": 2991, - "nodeType": "Block", - "src": "31673:28:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2989, - "name": "maxFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2916, - "src": "31688:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2914, - "id": 2990, - "nodeType": "Return", - "src": "31681:13:8" - } - ] - } - } - ] - }, - "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the fee contract\n@param amount Transaction value\n@return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }", - "id": 3004, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "calculateFees", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2906, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31091:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2905, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "31091:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2908, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31110:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2907, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "31110:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2910, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31135:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2909, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31135:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "31090:57:8" - }, - "payable": false, - "returnParameters": { - "id": 2914, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2913, - "name": "calculatedFees", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31171:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2912, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31171:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "31170:21:8" - }, - "scope": 4622, - "src": "31068:722:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3033, - "nodeType": "Block", - "src": "32390:334:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3017, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3006, - "src": "32425:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3018, - "name": "accountA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3008, - "src": "32431:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3016, - "name": "verifyAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3062, - "src": "32411:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32411:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", - "id": 3020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32448:92:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - }, - "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - } - ], - "id": 3015, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "32396:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32396:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3022, - "nodeType": "ExpressionStatement", - "src": "32396:150:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3025, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3006, - "src": "32581:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3026, - "name": "accountB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3010, - "src": "32587:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3024, - "name": "verifyAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3062, - "src": "32567:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32567:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", - "id": 3028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32604:92:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - }, - "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - } - ], - "id": 3023, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "32552:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32552:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3030, - "nodeType": "ExpressionStatement", - "src": "32552:150:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3031, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32715:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3014, - "id": 3032, - "nodeType": "Return", - "src": "32708:11:8" - } - ] - }, - "documentation": "@notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param accountA Ethereum address of first account holder to verify\n@param accountB Ethereum address of second account holder to verify\n@return { \"verified\" : \"Returns true if both accounts are successfully verified\" }", - "id": 3034, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyAccounts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3006, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3034, - "src": "32297:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3005, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "32297:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3008, - "name": "accountA", - "nodeType": "VariableDeclaration", - "scope": 3034, - "src": "32316:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "32316:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3010, - "name": "accountB", - "nodeType": "VariableDeclaration", - "scope": 3034, - "src": "32334:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3009, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "32334:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32296:55:8" - }, - "payable": false, - "returnParameters": { - "id": 3014, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3013, - "name": "verified", - "nodeType": "VariableDeclaration", - "scope": 3034, - "src": "32375:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3012, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "32375:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32374:15:8" - }, - "scope": 4622, - "src": "32273:451:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3061, - "nodeType": "Block", - "src": "33214:262:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3045, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3036, - "src": "33250:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3046, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "33256:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3044, - "name": "getKYCApproval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2327, - "src": "33235:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33235:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e7420646f6573206e6f742068617665204b594320617070726f76616c2e", - "id": 3048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33272:44:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", - "typeString": "literal_string \"Error: Account does not have KYC approval.\"" - }, - "value": "Error: Account does not have KYC approval." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", - "typeString": "literal_string \"Error: Account does not have KYC approval.\"" - } - ], - "id": 3043, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "33220:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33220:102:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3050, - "nodeType": "ExpressionStatement", - "src": "33220:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3053, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3036, - "src": "33360:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3054, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "33366:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3052, - "name": "getAccountStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2356, - "src": "33343:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33343:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e7420737461747573206973206066616c7365602e204163636f756e7420737461747573206d757374206265206074727565602e", - "id": 3056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33382:66:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", - "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" - }, - "value": "Error: Account status is `false`. Account status must be `true`." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", - "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" - } - ], - "id": 3051, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "33328:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33328:126:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3058, - "nodeType": "ExpressionStatement", - "src": "33328:126:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33467:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3042, - "id": 3060, - "nodeType": "Return", - "src": "33460:11:8" - } - ] - }, - "documentation": "@notice Verified KYC and global status for a single account and return true or throw if account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder to verify\n@return { \"verified\" : \"Returns true if account is successfully verified\" }", - "id": 3062, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3039, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3036, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3062, - "src": "33140:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3035, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "33140:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3038, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3062, - "src": "33159:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3037, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "33159:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33139:36:8" - }, - "payable": false, - "returnParameters": { - "id": 3042, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3041, - "name": "verified", - "nodeType": "VariableDeclaration", - "scope": 3062, - "src": "33199:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3040, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "33199:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33198:15:8" - }, - "scope": 4622, - "src": "33117:359:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3155, - "nodeType": "Block", - "src": "34346:799:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3079, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3068, - "src": "34368:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "34360:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34360:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34375:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "34360:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f6020616464726573732063616e6e6f74206265206e756c6c2e", - "id": 3083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34380:37:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", - "typeString": "literal_string \"Error: `to` address cannot be null.\"" - }, - "value": "Error: `to` address cannot be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", - "typeString": "literal_string \"Error: `to` address cannot be null.\"" - } - ], - "id": 3077, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34352:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34352:67:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3085, - "nodeType": "ExpressionStatement", - "src": "34352:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3087, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "34433:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34442:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "34433:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060616d6f756e7460206d7573742062652067726561746572207468616e207a65726f", - "id": 3090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34445:43:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", - "typeString": "literal_string \"Error: `amount` must be greater than zero\"" - }, - "value": "Error: `amount` must be greater than zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", - "typeString": "literal_string \"Error: `amount` must be greater than zero\"" - } - ], - "id": 3086, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34425:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34425:64:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3092, - "nodeType": "ExpressionStatement", - "src": "34425:64:8" - }, - { - "assignments": [ - 3094 - ], - "declarations": [ - { - "constant": false, - "id": 3094, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34496:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3093, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "34496:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3101, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3096, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34533:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3098, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "34547:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 3097, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "34539:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34539:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3095, - "name": "getFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2736, - "src": "34518:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34518:35:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34496:57:8" - }, - { - "assignments": [ - 3103 - ], - "declarations": [ - { - "constant": false, - "id": 3103, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34559:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3102, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "34559:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3109, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3105, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34585:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3106, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3094, - "src": "34591:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3107, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "34604:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3104, - "name": "calculateFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "34571:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" - } - }, - "id": 3108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34571:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34559:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3112, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34658:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3113, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "34664:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34664:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3116, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34691:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3117, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3066, - "src": "34697:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3118, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "34707:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3115, - "name": "getFxUSDAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4621, - "src": "34676:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" - } - }, - "id": 3119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34676:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3111, - "name": "setAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4400, - "src": "34633:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 3120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34633:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d6f756e7420666f72206163636f756e742e", - "id": 3121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34723:51:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", - "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" - }, - "value": "Error: Unable to set spending amount for account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", - "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" - } - ], - "id": 3110, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34618:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34618:157:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3123, - "nodeType": "ExpressionStatement", - "src": "34618:157:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3126, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34811:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3127, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3066, - "src": "34817:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3128, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "34827:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34827:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3130, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3068, - "src": "34839:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3131, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "34843:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3132, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3072, - "src": "34851:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3125, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "34797:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34797:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 3134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34864:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 3124, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34782:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34782:128:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3136, - "nodeType": "ExpressionStatement", - "src": "34782:128:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3139, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34988:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3140, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3066, - "src": "34994:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3141, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "35004:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "35004:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3143, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3094, - "src": "35016:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3144, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3103, - "src": "35029:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3146, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "35045:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3147, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3094, - "src": "35051:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3145, - "name": "getFeeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2642, - "src": "35035:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" - } - }, - "id": 3148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "35035:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3138, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "34974:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34974:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", - "id": 3150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "35072:49:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - }, - "value": "Error: Unable to transfer fees to fee contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - } - ], - "id": 3137, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34959:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34959:163:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3152, - "nodeType": "ExpressionStatement", - "src": "34959:163:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "35136:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3076, - "id": 3154, - "nodeType": "Return", - "src": "35129:11:8" - } - ] - }, - "documentation": "@notice Transfer an amount of currency token from msg.sender account to another specified account\n@dev This function is called by an interface that is accessible directly to the account holder\n@dev | This method has an `internal` view\n@dev | This method uses `forceTransfer()` low-level api\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3156, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3073, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3064, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34241:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3063, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "34241:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3066, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34260:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3065, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "34260:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3068, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34277:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3067, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "34277:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3070, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34289:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3069, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "34289:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3072, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34302:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3071, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "34302:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "34240:73:8" - }, - "payable": false, - "returnParameters": { - "id": 3076, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3075, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34332:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3074, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "34332:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "34331:14:8" - }, - "scope": 4622, - "src": "34223:922:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3251, - "nodeType": "Block", - "src": "36402:1060:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3175, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3164, - "src": "36431:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3174, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "36423:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36423:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36438:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "36423:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", - "id": 3179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36449:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - }, - "value": "Error: `to` address must not be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - } - ], - "id": 3173, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "36408:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36408:86:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3181, - "nodeType": "ExpressionStatement", - "src": "36408:86:8" - }, - { - "assignments": [ - 3183 - ], - "declarations": [ - { - "constant": false, - "id": 3183, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36501:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3182, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36501:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3190, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3185, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36538:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3187, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "36552:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 3186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "36544:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36544:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3184, - "name": "getFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2736, - "src": "36523:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36523:35:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "36501:57:8" - }, - { - "assignments": [ - 3192 - ], - "declarations": [ - { - "constant": false, - "id": 3192, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36564:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3191, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "36564:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3198, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3194, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36590:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3195, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "36596:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3166, - "src": "36609:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3193, - "name": "calculateFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "36576:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" - } - }, - "id": 3197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36576:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "36564:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3201, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36756:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3202, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3162, - "src": "36762:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3204, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36783:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3205, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3160, - "src": "36789:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3206, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3166, - "src": "36799:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3203, - "name": "getFxUSDAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4621, - "src": "36768:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" - } - }, - "id": 3207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36768:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3200, - "name": "setAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4400, - "src": "36731:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 3208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36731:76:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", - "id": 3209, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36815:47:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", - "typeString": "literal_string \"Error: Unable to set account spending amount.\"" - }, - "value": "Error: Unable to set account spending amount." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", - "typeString": "literal_string \"Error: Unable to set account spending amount.\"" - } - ], - "id": 3199, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "36716:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36716:152:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3211, - "nodeType": "ExpressionStatement", - "src": "36716:152:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3214, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36948:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3215, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3160, - "src": "36954:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3216, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3162, - "src": "36964:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3217, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3164, - "src": "36970:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3218, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3166, - "src": "36974:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3219, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3168, - "src": "36982:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3213, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "36934:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36934:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 3221, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36995:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 3212, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "36919:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36919:127:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3223, - "nodeType": "ExpressionStatement", - "src": "36919:127:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3226, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "37124:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3227, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3160, - "src": "37130:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3228, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3162, - "src": "37140:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3229, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "37146:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3230, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3192, - "src": "37159:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3232, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "37175:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3233, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "37181:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3231, - "name": "getFeeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2642, - "src": "37165:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" - } - }, - "id": 3234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37165:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3225, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "37110:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37110:84:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", - "id": 3236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37202:49:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - }, - "value": "Error: Unable to transfer fees to fee contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - } - ], - "id": 3224, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "37095:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37095:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3238, - "nodeType": "ExpressionStatement", - "src": "37095:162:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3241, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "37348:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3242, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3160, - "src": "37354:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3243, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3162, - "src": "37364:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3244, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3166, - "src": "37370:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3240, - "name": "updateAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3403, - "src": "37332:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256) returns (bool)" - } - }, - "id": 3245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37332:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e636520666f72207370656e6465722e", - "id": 3246, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37385:48:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", - "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" - }, - "value": "Error: Unable to update allowance for spender." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", - "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" - } - ], - "id": 3239, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "37317:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37317:122:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3248, - "nodeType": "ExpressionStatement", - "src": "37317:122:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3249, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37453:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3172, - "id": 3250, - "nodeType": "Return", - "src": "37446:11:8" - } - ] - }, - "documentation": "@notice Transfer an amount of currency token from account to another specified account via an approved spender account\n@dev This function is called by an interface that is accessible directly to the account spender\n@dev | This method has an `internal` view\n@dev | Transactions will fail if the spending amount exceeds the daily limit\n@dev | This method uses `forceTransfer()` low-level api\n@dev | This method implements ERC20 transferFrom() method with approved spender behavior\n@dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3252, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3169, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3158, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36283:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3157, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "36283:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3160, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36302:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3159, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "36302:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3162, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36319:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3161, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36319:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3164, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36333:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3163, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36333:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3166, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36345:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3165, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "36345:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3168, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36358:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3167, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "36358:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "36282:87:8" - }, - "payable": false, - "returnParameters": { - "id": 3172, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3171, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36388:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3170, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "36388:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "36387:14:8" - }, - "scope": 4622, - "src": "36261:1201:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3350, - "nodeType": "Block", - "src": "38351:801:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3271, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "38380:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "38372:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38372:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38387:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "38372:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", - "id": 3275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38398:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - }, - "value": "Error: `to` address must not be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - } - ], - "id": 3269, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "38357:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38357:86:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3277, - "nodeType": "ExpressionStatement", - "src": "38357:86:8" - }, - { - "assignments": [ - 3279 - ], - "declarations": [ - { - "constant": false, - "id": 3279, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38450:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3278, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "38450:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3291, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38492:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3284, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3256, - "src": "38509:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3286, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38539:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3287, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3258, - "src": "38545:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3285, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "38519:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38519:31:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3281, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "38475:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3282, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "38475:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38475:76:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3280, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "38465:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38465:87:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "38450:102:8" - }, - { - "assignments": [ - 3293 - ], - "declarations": [ - { - "constant": false, - "id": 3293, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38558:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3292, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "38558:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3305, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3297, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38600:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3298, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3256, - "src": "38617:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3300, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38647:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3301, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "38653:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3299, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "38627:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38627:29:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3295, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "38583:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "38583:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38583:74:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3294, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "38573:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38573:85:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "38558:100:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3310, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3279, - "src": "38701:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3317, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3262, - "src": "38738:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3314, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3279, - "src": "38728:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3311, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38707:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3312, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "38707:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "38707:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38707:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "38707:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38707:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3307, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38680:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3308, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "38680:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "38680:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38680:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38754:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3306, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "38665:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38665:202:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3322, - "nodeType": "ExpressionStatement", - "src": "38665:202:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3327, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3293, - "src": "38909:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3334, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3262, - "src": "38946:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3331, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3293, - "src": "38936:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3328, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38915:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3329, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "38915:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "38915:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38915:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "38915:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38915:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3324, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38888:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3325, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "38888:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "38888:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38888:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38962:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3323, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "38873:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38873:202:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3339, - "nodeType": "ExpressionStatement", - "src": "38873:202:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3341, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3256, - "src": "39096:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3342, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3258, - "src": "39106:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3343, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "39112:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3344, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3262, - "src": "39116:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3345, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3264, - "src": "39124:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3340, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1686, - "src": "39087:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,address,uint256,bytes memory)" - } - }, - "id": 3346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39087:42:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3347, - "nodeType": "EmitStatement", - "src": "39082:47:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "39143:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3268, - "id": 3349, - "nodeType": "Return", - "src": "39136:11:8" - } - ] - }, - "documentation": "@notice Low-level transfer method\n@dev | This method has an `internal` view\n@dev | This method does not include fees or approved allowances.\n@dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3351, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "forceTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3265, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3254, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38232:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3253, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "38232:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3256, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38251:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3255, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "38251:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3258, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38268:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3257, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "38268:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3260, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38282:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3259, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "38282:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3262, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38294:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3261, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "38294:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3264, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38307:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3263, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "38307:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "38231:87:8" - }, - "payable": false, - "returnParameters": { - "id": 3268, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3267, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38337:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3266, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "38337:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "38336:14:8" - }, - "scope": 4622, - "src": "38209:943:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3402, - "nodeType": "Block", - "src": "39829:376:8", - "statements": [ - { - "assignments": [ - 3365 - ], - "declarations": [ - { - "constant": false, - "id": 3365, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39835:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3364, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "39835:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3382, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 3369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "39875:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 3370, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3355, - "src": "39894:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3372, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "39924:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3373, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3357, - "src": "39930:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3371, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "39904:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39904:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3376, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "39960:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3377, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "39966:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "39966:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3375, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "39940:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39940:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3367, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "39858:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "39858:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39858:120:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3366, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "39848:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39848:131:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "39835:144:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3387, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3365, - "src": "40021:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3394, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3359, - "src": "40054:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3391, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3365, - "src": "40046:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3388, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "40025:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3389, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "40025:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "40025:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40025:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "40025:28:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40025:36:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3384, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "40000:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3385, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "40000:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "40000:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40000:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3397, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40070:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3383, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "39985:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39985:198:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3399, - "nodeType": "ExpressionStatement", - "src": "39985:198:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40196:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3363, - "id": 3401, - "nodeType": "Return", - "src": "40189:11:8" - } - ] - }, - "documentation": "@notice Low-level method to update spender allowance for account\n@dev | This method is called inside the `transferFrom()` method\n@dev | msg.sender == spender address\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Value to reduce allowance by (i.e. the amount spent)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3403, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "updateAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3360, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3353, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39731:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3352, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "39731:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3355, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39750:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3354, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "39750:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3357, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39767:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3356, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "39767:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3359, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39784:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3358, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "39784:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "39730:66:8" - }, - "payable": false, - "returnParameters": { - "id": 3363, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3362, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39815:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3361, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "39815:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "39814:14:8" - }, - "scope": 4622, - "src": "39706:499:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3523, - "nodeType": "Block", - "src": "40769:1110:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3415, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3407, - "src": "40783:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3416, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40794:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "40783:14:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20607370656e6465726020616464726573732063616e6e6f74206265206e756c6c2e", - "id": 3418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40807:42:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", - "typeString": "literal_string \"Error: `spender` address cannot be null.\"" - }, - "value": "Error: `spender` address cannot be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", - "typeString": "literal_string \"Error: `spender` address cannot be null.\"" - } - ], - "id": 3414, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "40775:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40775:75:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3420, - "nodeType": "ExpressionStatement", - "src": "40775:75:8" - }, - { - "assignments": [ - 3422 - ], - "declarations": [ - { - "constant": false, - "id": 3422, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40857:22:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3421, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "40857:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3429, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3424, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "40897:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3426, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "40911:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 3425, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "40903:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40903:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3423, - "name": "getTokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2434, - "src": "40882:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" - } - }, - "id": 3428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40882:35:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "40857:60:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3432, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "40961:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3433, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3422, - "src": "40967:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3435, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "40997:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3436, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3407, - "src": "41003:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3434, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "40977:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40977:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3431, - "name": "getTokenFrozenBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2864, - "src": "40939:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" - } - }, - "id": 3438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40939:73:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41016:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "40939:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205370656e646572206d757374206e6f74206861766520612066726f7a656e2062616c616e6365206469726563746c79", - "id": 3441, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41025:56:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", - "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" - }, - "value": "Error: Spender must not have a frozen balance directly" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", - "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" - } - ], - "id": 3430, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "40924:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40924:158:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3443, - "nodeType": "ExpressionStatement", - "src": "40924:158:8" - }, - { - "assignments": [ - 3445 - ], - "declarations": [ - { - "constant": false, - "id": 3445, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "41089:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3444, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "41089:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3462, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 3449, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41131:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 3450, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3422, - "src": "41150:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3452, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41180:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3453, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "41186:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41186:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3451, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "41160:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3455, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41160:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3457, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41219:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3458, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3407, - "src": "41225:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3456, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "41199:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41199:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3447, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "41114:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3448, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41114:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41114:120:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3446, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "41104:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41104:131:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "41089:146:8" - }, - { - "assignments": [ - 3464 - ], - "declarations": [ - { - "constant": false, - "id": 3464, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "41241:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3463, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "41241:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3477, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3468, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41283:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3469, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3422, - "src": "41300:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3471, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41330:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3472, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "41336:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41336:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3470, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "41310:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41310:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3466, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "41266:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41266:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41266:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3465, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "41256:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41256:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "41241:108:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3482, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3445, - "src": "41392:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3479, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41371:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3480, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "41371:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "41371:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41371:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41401:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "41371:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3486, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3409, - "src": "41406:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41416:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "41406:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "41371:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283029206265666f72652073657474696e6720616e207570646174656420616c6c6f77616e636520666f72207370656e6465722e", - "id": 3490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41425:84:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", - "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" - }, - "value": "Error: Allowance must be zero (0) before setting an updated allowance for spender." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", - "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" - } - ], - "id": 3478, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "41356:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41356:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3492, - "nodeType": "ExpressionStatement", - "src": "41356:154:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3497, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3464, - "src": "41553:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3494, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41532:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "41532:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "41532:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41532:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3499, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3409, - "src": "41562:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "41532:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d73672e73656e64657220746f6b656e2062616c616e63652e", - "id": 3501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41576:58:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", - "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" - }, - "value": "Error: Allowance cannot exceed msg.sender token balance." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", - "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" - } - ], - "id": 3493, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "41517:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41517:118:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3503, - "nodeType": "ExpressionStatement", - "src": "41517:118:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3508, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3445, - "src": "41678:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3509, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3409, - "src": "41684:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3505, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41657:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "41657:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "41657:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41657:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3511, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41699:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3504, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "41642:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41642:165:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3513, - "nodeType": "ExpressionStatement", - "src": "41642:165:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3515, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "41828:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41828:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3517, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3407, - "src": "41840:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3518, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3409, - "src": "41849:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3514, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1654, - "src": "41819:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41819:37:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3520, - "nodeType": "EmitStatement", - "src": "41814:42:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41870:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3413, - "id": 3522, - "nodeType": "Return", - "src": "41863:11:8" - } - ] - }, - "documentation": "@notice Low-level method to set the allowance for a spender\n@dev | This method is called inside the `approve()` ERC20 method\n@dev | msg.sender == account holder\n@param self Internal storage proxying TokenIOStorage contract\n@param spender Ethereum address of account spender\n@param amount Value to set for spender allowance\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3524, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approveAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3405, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40688:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3404, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "40688:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3407, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40707:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3406, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "40707:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3409, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40724:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3408, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "40724:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "40687:49:8" - }, - "payable": false, - "returnParameters": { - "id": 3413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3412, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40755:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3411, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "40755:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "40754:14:8" - }, - "scope": 4622, - "src": "40662:1217:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3634, - "nodeType": "Block", - "src": "42706:943:8", - "statements": [ - { - "assignments": [ - 3540 - ], - "declarations": [ - { - "constant": false, - "id": 3540, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42712:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3539, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3552, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3544, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42754:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3545, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3528, - "src": "42771:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3547, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "42801:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3548, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3530, - "src": "42807:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3546, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "42781:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42781:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3542, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "42737:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42737:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42737:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3541, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "42727:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42727:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42712:105:8" - }, - { - "assignments": [ - 3554 - ], - "declarations": [ - { - "constant": false, - "id": 3554, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42823:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3553, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42823:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3563, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e697373756564", - "id": 3558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42865:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - "value": "token.issued" - }, - { - "argumentTypes": null, - "id": 3559, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3528, - "src": "42881:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3560, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3534, - "src": "42891:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3556, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "42848:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3557, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42848:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42848:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3555, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "42838:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42838:65:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42823:80:8" - }, - { - "assignments": [ - 3565 - ], - "declarations": [ - { - "constant": false, - "id": 3565, - "name": "id_c", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42909:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3564, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42909:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3573, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 3569, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42951:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 3570, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3528, - "src": "42967:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3567, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "42934:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3568, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42934:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42934:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3566, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "42924:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42924:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42909:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3578, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3540, - "src": "43014:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3585, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "43051:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3582, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3540, - "src": "43041:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3579, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43020:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3580, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43020:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "43020:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43020:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43020:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43020:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3575, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "42993:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3576, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "42993:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "42993:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42993:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43067:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "42985:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42985:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3590, - "nodeType": "ExpressionStatement", - "src": "42985:190:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3595, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3554, - "src": "43210:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3602, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "43247:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3599, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3554, - "src": "43237:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3596, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43216:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3597, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43216:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "43216:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43216:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43216:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43216:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3592, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43189:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3593, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43189:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "43189:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43189:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43263:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3591, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "43181:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43181:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3607, - "nodeType": "ExpressionStatement", - "src": "43181:190:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3612, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "43406:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3619, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "43443:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3616, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "43433:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3613, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43412:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3614, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43412:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "43412:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43412:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43412:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43412:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3609, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43385:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43385:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "43385:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43385:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3622, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43459:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3608, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "43377:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43377:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3624, - "nodeType": "ExpressionStatement", - "src": "43377:190:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3626, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3528, - "src": "43587:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3627, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3530, - "src": "43597:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3628, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "43606:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3629, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3534, - "src": "43614:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3625, - "name": "Deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1664, - "src": "43579:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,uint256,string memory)" - } - }, - "id": 3630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43579:46:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3631, - "nodeType": "EmitStatement", - "src": "43574:51:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3632, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43639:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3538, - "id": 3633, - "nodeType": "Return", - "src": "43632:11:8" - } - ] - }, - "documentation": "@notice Deposit an amount of currency into the Ethereum account holder\n@dev | The total supply of the token increases only when new funds are deposited 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to deposit for account\n@param issuerFirm Name of the issuing firm authorizing the deposit\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3635, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3535, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3526, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42589:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3525, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "42589:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3528, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42608:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3527, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "42608:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3530, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42625:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3529, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "42625:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3532, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42642:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3531, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "42642:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3534, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42655:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3533, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "42655:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "42588:85:8" - }, - "payable": false, - "returnParameters": { - "id": 3538, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3537, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42692:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3536, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "42692:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "42691:14:8" - }, - "scope": 4622, - "src": "42572:1077:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3745, - "nodeType": "Block", - "src": "44480:1002:8", - "statements": [ - { - "assignments": [ - 3651 - ], - "declarations": [ - { - "constant": false, - "id": 3651, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44486:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3650, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44486:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3663, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3655, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44528:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3656, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3639, - "src": "44545:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3658, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "44575:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3659, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3641, - "src": "44581:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3657, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "44555:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44555:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3653, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "44511:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3654, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44511:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44511:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3652, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "44501:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44501:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44486:105:8" - }, - { - "assignments": [ - 3665 - ], - "declarations": [ - { - "constant": false, - "id": 3665, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44597:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3664, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44597:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3674, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e697373756564", - "id": 3669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44639:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - "value": "token.issued" - }, - { - "argumentTypes": null, - "id": 3670, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3639, - "src": "44655:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3671, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3645, - "src": "44665:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3667, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "44622:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44622:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44622:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3666, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "44612:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44612:65:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44597:80:8" - }, - { - "assignments": [ - 3676 - ], - "declarations": [ - { - "constant": false, - "id": 3676, - "name": "id_c", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44721:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3675, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44721:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3684, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 3680, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44763:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 3681, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3639, - "src": "44779:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3678, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "44746:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44746:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44746:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3677, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "44736:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44736:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44721:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3689, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3651, - "src": "44832:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3696, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3643, - "src": "44869:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3693, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3651, - "src": "44859:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3690, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "44838:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3691, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "44838:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "44838:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44838:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "44838:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44838:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3686, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "44811:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3687, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "44811:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "44811:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44811:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44885:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3685, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "44796:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44796:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3701, - "nodeType": "ExpressionStatement", - "src": "44796:197:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3706, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3665, - "src": "45035:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3713, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3643, - "src": "45072:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3710, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3665, - "src": "45062:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3707, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "45041:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3708, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "45041:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3709, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "45041:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45041:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "45041:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45041:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3703, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "45014:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3704, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "45014:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "45014:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45014:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3716, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45088:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3702, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "44999:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44999:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3718, - "nodeType": "ExpressionStatement", - "src": "44999:197:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3723, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3676, - "src": "45238:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3730, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3643, - "src": "45275:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3727, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3676, - "src": "45265:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3724, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "45244:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "45244:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "45244:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45244:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "45244:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45244:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3720, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "45217:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3721, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "45217:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "45217:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45217:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45291:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3719, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "45202:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45202:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3735, - "nodeType": "ExpressionStatement", - "src": "45202:197:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3737, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3639, - "src": "45420:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3738, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3641, - "src": "45430:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3739, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3643, - "src": "45439:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3740, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3645, - "src": "45447:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3736, - "name": "Withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1674, - "src": "45411:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,uint256,string memory)" - } - }, - "id": 3741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45411:47:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3742, - "nodeType": "EmitStatement", - "src": "45406:52:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45472:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3649, - "id": 3744, - "nodeType": "Return", - "src": "45465:11:8" - } - ] - }, - "documentation": "@notice Withdraw an amount of currency from the Ethereum account holder\n@dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to withdraw for account\n@param issuerFirm Name of the issuing firm authorizing the withdraw\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3746, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3646, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3637, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44363:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3636, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "44363:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3639, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44382:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3638, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "44382:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3641, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44399:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3640, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "44399:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3643, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44416:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3642, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "44416:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3645, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44429:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3644, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "44429:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "44362:85:8" - }, - "payable": false, - "returnParameters": { - "id": 3649, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3648, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44466:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3647, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "44466:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "44465:14:8" - }, - "scope": 4622, - "src": "44345:1137:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3779, - "nodeType": "Block", - "src": "46215:275:8", - "statements": [ - { - "assignments": [ - 3758 - ], - "declarations": [ - { - "constant": false, - "id": 3758, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46221:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3757, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "46221:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3766, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e6669726d", - "id": 3762, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46261:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - "value": "registered.firm" - }, - { - "argumentTypes": null, - "id": 3763, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3750, - "src": "46280:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3760, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "46244:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3761, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "46244:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46244:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3759, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "46234:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46234:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "46221:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3771, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3758, - "src": "46334:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3772, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3752, - "src": "46338:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3768, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3748, - "src": "46313:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3769, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "46313:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "46313:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 3773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46313:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3774, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46355:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3767, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "46298:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46298:170:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3776, - "nodeType": "ExpressionStatement", - "src": "46298:170:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46481:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3756, - "id": 3778, - "nodeType": "Return", - "src": "46474:11:8" - } - ] - }, - "documentation": "@notice Method for setting a registered issuer firm\n@dev | Only Token, Inc. and other authorized institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered\n@param approved Approval status to set for the firm (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3780, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setRegisteredFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3753, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3748, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46130:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3747, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "46130:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3750, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46149:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3749, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "46149:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3752, - "name": "approved", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46168:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3751, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "46168:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "46129:53:8" - }, - "payable": false, - "returnParameters": { - "id": 3756, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3755, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46201:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3754, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "46201:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "46200:14:8" - }, - "scope": 4622, - "src": "46103:387:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3844, - "nodeType": "Block", - "src": "47323:679:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3795, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3782, - "src": "47361:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3796, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3784, - "src": "47367:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3794, - "name": "isRegisteredFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3900, - "src": "47344:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" - } - }, - "id": 3797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47344:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20606973737565724669726d60206d75737420626520726567697374657265642e", - "id": 3798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47386:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", - "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" - }, - "value": "Error: `issuerFirm` must be registered." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", - "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" - } - ], - "id": 3793, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "47329:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47329:99:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3800, - "nodeType": "ExpressionStatement", - "src": "47329:99:8" - }, - { - "assignments": [ - 3802 - ], - "declarations": [ - { - "constant": false, - "id": 3802, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47435:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3801, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "47435:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3811, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3806, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47477:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "id": 3807, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3784, - "src": "47501:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3808, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3786, - "src": "47513:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3804, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "47460:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3805, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "47460:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47460:70:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3803, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "47450:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47450:81:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "47435:96:8" - }, - { - "assignments": [ - 3813 - ], - "declarations": [ - { - "constant": false, - "id": 3813, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47537:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3812, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "47537:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3821, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f726974792e6669726d", - "id": 3817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47579:27:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - "value": "registered.authority.firm" - }, - { - "argumentTypes": null, - "id": 3818, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3786, - "src": "47608:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3815, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "47562:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "47562:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47562:63:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3814, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "47552:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47552:74:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "47537:89:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3826, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3802, - "src": "47669:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3827, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3788, - "src": "47675:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3823, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3782, - "src": "47648:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3824, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "47648:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "47648:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 3828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47648:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47692:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3822, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "47633:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47633:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3831, - "nodeType": "ExpressionStatement", - "src": "47633:167:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3836, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3813, - "src": "47845:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3837, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3784, - "src": "47851:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3833, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3782, - "src": "47822:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3834, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "47822:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "47822:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 3838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47822:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3839, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47870:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3832, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "47807:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47807:171:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3841, - "nodeType": "ExpressionStatement", - "src": "47807:171:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47993:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3792, - "id": 3843, - "nodeType": "Return", - "src": "47986:11:8" - } - ] - }, - "documentation": "@notice Method for setting a registered issuer firm authority\n@dev | Only Token, Inc. and other approved institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | Authority can only be set for a registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered to authority\n@param authorityAddress Ethereum address of the firm authority to be approved\n@param approved Approval status to set for the firm authority (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3845, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setRegisteredAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3782, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47212:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3781, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "47212:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3784, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47231:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3783, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "47231:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3786, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47250:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3785, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "47250:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3788, - "name": "approved", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47276:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3787, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "47276:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "47211:79:8" - }, - "payable": false, - "returnParameters": { - "id": 3792, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3791, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47309:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3790, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "47309:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "47308:14:8" - }, - "scope": 4622, - "src": "47180:822:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3873, - "nodeType": "Block", - "src": "48490:164:8", - "statements": [ - { - "assignments": [ - 3855 - ], - "declarations": [ - { - "constant": false, - "id": 3855, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3874, - "src": "48496:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3854, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "48496:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f726974792e6669726d", - "id": 3859, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "48536:27:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - "value": "registered.authority.firm" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3861, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3847, - "src": "48585:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3862, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3849, - "src": "48591:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3860, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "48565:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48565:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3857, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "48519:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "48519:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48519:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3856, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "48509:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48509:101:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "48496:114:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3870, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3855, - "src": "48646:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3867, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3847, - "src": "48623:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3868, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "48623:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "48623:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 3871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48623:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 3853, - "id": 3872, - "nodeType": "Return", - "src": "48616:33:8" - } - ] - }, - "documentation": "@notice Get the issuer firm registered to the authority Ethereum address\n@dev | Only one firm can be registered per authority\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"issuerFirm\" : \"Name of the firm registered to authority\" }", - "id": 3874, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFirmFromAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3847, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3874, - "src": "48403:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3846, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "48403:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3849, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3874, - "src": "48422:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3848, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "48422:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48402:45:8" - }, - "payable": false, - "returnParameters": { - "id": 3853, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3852, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3874, - "src": "48471:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3851, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "48471:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48470:19:8" - }, - "scope": 4622, - "src": "48373:281:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3899, - "nodeType": "Block", - "src": "49052:119:8", - "statements": [ - { - "assignments": [ - 3884 - ], - "declarations": [ - { - "constant": false, - "id": 3884, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3900, - "src": "49058:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3883, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "49058:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3892, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e6669726d", - "id": 3888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "49098:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - "value": "registered.firm" - }, - { - "argumentTypes": null, - "id": 3889, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3878, - "src": "49117:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3886, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "49081:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3887, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "49081:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49081:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3885, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "49071:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49071:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "49058:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3896, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3884, - "src": "49163:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3893, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3876, - "src": "49142:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3894, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "49142:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "49142:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49142:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3882, - "id": 3898, - "nodeType": "Return", - "src": "49135:31:8" - } - ] - }, - "documentation": "@notice Return the boolean (true/false) registration status for an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@return { \"registered\" : \"Return if the issuer firm has been registered\" }", - "id": 3900, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3879, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3876, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3900, - "src": "48974:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3875, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "48974:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3878, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3900, - "src": "48993:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3877, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "48993:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48973:38:8" - }, - "payable": false, - "returnParameters": { - "id": 3882, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3881, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3900, - "src": "49035:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3880, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "49035:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49034:17:8" - }, - "scope": 4622, - "src": "48948:223:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3931, - "nodeType": "Block", - "src": "49703:169:8", - "statements": [ - { - "assignments": [ - 3912 - ], - "declarations": [ - { - "constant": false, - "id": 3912, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49709:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3911, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "49709:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3924, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3916, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "49749:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "id": 3917, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3904, - "src": "49773:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3919, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "49805:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3920, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3906, - "src": "49811:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3918, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "49785:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49785:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3914, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "49732:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3915, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "49732:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49732:97:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3913, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "49722:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49722:108:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "49709:121:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3928, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3912, - "src": "49864:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3925, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "49843:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3926, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "49843:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "49843:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49843:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3910, - "id": 3930, - "nodeType": "Return", - "src": "49836:31:8" - } - ] - }, - "documentation": "@notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }", - "id": 3932, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredToFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3907, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3902, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49599:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3901, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "49599:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3904, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49618:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3903, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "49618:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3906, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49637:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3905, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "49637:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49598:64:8" - }, - "payable": false, - "returnParameters": { - "id": 3910, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3909, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49686:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3908, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "49686:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49685:17:8" - }, - "scope": 4622, - "src": "49571:301:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3967, - "nodeType": "Block", - "src": "50348:230:8", - "statements": [ - { - "assignments": [ - 3942 - ], - "declarations": [ - { - "constant": false, - "id": 3942, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3968, - "src": "50354:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3941, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "50354:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3960, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3946, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "50394:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3948, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3934, - "src": "50439:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3950, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3934, - "src": "50465:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3951, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3936, - "src": "50471:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3949, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "50445:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50445:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3947, - "name": "getFirmFromAuthority", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3874, - "src": "50418:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" - } - }, - "id": 3953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50418:71:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3955, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3934, - "src": "50511:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3956, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3936, - "src": "50517:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3954, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "50491:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50491:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3944, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "50377:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3945, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "50377:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50377:158:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3943, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "50367:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50367:169:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "50354:182:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3964, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3942, - "src": "50570:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3961, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3934, - "src": "50549:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3962, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "50549:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "50549:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50549:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3940, - "id": 3966, - "nodeType": "Return", - "src": "50542:31:8" - } - ] - }, - "documentation": "@notice Return if an authority address is registered\n@dev | This also checks the status of the registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered\" }", - "id": 3968, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3934, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3968, - "src": "50263:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3933, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "50263:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3936, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3968, - "src": "50282:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3935, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "50282:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50262:45:8" - }, - "payable": false, - "returnParameters": { - "id": 3940, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3939, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3968, - "src": "50331:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3938, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "50331:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50330:17:8" - }, - "scope": 4622, - "src": "50232:346:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3993, - "nodeType": "Block", - "src": "51023:109:8", - "statements": [ - { - "assignments": [ - 3978 - ], - "declarations": [ - { - "constant": false, - "id": 3978, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3994, - "src": "51029:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3977, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51029:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3986, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74782e737461747573", - "id": 3982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51069:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - "value": "tx.status" - }, - { - "argumentTypes": null, - "id": 3983, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3972, - "src": "51082:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 3980, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "51052:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "51052:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51052:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3979, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "51042:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51042:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "51029:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3990, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3978, - "src": "51124:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3987, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3970, - "src": "51103:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3988, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "51103:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "51103:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51103:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3976, - "id": 3992, - "nodeType": "Return", - "src": "51096:31:8" - } - ] - }, - "documentation": "@notice Return boolean transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}", - "id": 3994, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTxStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3973, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3970, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3994, - "src": "50950:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3969, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "50950:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3972, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 3994, - "src": "50969:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3971, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "50969:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50949:35:8" - }, - "payable": false, - "returnParameters": { - "id": 3976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3975, - "name": "txStatus", - "nodeType": "VariableDeclaration", - "scope": 3994, - "src": "51008:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3974, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "51008:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51007:15:8" - }, - "scope": 4622, - "src": "50929:203:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4034, - "nodeType": "Block", - "src": "51541:486:8", - "statements": [ - { - "assignments": [ - 4004 - ], - "declarations": [ - { - "constant": false, - "id": 4004, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "51547:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4003, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51547:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4012, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74782e737461747573", - "id": 4008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51587:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - "value": "tx.status" - }, - { - "argumentTypes": null, - "id": 4009, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3998, - "src": "51600:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 4006, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "51570:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4007, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "51570:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51570:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4005, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "51560:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51560:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "51547:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "51677:26:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4015, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3996, - "src": "51690:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4016, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3998, - "src": "51696:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4014, - "name": "getTxStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3994, - "src": "51678:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) view returns (bool)" - } - }, - "id": 4017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51678:25:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205472616e73616374696f6e20737461747573206d7573742062652066616c7365206265666f72652073657474696e6720746865207472616e73616374696f6e207374617475732e", - "id": 4019, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51711:80:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", - "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" - }, - "value": "Error: Transaction status must be false before setting the transaction status." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", - "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" - } - ], - "id": 4013, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "51669:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51669:123:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4021, - "nodeType": "ExpressionStatement", - "src": "51669:123:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4026, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4004, - "src": "51879:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4027, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51883:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4023, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3996, - "src": "51858:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4024, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "51858:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "51858:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 4028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51858:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 4029, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51896:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 4022, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "51850:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51850:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4031, - "nodeType": "ExpressionStatement", - "src": "51850:154:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "52018:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4002, - "id": 4033, - "nodeType": "Return", - "src": "52011:11:8" - } - ] - }, - "documentation": "@notice Set transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 4035, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTxStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3999, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3996, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "51474:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3995, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "51474:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3998, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "51493:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3997, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51493:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51473:35:8" - }, - "payable": false, - "returnParameters": { - "id": 4002, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4001, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "51527:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "51527:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51526:14:8" - }, - "scope": 4622, - "src": "51453:574:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4148, - "nodeType": "Block", - "src": "53347:1436:8", - "statements": [ - { - "assignments": [ - 4061 - ], - "declarations": [ - { - "constant": false, - "id": 4061, - "name": "fxTxHash", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53354:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4060, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53354:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4073, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4065, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "53400:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4066, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4041, - "src": "53411:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4067, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4043, - "src": "53420:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4068, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "53429:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4069, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4047, - "src": "53437:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4070, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4055, - "src": "53445:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4063, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "53383:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4064, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "53383:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53383:73:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4062, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "53373:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53373:84:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "53354:103:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4076, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "53630:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4077, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "53636:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "53636:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4079, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "53648:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4075, - "name": "verifyAccounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3034, - "src": "53615:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) view returns (bool)" - } - }, - "id": 4080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53615:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204f6e6c79207665726966696564206163636f756e74732063616e20706572666f726d2063757272656e63792073776170732e", - "id": 4081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "53666:59:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", - "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" - }, - "value": "Error: Only verified accounts can perform currency swaps." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", - "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" - } - ], - "id": 4074, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "53600:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53600:126:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4083, - "nodeType": "ExpressionStatement", - "src": "53600:126:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4086, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "53850:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4087, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4061, - "src": "53856:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4085, - "name": "setTxStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4035, - "src": "53838:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) returns (bool)" - } - }, - "id": 4088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53838:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204661696c656420746f20736574207472616e73616374696f6e2073746174757320746f2066756c66696c6c65642e", - "id": 4089, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "53873:55:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", - "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" - }, - "value": "Error: Failed to set transaction status to fulfilled." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", - "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" - } - ], - "id": 4084, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "53823:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53823:106:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4091, - "nodeType": "ExpressionStatement", - "src": "53823:106:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4093, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4055, - "src": "53994:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4094, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5258, - "src": "54008:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "53994:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205472616e73616374696f6e20686173206578706972656421", - "id": 4096, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54013:33:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", - "typeString": "literal_string \"Error: Transaction has expired!\"" - }, - "value": "Error: Transaction has expired!" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", - "typeString": "literal_string \"Error: Transaction has expired!\"" - } - ], - "id": 4092, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "53986:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53986:61:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4098, - "nodeType": "ExpressionStatement", - "src": "53986:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4101, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4061, - "src": "54207:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4102, - "name": "sigV", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4049, - "src": "54217:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 4103, - "name": "sigR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4051, - "src": "54223:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4104, - "name": "sigS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4053, - "src": "54229:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4100, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5248, - "src": "54197:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 4105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54197:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4106, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "54238:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "54197:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204164647265737320646572697665642066726f6d207472616e73616374696f6e207369676e617475726520646f6573206e6f74206d6174636820746865207265717565737465722061646472657373", - "id": 4108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54255:88:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", - "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" - }, - "value": "Error: Address derived from transaction signature does not match the requester address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", - "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" - } - ], - "id": 4099, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "54182:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54182:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4110, - "nodeType": "ExpressionStatement", - "src": "54182:162:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4113, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "54438:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4114, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4041, - "src": "54444:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "54453:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "54453:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4117, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "54465:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4118, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "54476:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 4119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54484:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - } - ], - "id": 4112, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "54424:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 4120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54424:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 4121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54498:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 4111, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "54409:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54409:135:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4123, - "nodeType": "ExpressionStatement", - "src": "54409:135:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4126, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "54580:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4127, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4043, - "src": "54586:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4128, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "54595:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4129, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "54606:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4130, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "54606:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4131, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4047, - "src": "54618:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 4132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54626:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - } - ], - "id": 4125, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "54566:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 4133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54566:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 4134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54640:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 4124, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "54551:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54551:135:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4136, - "nodeType": "ExpressionStatement", - "src": "54551:135:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4138, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4041, - "src": "54705:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4139, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4043, - "src": "54714:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4140, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "54723:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4141, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4047, - "src": "54731:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4142, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4055, - "src": "54739:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4143, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4061, - "src": "54751:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4137, - "name": "FxSwap", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1716, - "src": "54698:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", - "typeString": "function (string memory,string memory,uint256,uint256,uint256,bytes32)" - } - }, - "id": 4144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54698:62:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4145, - "nodeType": "EmitStatement", - "src": "54693:67:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54774:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4059, - "id": 4147, - "nodeType": "Return", - "src": "54767:11:8" - } - ] - }, - "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev | This method can be called directly between peers\n@dev | This method does not take transaction fees from the swap\n@param self Internal storage proxying TokenIOStorage contract\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", - "id": 4149, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "execSwap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4056, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4037, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53123:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4036, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "53123:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4039, - "name": "requester", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53146:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "53146:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4041, - "name": "symbolA", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53169:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4040, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "53169:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4043, - "name": "symbolB", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53189:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4042, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "53189:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4045, - "name": "valueA", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53209:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4044, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53209:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4047, - "name": "valueB", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53226:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4046, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53226:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4049, - "name": "sigV", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53243:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4048, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "53243:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4051, - "name": "sigR", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53259:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4050, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53259:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4053, - "name": "sigS", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53277:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4052, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53277:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4055, - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53295:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4054, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53295:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "53117:197:8" - }, - "payable": false, - "returnParameters": { - "id": 4059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4058, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53333:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4057, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "53333:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "53332:14:8" - }, - "scope": 4622, - "src": "53100:1683:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4187, - "nodeType": "Block", - "src": "55336:350:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4159, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4153, - "src": "55350:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 4160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55369:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "55350:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2063616e6e6f74206465707265636174652061206e756c6c20616464726573732e", - "id": 4162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55382:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", - "typeString": "literal_string \"Error: cannot deprecate a null address.\"" - }, - "value": "Error: cannot deprecate a null address." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", - "typeString": "literal_string \"Error: cannot deprecate a null address.\"" - } - ], - "id": 4158, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "55342:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55342:82:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4164, - "nodeType": "ExpressionStatement", - "src": "55342:82:8" - }, - { - "assignments": [ - 4166 - ], - "declarations": [ - { - "constant": false, - "id": 4166, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4188, - "src": "55431:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4165, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "55431:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4174, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6465706372656361746564", - "id": 4170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55471:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - "value": "depcrecated" - }, - { - "argumentTypes": null, - "id": 4171, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4153, - "src": "55486:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4168, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "55454:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "55454:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55454:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4167, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "55444:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55444:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "55431:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4179, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4166, - "src": "55539:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4180, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55543:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4176, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4151, - "src": "55518:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4177, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "55518:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "55518:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 4181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55518:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55556:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4175, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "55510:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55510:153:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4184, - "nodeType": "ExpressionStatement", - "src": "55510:153:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4185, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55677:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4157, - "id": 4186, - "nodeType": "Return", - "src": "55670:11:8" - } - ] - }, - "documentation": "@notice Deprecate a contract interface\n@dev | This is a low-level method to deprecate a contract interface.\n@dev | This is useful if the interface needs to be updated or becomes out of date\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", - "id": 4188, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setDeprecatedContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4151, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4188, - "src": "55260:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4150, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "55260:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4153, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 4188, - "src": "55279:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "55279:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "55259:44:8" - }, - "payable": false, - "returnParameters": { - "id": 4157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4156, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4188, - "src": "55322:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4155, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "55322:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "55321:14:8" - }, - "scope": 4622, - "src": "55229:457:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4213, - "nodeType": "Block", - "src": "56100:120:8", - "statements": [ - { - "assignments": [ - 4198 - ], - "declarations": [ - { - "constant": false, - "id": 4198, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "56106:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4197, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "56106:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4206, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6465706372656361746564", - "id": 4202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56146:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - "value": "depcrecated" - }, - { - "argumentTypes": null, - "id": 4203, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4192, - "src": "56161:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4200, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "56129:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4201, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "56129:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56129:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4199, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "56119:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56119:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "56106:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4210, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4198, - "src": "56212:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4207, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4190, - "src": "56191:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4208, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "56191:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "56191:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 4211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56191:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 4196, - "id": 4212, - "nodeType": "Return", - "src": "56184:31:8" - } - ] - }, - "documentation": "@notice Return the deprecation status of a contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}", - "id": 4214, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isContractDeprecated", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4193, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4190, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "56020:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4189, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "56020:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4192, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "56039:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "56039:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56019:44:8" - }, - "payable": false, - "returnParameters": { - "id": 4196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4195, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "56087:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4194, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "56087:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56086:13:8" - }, - "scope": 4622, - "src": "55990:230:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4247, - "nodeType": "Block", - "src": "56743:264:8", - "statements": [ - { - "assignments": [ - 4226 - ], - "declarations": [ - { - "constant": false, - "id": 4226, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56749:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4225, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "56749:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4234, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6c696d69742e7370656e64696e672e706572696f64", - "id": 4230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56789:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - "value": "limit.spending.period" - }, - { - "argumentTypes": null, - "id": 4231, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4218, - "src": "56814:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4228, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "56772:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "56772:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56772:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4227, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "56762:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56762:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "56749:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4239, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4226, - "src": "56858:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4240, - "name": "period", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4220, - "src": "56862:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4236, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4216, - "src": "56837:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4237, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "56837:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "56837:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56837:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56877:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4235, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "56829:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56829:155:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4244, - "nodeType": "ExpressionStatement", - "src": "56829:155:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4245, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56998:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4224, - "id": 4246, - "nodeType": "Return", - "src": "56991:11:8" - } - ] - }, - "documentation": "@notice Set the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param period Unix timestamp of the spending period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4248, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4216, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56662:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4215, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "56662:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4218, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56681:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4217, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "56681:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4220, - "name": "period", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56698:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4219, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "56698:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56661:49:8" - }, - "payable": false, - "returnParameters": { - "id": 4224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4223, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56729:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4222, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "56729:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56728:14:8" - }, - "scope": 4622, - "src": "56628:379:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4273, - "nodeType": "Block", - "src": "57592:122:8", - "statements": [ - { - "assignments": [ - 4258 - ], - "declarations": [ - { - "constant": false, - "id": 4258, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4274, - "src": "57598:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4257, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "57598:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4266, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6c696d69742e7370656e64696e672e706572696f64", - "id": 4262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "57638:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - "value": "limit.spending.period" - }, - { - "argumentTypes": null, - "id": 4263, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4252, - "src": "57663:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4260, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "57621:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "57621:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57621:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4259, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "57611:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57611:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "57598:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4270, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4258, - "src": "57706:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4267, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4250, - "src": "57685:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4268, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "57685:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "57685:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57685:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4256, - "id": 4272, - "nodeType": "Return", - "src": "57678:31:8" - } - ] - }, - "documentation": "@notice Get the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@dev | If the current spending period has expired, it will be set upon next `transfer()`\nor `transferFrom()` request\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"period\" : \"Returns Unix timestamp of the current spending period\"}", - "id": 4274, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4253, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4250, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4274, - "src": "57520:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4249, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "57520:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4252, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4274, - "src": "57539:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "57539:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "57519:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4256, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4255, - "name": "period", - "nodeType": "VariableDeclaration", - "scope": 4274, - "src": "57579:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4254, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "57579:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "57578:13:8" - }, - "scope": 4622, - "src": "57486:228:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4307, - "nodeType": "Block", - "src": "58200:264:8", - "statements": [ - { - "assignments": [ - 4286 - ], - "declarations": [ - { - "constant": false, - "id": 4286, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58206:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4285, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "58206:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4294, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", - "id": 4290, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58246:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - "value": "account.spending.limit" - }, - { - "argumentTypes": null, - "id": 4291, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4278, - "src": "58272:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4288, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "58229:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "58229:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58229:51:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4287, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "58219:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58219:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "58206:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4299, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4286, - "src": "58316:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4300, - "name": "limit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4280, - "src": "58320:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4296, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4276, - "src": "58295:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4297, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "58295:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "58295:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58295:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4302, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58334:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4295, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "58287:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58287:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4304, - "nodeType": "ExpressionStatement", - "src": "58287:154:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58455:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4284, - "id": 4306, - "nodeType": "Return", - "src": "58448:11:8" - } - ] - }, - "documentation": "@notice Set the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param limit Spending limit amount\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4308, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingLimit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4276, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58120:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4275, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "58120:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4278, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58139:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4277, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "58139:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4280, - "name": "limit", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58156:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4279, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "58156:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58119:48:8" - }, - "payable": false, - "returnParameters": { - "id": 4284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4283, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58186:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4282, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "58186:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58185:14:8" - }, - "scope": 4622, - "src": "58087:377:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4333, - "nodeType": "Block", - "src": "58889:123:8", - "statements": [ - { - "assignments": [ - 4318 - ], - "declarations": [ - { - "constant": false, - "id": 4318, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4334, - "src": "58895:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4317, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "58895:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4326, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", - "id": 4322, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58935:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - "value": "account.spending.limit" - }, - { - "argumentTypes": null, - "id": 4323, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "58961:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4320, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "58918:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "58918:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58918:51:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4319, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "58908:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58908:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "58895:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4330, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4318, - "src": "59004:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4327, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "58983:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4328, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "58983:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "58983:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58983:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4316, - "id": 4332, - "nodeType": "Return", - "src": "58976:31:8" - } - ] - }, - "documentation": "@notice Get the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"limit\" : \"Returns the account spending limit amount\"}", - "id": 4334, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingLimit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4313, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4310, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4334, - "src": "58818:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4309, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "58818:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4312, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4334, - "src": "58837:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "58837:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58817:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4316, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4315, - "name": "limit", - "nodeType": "VariableDeclaration", - "scope": 4334, - "src": "58877:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4314, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "58877:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58876:12:8" - }, - "scope": 4622, - "src": "58785:227:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4399, - "nodeType": "Block", - "src": "59712:887:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4347, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "59846:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4348, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "59852:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4346, - "name": "updateAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4457, - "src": "59818:27:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" - } - }, - "id": 4349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59818:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4350, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "59868:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4345, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "59810:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59810:109:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4352, - "nodeType": "ExpressionStatement", - "src": "59810:109:8" - }, - { - "assignments": [ - 4354 - ], - "declarations": [ - { - "constant": false, - "id": 4354, - "name": "updatedAmount", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59926:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4353, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "59926:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4362, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4360, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4340, - "src": "59991:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4356, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "59972:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4357, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "59978:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4355, - "name": "getAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4487, - "src": "59947:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59947:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "59947:43:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59947:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "59926:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4365, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "60128:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4366, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60134:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4364, - "name": "getAccountSpendingLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4334, - "src": "60104:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60104:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4368, - "name": "updatedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4354, - "src": "60146:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "60104:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e742063616e6e6f742065786365656420697473206461696c79207370656e64206c696d69742e", - "id": 4370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60167:53:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", - "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" - }, - "value": "Error: Account cannot exceed its daily spend limit." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", - "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" - } - ], - "id": 4363, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "60089:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60089:132:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4372, - "nodeType": "ExpressionStatement", - "src": "60089:132:8" - }, - { - "assignments": [ - 4374 - ], - "declarations": [ - { - "constant": false, - "id": 4374, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "60291:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4373, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "60291:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", - "id": 4378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60331:25:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - "value": "account.spending.amount" - }, - { - "argumentTypes": null, - "id": 4379, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60358:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4381, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "60392:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4382, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60398:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4380, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4274, - "src": "60367:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60367:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4376, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "60314:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4377, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "60314:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60314:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4375, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "60304:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60304:104:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "60291:117:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4391, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4374, - "src": "60443:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4392, - "name": "updatedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4354, - "src": "60447:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4388, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "60422:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4389, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "60422:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "60422:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60422:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60469:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4387, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "60414:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60414:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4396, - "nodeType": "ExpressionStatement", - "src": "60414:162:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4397, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60590:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4344, - "id": 4398, - "nodeType": "Return", - "src": "60583:11:8" - } - ] - }, - "documentation": "@notice Set the account spending amount for the daily period\n@dev | Each account has it's own daily spending limit\n@dev | This transaction will throw if the new spending amount is greater than the limit\n@dev | This method is called in the `transfer()` and `transferFrom()` methods\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param amount Set the amount spent for the daily period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4400, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4336, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59631:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4335, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "59631:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4338, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59650:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4337, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "59650:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4340, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59667:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4339, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "59667:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59630:49:8" - }, - "payable": false, - "returnParameters": { - "id": 4344, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4343, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59698:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4342, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "59698:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59697:14:8" - }, - "scope": 4622, - "src": "59597:1002:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4456, - "nodeType": "Block", - "src": "61159:398:8", - "statements": [ - { - "assignments": [ - 4410 - ], - "declarations": [ - { - "constant": false, - "id": 4410, - "name": "begDate", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61165:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4409, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "61165:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4415, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4412, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4402, - "src": "61205:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4413, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4404, - "src": "61211:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4411, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4274, - "src": "61180:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61180:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "61165:54:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4416, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4410, - "src": "61229:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 4417, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5258, - "src": "61239:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "61229:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 4454, - "nodeType": "Block", - "src": "61276:277:8", - "statements": [ - { - "assignments": [ - 4423 - ], - "declarations": [ - { - "constant": false, - "id": 4423, - "name": "duration", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61284:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4422, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "61284:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4425, - "initialValue": { - "argumentTypes": null, - "hexValue": "3836343030", - "id": 4424, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61300:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "86400" - }, - "nodeType": "VariableDeclarationStatement", - "src": "61284:21:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4428, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4402, - "src": "61381:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4429, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4404, - "src": "61387:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4445, - "name": "duration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4423, - "src": "61454:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 4441, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61446:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4438, - "name": "duration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4423, - "src": "61432:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4434, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4410, - "src": "61418:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4432, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5258, - "src": "61410:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "61410:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61410:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4436, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "61409:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "61409:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61409:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "61409:36:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61409:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4443, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "61408:41:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "61408:45:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61408:55:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4430, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4410, - "src": "61396:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "61396:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61396:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 4427, - "name": "setAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4248, - "src": "61356:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 4448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61356:109:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4449, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61475:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4426, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "61339:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61339:187:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4451, - "nodeType": "ExpressionStatement", - "src": "61339:187:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4452, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61542:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4408, - "id": 4453, - "nodeType": "Return", - "src": "61535:11:8" - } - ] - }, - "id": 4455, - "nodeType": "IfStatement", - "src": "61225:328:8", - "trueBody": { - "id": 4421, - "nodeType": "Block", - "src": "61244:26:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61259:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4408, - "id": 4420, - "nodeType": "Return", - "src": "61252:11:8" - } - ] - } - } - ] - }, - "documentation": "@notice Low-level API to ensure the account spending period is always current\n@dev | This method is internally called by `setAccountSpendingAmount()` to ensure\nspending period is always the most current daily period.\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4457, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "updateAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4402, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61091:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4401, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "61091:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4404, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61110:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4403, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61110:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61090:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4408, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4407, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61145:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4406, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "61145:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61144:14:8" - }, - "scope": 4622, - "src": "61054:503:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4486, - "nodeType": "Block", - "src": "62021:165:8", - "statements": [ - { - "assignments": [ - 4467 - ], - "declarations": [ - { - "constant": false, - "id": 4467, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4487, - "src": "62027:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4466, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "62027:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4479, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", - "id": 4471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "62067:25:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - "value": "account.spending.amount" - }, - { - "argumentTypes": null, - "id": 4472, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4461, - "src": "62094:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4474, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4459, - "src": "62128:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4475, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4461, - "src": "62134:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4473, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4274, - "src": "62103:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62103:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4469, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "62050:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "62050:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62050:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4468, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "62040:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62040:104:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "62027:117:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4483, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4467, - "src": "62178:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4480, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4459, - "src": "62157:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4481, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "62157:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "62157:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62157:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4465, - "id": 4485, - "nodeType": "Return", - "src": "62150:31:8" - } - ] - }, - "documentation": "@notice Return the amount spent during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount spent by the account during the current period\"}", - "id": 4487, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4459, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4487, - "src": "61949:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4458, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "61949:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4461, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4487, - "src": "61968:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4460, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61968:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61948:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4465, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4464, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4487, - "src": "62008:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4463, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "62008:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62007:13:8" - }, - "scope": 4622, - "src": "61915:271:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4507, - "nodeType": "Block", - "src": "62669:101:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4502, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4489, - "src": "62750:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4503, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4491, - "src": "62756:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4501, - "name": "getAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4487, - "src": "62725:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62725:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4497, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4489, - "src": "62706:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4498, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4491, - "src": "62712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4496, - "name": "getAccountSpendingLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4334, - "src": "62682:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62682:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "62682:42:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62682:83:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4495, - "id": 4506, - "nodeType": "Return", - "src": "62675:90:8" - } - ] - }, - "documentation": "@notice Return the amount remaining during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}", - "id": 4508, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingRemaining", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4492, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4489, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4508, - "src": "62589:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4488, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "62589:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4491, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4508, - "src": "62608:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4490, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "62608:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62588:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4495, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4494, - "name": "remainingLimit", - "nodeType": "VariableDeclaration", - "scope": 4508, - "src": "62648:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4493, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "62648:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62647:21:8" - }, - "scope": 4622, - "src": "62552:218:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4541, - "nodeType": "Block", - "src": "63363:207:8", - "statements": [ - { - "assignments": [ - 4520 - ], - "declarations": [ - { - "constant": false, - "id": 4520, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63369:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4519, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "63369:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4528, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66782e7573642e72617465", - "id": 4524, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63409:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - "value": "fx.usd.rate" - }, - { - "argumentTypes": null, - "id": 4525, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4512, - "src": "63424:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4522, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "63392:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4523, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "63392:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63392:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4521, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "63382:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63382:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "63369:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4533, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4520, - "src": "63476:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4534, - "name": "bpsRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4514, - "src": "63480:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4530, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4510, - "src": "63455:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4531, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "63455:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "63455:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63455:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63496:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4529, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "63440:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63440:107:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4538, - "nodeType": "ExpressionStatement", - "src": "63440:107:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63561:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4518, - "id": 4540, - "nodeType": "Return", - "src": "63554:11:8" - } - ] - }, - "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@return { \"success\": \"Returns true if successfully called from another contract\"}", - "id": 4542, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFxUSDBPSRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4515, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4510, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63281:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4509, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "63281:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4512, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63300:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4511, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "63300:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4514, - "name": "bpsRate", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63317:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4513, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "63317:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63280:50:8" - }, - "payable": false, - "returnParameters": { - "id": 4518, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4517, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63349:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4516, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "63349:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63348:14:8" - }, - "scope": 4622, - "src": "63256:314:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4567, - "nodeType": "Block", - "src": "63976:113:8", - "statements": [ - { - "assignments": [ - 4552 - ], - "declarations": [ - { - "constant": false, - "id": 4552, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4568, - "src": "63982:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4551, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "63982:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4560, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66782e7573642e72617465", - "id": 4556, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64022:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - "value": "fx.usd.rate" - }, - { - "argumentTypes": null, - "id": 4557, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4546, - "src": "64037:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4554, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "64005:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "64005:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64005:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4553, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "63995:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63995:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "63982:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4564, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4552, - "src": "64081:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4561, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4544, - "src": "64060:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4562, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "64060:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "64060:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64060:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4550, - "id": 4566, - "nodeType": "Return", - "src": "64053:31:8" - } - ] - }, - "documentation": "@notice Return the foreign currency USD exchanged amount in basis points\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", - "id": 4568, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFxUSDBPSRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4544, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4568, - "src": "63903:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4543, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "63903:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4546, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4568, - "src": "63922:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4545, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "63922:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63902:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4550, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4549, - "name": "bpsRate", - "nodeType": "VariableDeclaration", - "scope": 4568, - "src": "63962:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4548, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "63962:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63961:14:8" - }, - "scope": 4622, - "src": "63878:211:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4620, - "nodeType": "Block", - "src": "64558:330:8", - "statements": [ - { - "assignments": [ - 4580 - ], - "declarations": [ - { - "constant": false, - "id": 4580, - "name": "usdDecimals", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64564:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4579, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64564:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4585, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4582, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "64600:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "hexValue": "55534478", - "id": 4583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64606:6:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", - "typeString": "literal_string \"USDx\"" - }, - "value": "USDx" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", - "typeString": "literal_string \"USDx\"" - } - ], - "id": 4581, - "name": "getTokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2512, - "src": "64583:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64583:30:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64564:49:8" - }, - { - "assignments": [ - 4587 - ], - "declarations": [ - { - "constant": false, - "id": 4587, - "name": "fxDecimals", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64619:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4586, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64619:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4592, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4589, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "64654:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4590, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4572, - "src": "64660:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4588, - "name": "getTokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2512, - "src": "64637:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64637:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64619:50:8" - }, - { - "assignments": [ - 4594 - ], - "declarations": [ - { - "constant": false, - "id": 4594, - "name": "usdAmount", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64743:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4593, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64743:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4617, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 4613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64846:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "id": 4614, - "name": "fxDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4587, - "src": "64850:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "64846:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 4607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64824:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "id": 4608, - "name": "usdDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4580, - "src": "64828:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "64824:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3130303030", - "id": 4603, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64812:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - }, - "value": "10000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4598, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "64791:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4599, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4572, - "src": "64797:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4597, - "name": "getFxUSDBPSRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4568, - "src": "64775:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64775:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4595, - "name": "fxAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4574, - "src": "64762:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "64762:12:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64762:45:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "64762:49:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64762:56:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4605, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "64761:58:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "64761:62:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64761:79:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4611, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "64760:81:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "64760:85:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64760:101:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64743:118:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 4618, - "name": "usdAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4594, - "src": "64874:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4578, - "id": 4619, - "nodeType": "Return", - "src": "64867:16:8" - } - ] - }, - "documentation": "@notice Return the foreign currency USD exchanged amount\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"amount\" : \"Returns the foreign currency amount in USD\"}", - "id": 4621, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFxUSDAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4575, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4570, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64471:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4569, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "64471:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4572, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64490:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4571, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "64490:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4574, - "name": "fxAmount", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64507:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4573, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64507:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "64470:51:8" - }, - "payable": false, - "returnParameters": { - "id": 4578, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4577, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64545:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4576, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64545:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "64544:13:8" - }, - "scope": 4622, - "src": "64447:441:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4623, - "src": "900:63992:8" - } - ], - "src": "0:64893:8" - }, - "legacyAST": { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", - "exportedSymbols": { - "TokenIOLib": [ - 4622 - ] - }, - "id": 4623, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1638, - "literals": [ - "solidity", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:23:8" - }, - { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", - "file": "./SafeMath.sol", - "id": 1639, - "nodeType": "ImportDirective", - "scope": 4623, - "sourceUnit": 286, - "src": "842:24:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", - "file": "./TokenIOStorage.sol", - "id": 1640, - "nodeType": "ImportDirective", - "scope": 4623, - "sourceUnit": 5242, - "src": "867:30:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 4622, - "linearizedBaseContracts": [ - 4622 - ], - "name": "TokenIOLib", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 1643, - "libraryName": { - "contractScope": null, - "id": 1641, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 285, - "src": "1020:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$285", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "1014:24:8", - "typeName": { - "id": 1642, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1033:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "canonicalName": "TokenIOLib.Data", - "id": 1646, - "members": [ - { - "constant": false, - "id": 1645, - "name": "Storage", - "nodeType": "VariableDeclaration", - "scope": 1646, - "src": "1134:22:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - }, - "typeName": { - "contractScope": null, - "id": 1644, - "name": "TokenIOStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5241, - "src": "1134:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Data", - "nodeType": "StructDefinition", - "scope": 4622, - "src": "1116:45:8", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice Not using `Log` prefix for events to be consistent with ERC20 named events;", - "id": 1654, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1653, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1648, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1654, - "src": "1270:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1647, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1270:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1650, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1654, - "src": "1293:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1649, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1293:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1652, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1654, - "src": "1318:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1651, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1318:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1269:61:8" - }, - "src": "1255:76:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1664, - "name": "Deposit", - "nodeType": "EventDefinition", - "parameters": { - "id": 1663, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1656, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1664, - "src": "1348:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1655, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1348:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1658, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1664, - "src": "1365:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1657, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1365:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1660, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1664, - "src": "1390:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1659, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1390:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1662, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1664, - "src": "1403:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1661, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1403:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1347:74:8" - }, - "src": "1334:88:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1674, - "name": "Withdraw", - "nodeType": "EventDefinition", - "parameters": { - "id": 1673, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1666, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1674, - "src": "1440:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1665, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1440:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1668, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1674, - "src": "1457:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1667, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1457:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1670, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1674, - "src": "1482:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1669, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1482:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1672, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1674, - "src": "1495:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1671, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1495:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1439:74:8" - }, - "src": "1425:89:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1686, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 1685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1676, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1532:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1675, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1532:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1678, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1549:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1677, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1549:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1680, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1571:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1679, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1571:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1682, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1591:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1681, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1591:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1684, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1604:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1683, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1604:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1531:84:8" - }, - "src": "1517:99:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1694, - "name": "KYCApproval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1693, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1688, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1694, - "src": "1637:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1687, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1637:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1690, - "indexed": false, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1694, - "src": "1662:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1689, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1662:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1692, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1694, - "src": "1675:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1691, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1675:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1636:57:8" - }, - "src": "1619:75:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1702, - "name": "AccountStatus", - "nodeType": "EventDefinition", - "parameters": { - "id": 1701, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1696, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1702, - "src": "1717:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1695, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1717:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1698, - "indexed": false, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1702, - "src": "1742:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1697, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1742:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1700, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1702, - "src": "1755:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1699, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1755:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1716:57:8" - }, - "src": "1697:77:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1716, - "name": "FxSwap", - "nodeType": "EventDefinition", - "parameters": { - "id": 1715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1704, - "indexed": false, - "name": "tokenASymbol", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1790:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1703, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1790:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1706, - "indexed": false, - "name": "tokenBSymbol", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1810:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1705, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1810:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1708, - "indexed": false, - "name": "tokenAValue", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1830:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1707, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1830:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1710, - "indexed": false, - "name": "tokenBValue", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1847:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1709, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1847:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1712, - "indexed": false, - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1865:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1711, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1865:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1714, - "indexed": false, - "name": "transactionHash", - "nodeType": "VariableDeclaration", - "scope": 1716, - "src": "1882:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1713, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1882:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1789:117:8" - }, - "src": "1777:130:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1722, - "name": "AccountForward", - "nodeType": "EventDefinition", - "parameters": { - "id": 1721, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1718, - "indexed": true, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 1722, - "src": "1931:31:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1931:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1720, - "indexed": true, - "name": "forwardedAccount", - "nodeType": "VariableDeclaration", - "scope": 1722, - "src": "1964:32:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1719, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1964:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1930:67:8" - }, - "src": "1910:88:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1728, - "name": "NewAuthority", - "nodeType": "EventDefinition", - "parameters": { - "id": 1727, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1724, - "indexed": true, - "name": "authority", - "nodeType": "VariableDeclaration", - "scope": 1728, - "src": "2020:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1723, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2020:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1726, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1728, - "src": "2047:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1725, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2047:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2019:46:8" - }, - "src": "2001:65:8" - }, - { - "body": { - "id": 1761, - "nodeType": "Block", - "src": "2556:275:8", - "statements": [ - { - "assignments": [ - 1738 - ], - "declarations": [ - { - "constant": false, - "id": 1738, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1762, - "src": "2562:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1737, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2562:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1748, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d65", - "id": 1742, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2602:12:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - "value": "token.name" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "2624:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2616:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2616:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1740, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "2585:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1741, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2585:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2585:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1739, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "2575:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2575:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2562:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1753, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1738, - "src": "2675:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1754, - "name": "tokenName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1732, - "src": "2679:9:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1750, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1730, - "src": "2652:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1751, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "2652:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1752, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "2652:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2652:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1756, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2697:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1749, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "2637:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2637:172:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1758, - "nodeType": "ExpressionStatement", - "src": "2637:172:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1759, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2822:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1736, - "id": 1760, - "nodeType": "Return", - "src": "2815:11:8" - } - ] - }, - "documentation": "@notice Set the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenName Name of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1762, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1733, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1730, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1762, - "src": "2487:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1729, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "2487:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1732, - "name": "tokenName", - "nodeType": "VariableDeclaration", - "scope": 1762, - "src": "2506:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1731, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2506:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2486:37:8" - }, - "payable": false, - "returnParameters": { - "id": 1736, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1735, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1762, - "src": "2542:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1734, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2542:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2541:14:8" - }, - "scope": 4622, - "src": "2465:366:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1795, - "nodeType": "Block", - "src": "3331:279:8", - "statements": [ - { - "assignments": [ - 1772 - ], - "declarations": [ - { - "constant": false, - "id": 1772, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1796, - "src": "3337:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1771, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3337:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1782, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e73796d626f6c", - "id": 1776, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3377:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - "value": "token.symbol" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1778, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "3401:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3393:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3393:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1774, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "3360:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1775, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3360:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3360:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1773, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "3350:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3350:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3337:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1787, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1772, - "src": "3452:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1788, - "name": "tokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1766, - "src": "3456:11:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1784, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1764, - "src": "3429:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1785, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "3429:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "3429:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3429:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3476:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "3414:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3414:174:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1792, - "nodeType": "ExpressionStatement", - "src": "3414:174:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1793, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3601:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1770, - "id": 1794, - "nodeType": "Return", - "src": "3594:11:8" - } - ] - }, - "documentation": "@notice Set the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenSymbol Symbol of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1796, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenSymbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1767, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1764, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1796, - "src": "3260:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1763, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "3260:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1766, - "name": "tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 1796, - "src": "3279:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1765, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3279:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3259:39:8" - }, - "payable": false, - "returnParameters": { - "id": 1770, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1769, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1796, - "src": "3317:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1768, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3317:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3316:14:8" - }, - "scope": 4622, - "src": "3236:374:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1829, - "nodeType": "Block", - "src": "4122:273:8", - "statements": [ - { - "assignments": [ - 1806 - ], - "declarations": [ - { - "constant": false, - "id": 1806, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1830, - "src": "4128:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1805, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4128:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1816, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e746c61", - "id": 1810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4168:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - "value": "token.tla" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1812, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "4189:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1811, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4181:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4181:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1808, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "4151:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4151:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4151:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1807, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "4141:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4141:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4128:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1821, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1806, - "src": "4240:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1822, - "name": "tokenTLA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1800, - "src": "4244:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1818, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1798, - "src": "4217:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1819, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "4217:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "4217:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4217:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1824, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4261:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1817, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "4202:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4202:171:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1826, - "nodeType": "ExpressionStatement", - "src": "4202:171:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1827, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4386:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1804, - "id": 1828, - "nodeType": "Return", - "src": "4379:11:8" - } - ] - }, - "documentation": "@notice Set the token three letter abreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenTLA TLA of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1830, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenTLA", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1798, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1830, - "src": "4054:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1797, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "4054:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1800, - "name": "tokenTLA", - "nodeType": "VariableDeclaration", - "scope": 1830, - "src": "4073:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1799, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4073:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4053:36:8" - }, - "payable": false, - "returnParameters": { - "id": 1804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1803, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1830, - "src": "4108:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1802, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4108:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4107:14:8" - }, - "scope": 4622, - "src": "4033:362:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1863, - "nodeType": "Block", - "src": "4944:281:8", - "statements": [ - { - "assignments": [ - 1840 - ], - "declarations": [ - { - "constant": false, - "id": 1840, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1864, - "src": "4950:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1839, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4950:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1850, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e76657273696f6e", - "id": 1844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4990:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - "value": "token.version" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1846, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "5015:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1845, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5007:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5007:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1842, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "4973:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4973:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4973:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1841, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "4963:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4963:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4950:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1855, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1840, - "src": "5066:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1856, - "name": "tokenVersion", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1834, - "src": "5070:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1852, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1832, - "src": "5043:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1853, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "5043:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "5043:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5043:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5091:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1851, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "5028:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5028:175:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1860, - "nodeType": "ExpressionStatement", - "src": "5028:175:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1861, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5216:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1838, - "id": 1862, - "nodeType": "Return", - "src": "5209:11:8" - } - ] - }, - "documentation": "@notice Set the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1864, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenVersion", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1835, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1832, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1864, - "src": "4872:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1831, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "4872:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1834, - "name": "tokenVersion", - "nodeType": "VariableDeclaration", - "scope": 1864, - "src": "4891:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1833, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4891:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4871:40:8" - }, - "payable": false, - "returnParameters": { - "id": 1838, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1837, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1864, - "src": "4930:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1836, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4930:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4929:14:8" - }, - "scope": 4622, - "src": "4847:378:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1897, - "nodeType": "Block", - "src": "6053:276:8", - "statements": [ - { - "assignments": [ - 1876 - ], - "declarations": [ - { - "constant": false, - "id": 1876, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "6059:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1875, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6059:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1884, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e646563696d616c73", - "id": 1880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6099:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - "value": "token.decimals" - }, - { - "argumentTypes": null, - "id": 1881, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1868, - "src": "6117:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1878, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "6082:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6082:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6082:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1877, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "6072:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6072:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6059:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1889, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1876, - "src": "6169:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1890, - "name": "tokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1870, - "src": "6173:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1886, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1866, - "src": "6148:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1887, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "6148:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "6148:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6148:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6195:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1885, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "6133:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6133:174:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1894, - "nodeType": "ExpressionStatement", - "src": "6133:174:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1895, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6320:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1874, - "id": 1896, - "nodeType": "Return", - "src": "6313:11:8" - } - ] - }, - "documentation": "@notice Set the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@dev This method is not set to the address of the contract, rather is maped to currency\n@dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param tokenDecimals Decimal representation of the token contract unit amount\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1898, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenDecimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1871, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1866, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "5965:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1865, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "5965:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1868, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "5984:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1867, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5984:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1870, - "name": "tokenDecimals", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "6001:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1869, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6001:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5964:56:8" - }, - "payable": false, - "returnParameters": { - "id": 1874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1873, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1898, - "src": "6039:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1872, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6039:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6038:14:8" - }, - "scope": 4622, - "src": "5939:390:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1931, - "nodeType": "Block", - "src": "6889:267:8", - "statements": [ - { - "assignments": [ - 1908 - ], - "declarations": [ - { - "constant": false, - "id": 1908, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1932, - "src": "6895:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1907, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6895:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1918, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 1912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6935:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1914, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "6954:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6946:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6946:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1910, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "6918:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6918:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6918:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1909, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "6908:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6908:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6895:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1923, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1908, - "src": "7003:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1924, - "name": "feeBPS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1902, - "src": "7007:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1920, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1900, - "src": "6982:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1921, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "6982:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "6982:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6982:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7022:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1919, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "6967:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6967:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1928, - "nodeType": "ExpressionStatement", - "src": "6967:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7147:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1906, - "id": 1930, - "nodeType": "Return", - "src": "7140:11:8" - } - ] - }, - "documentation": "@notice Set basis point fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeBPS Basis points fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1932, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeBPS", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1903, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1900, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1932, - "src": "6825:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1899, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "6825:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1902, - "name": "feeBPS", - "nodeType": "VariableDeclaration", - "scope": 1932, - "src": "6844:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1901, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6844:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6824:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1905, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1932, - "src": "6875:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1904, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6875:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6874:14:8" - }, - "scope": 4622, - "src": "6806:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1965, - "nodeType": "Block", - "src": "7707:267:8", - "statements": [ - { - "assignments": [ - 1942 - ], - "declarations": [ - { - "constant": false, - "id": 1942, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1966, - "src": "7713:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1941, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7713:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1952, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 1946, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7753:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1948, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "7772:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1947, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7764:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7764:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1944, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "7736:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1945, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7736:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7736:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1943, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "7726:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7726:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7713:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1957, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1942, - "src": "7821:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1958, - "name": "feeMin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "7825:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1954, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1934, - "src": "7800:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1955, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "7800:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "7800:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7800:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1960, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7840:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1953, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "7785:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7785:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1962, - "nodeType": "ExpressionStatement", - "src": "7785:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7965:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1940, - "id": 1964, - "nodeType": "Return", - "src": "7958:11:8" - } - ] - }, - "documentation": "@notice Set minimum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMin Minimum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1966, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1934, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1966, - "src": "7643:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1933, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "7643:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1936, - "name": "feeMin", - "nodeType": "VariableDeclaration", - "scope": 1966, - "src": "7662:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1935, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7662:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7642:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1940, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1939, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1966, - "src": "7693:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1938, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7693:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7692:14:8" - }, - "scope": 4622, - "src": "7624:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1999, - "nodeType": "Block", - "src": "8525:267:8", - "statements": [ - { - "assignments": [ - 1976 - ], - "declarations": [ - { - "constant": false, - "id": 1976, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2000, - "src": "8531:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1975, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8531:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1986, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 1980, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8571:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1982, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "8590:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 1981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8582:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8582:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1978, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "8554:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1979, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8554:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8554:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1977, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "8544:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8544:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8531:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1991, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1976, - "src": "8639:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1992, - "name": "feeMax", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1970, - "src": "8643:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1988, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1968, - "src": "8618:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1989, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "8618:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "8618:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8618:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8658:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1987, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "8603:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8603:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1996, - "nodeType": "ExpressionStatement", - "src": "8603:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8783:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1974, - "id": 1998, - "nodeType": "Return", - "src": "8776:11:8" - } - ] - }, - "documentation": "@notice Set maximum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMax Maximum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2000, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMax", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1971, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1968, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2000, - "src": "8461:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1967, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "8461:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1970, - "name": "feeMax", - "nodeType": "VariableDeclaration", - "scope": 2000, - "src": "8480:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1969, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8480:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8460:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1974, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1973, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2000, - "src": "8511:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1972, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8511:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8510:14:8" - }, - "scope": 4622, - "src": "8442:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2033, - "nodeType": "Block", - "src": "9340:269:8", - "statements": [ - { - "assignments": [ - 2010 - ], - "declarations": [ - { - "constant": false, - "id": 2010, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2034, - "src": "9346:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2009, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9346:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2020, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2014, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9386:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2016, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "9406:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 2015, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9398:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9398:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2012, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "9369:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2013, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9369:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9369:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2011, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "9359:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9359:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9346:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2025, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2010, - "src": "9455:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2026, - "name": "feeFlat", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2004, - "src": "9459:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2022, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2002, - "src": "9434:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2023, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "9434:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "9434:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 2027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9434:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9475:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2021, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "9419:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9419:168:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2030, - "nodeType": "ExpressionStatement", - "src": "9419:168:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2031, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9600:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2008, - "id": 2032, - "nodeType": "Return", - "src": "9593:11:8" - } - ] - }, - "documentation": "@notice Set flat fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeFlat Flat fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2034, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeFlat", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2005, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2002, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2034, - "src": "9275:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2001, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "9275:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2004, - "name": "feeFlat", - "nodeType": "VariableDeclaration", - "scope": 2034, - "src": "9294:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2003, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9294:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9274:33:8" - }, - "payable": false, - "returnParameters": { - "id": 2008, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2007, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2034, - "src": "9326:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2006, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9326:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9325:14:8" - }, - "scope": 4622, - "src": "9255:354:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2067, - "nodeType": "Block", - "src": "10190:268:8", - "statements": [ - { - "assignments": [ - 2044 - ], - "declarations": [ - { - "constant": false, - "id": 2044, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2068, - "src": "10196:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2043, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10196:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2054, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d7367", - "id": 2048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10236:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - "value": "fee.msg" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2050, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "10255:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 2049, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10247:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10247:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2046, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "10219:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2047, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10219:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10219:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2045, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "10209:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10209:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10196:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2059, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2044, - "src": "10305:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2060, - "name": "feeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2038, - "src": "10309:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2056, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2036, - "src": "10283:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2057, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "10283:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2058, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBytes", - "nodeType": "MemberAccess", - "referencedDeclaration": 5026, - "src": "10283:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,bytes memory) external returns (bool)" - } - }, - "id": 2061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10283:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2062, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10324:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2055, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "10268:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10268:168:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2064, - "nodeType": "ExpressionStatement", - "src": "10268:168:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10449:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2042, - "id": 2066, - "nodeType": "Return", - "src": "10442:11:8" - } - ] - }, - "documentation": "@notice Set fee message for contract interface\n@dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n@dev Fee messages vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMsg Fee message included in a transaction with fees\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2068, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMsg", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2039, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2036, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2068, - "src": "10125:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2035, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "10125:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2038, - "name": "feeMsg", - "nodeType": "VariableDeclaration", - "scope": 2068, - "src": "10144:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2037, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10144:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10124:33:8" - }, - "payable": false, - "returnParameters": { - "id": 2042, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2041, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2068, - "src": "10176:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2040, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10176:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10175:14:8" - }, - "scope": 4622, - "src": "10106:352:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2101, - "nodeType": "Block", - "src": "11123:279:8", - "statements": [ - { - "assignments": [ - 2078 - ], - "declarations": [ - { - "constant": false, - "id": 2078, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2102, - "src": "11129:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2077, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11129:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2088, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6163636f756e74", - "id": 2082, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - "value": "fee.account" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2084, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "11192:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 2083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11184:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11184:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2080, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "11152:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11152:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11152:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2079, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "11142:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11142:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11129:70:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2093, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2078, - "src": "11244:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2094, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "11248:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2090, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2070, - "src": "11220:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2091, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "11220:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4966, - "src": "11220:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11220:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2096, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11268:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2089, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "11205:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11205:175:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2098, - "nodeType": "ExpressionStatement", - "src": "11205:175:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11393:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2076, - "id": 2100, - "nodeType": "Return", - "src": "11386:11:8" - } - ] - }, - "documentation": "@notice Set fee contract for a contract interface\n@dev feeContract must be a TokenIOFeeContract storage approved contract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@dev | This must be called directly from the interface contract\n@param self Internal storage proxying TokenIOStorage contract\n@param feeContract Set the fee contract for `this` contract address interface\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2102, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2073, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2070, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2102, - "src": "11051:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2069, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "11051:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2072, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 2102, - "src": "11070:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11070:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11050:40:8" - }, - "payable": false, - "returnParameters": { - "id": 2076, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2075, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2102, - "src": "11109:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2074, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11109:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11108:14:8" - }, - "scope": 4622, - "src": "11027:375:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2135, - "nodeType": "Block", - "src": "12037:280:8", - "statements": [ - { - "assignments": [ - 2112 - ], - "declarations": [ - { - "constant": false, - "id": 2112, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2136, - "src": "12043:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2111, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12043:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2120, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d657370616365", - "id": 2116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12083:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - "value": "token.namespace" - }, - { - "argumentTypes": null, - "id": 2117, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2106, - "src": "12102:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2114, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "12066:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12066:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12066:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2113, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "12056:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12056:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12043:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2125, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2112, - "src": "12157:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2127, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "12169:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 2126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12161:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12161:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2122, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2104, - "src": "12133:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2123, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "12133:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4966, - "src": "12133:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12133:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2130, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12183:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "12118:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12118:177:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2132, - "nodeType": "ExpressionStatement", - "src": "12118:177:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12308:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2110, - "id": 2134, - "nodeType": "Return", - "src": "12301:11:8" - } - ] - }, - "documentation": "@notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n@dev | This should only be called once from a token interface contract;\n@dev | This method has an `internal` view\n@dev | This method is experimental and may be deprecated/refactored\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2136, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenNameSpace", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2104, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2136, - "src": "11969:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2103, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "11969:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2106, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2136, - "src": "11988:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2105, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11988:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11968:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2110, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2109, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2136, - "src": "12023:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2108, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12023:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12022:14:8" - }, - "scope": 4622, - "src": "11942:375:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2180, - "nodeType": "Block", - "src": "13115:435:8", - "statements": [ - { - "assignments": [ - 2150 - ], - "declarations": [ - { - "constant": false, - "id": 2150, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13123:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2149, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13123:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2161, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e6b7963", - "id": 2154, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13163:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - "value": "account.kyc" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2156, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2138, - "src": "13198:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2157, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2140, - "src": "13204:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2155, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "13178:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13178:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "13146:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13146:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13146:67:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2151, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "13136:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13136:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13123:91:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2166, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2150, - "src": "13260:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2167, - "name": "isApproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2142, - "src": "13264:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2163, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2138, - "src": "13239:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2164, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "13239:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "13239:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 2168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13239:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13285:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2162, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "13222:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13222:177:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2171, - "nodeType": "ExpressionStatement", - "src": "13222:177:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2173, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2140, - "src": "13494:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2174, - "name": "isApproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2142, - "src": "13503:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2175, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2144, - "src": "13515:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2172, - "name": "KYCApproval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1694, - "src": "13482:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,bool,string memory)" - } - }, - "id": 2176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13482:44:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2177, - "nodeType": "EmitStatement", - "src": "13477:49:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13541:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2148, - "id": 2179, - "nodeType": "Return", - "src": "13534:11:8" - } - ] - }, - "documentation": "@notice Set the KYC approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isApproved Boolean (true/false) KYC approval status for a given account\n@param issuerFirm Firm name for issuing KYC approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2181, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setKYCApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2145, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2138, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13011:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2137, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "13011:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2140, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13030:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2139, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13030:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2142, - "name": "isApproved", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13047:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2141, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13047:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2144, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13064:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2143, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "13064:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13010:72:8" - }, - "payable": false, - "returnParameters": { - "id": 2148, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2147, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2181, - "src": "13101:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2146, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13101:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13100:14:8" - }, - "scope": 4622, - "src": "12987:563:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2225, - "nodeType": "Block", - "src": "14345:419:8", - "statements": [ - { - "assignments": [ - 2195 - ], - "declarations": [ - { - "constant": false, - "id": 2195, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14351:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2194, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14351:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2206, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e616c6c6f776564", - "id": 2199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14391:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - "value": "account.allowed" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2201, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2183, - "src": "14430:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2202, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2185, - "src": "14436:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2200, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "14410:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14410:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2197, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "14374:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14374:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14374:71:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2196, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "14364:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14364:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14351:95:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2211, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2195, - "src": "14488:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2212, - "name": "isAllowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "14492:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2208, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2183, - "src": "14467:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2209, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "14467:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "14467:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 2213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14467:35:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2214, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14510:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2207, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "14452:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14452:170:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2216, - "nodeType": "ExpressionStatement", - "src": "14452:170:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2218, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2185, - "src": "14711:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2219, - "name": "isAllowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "14720:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2220, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "14731:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2217, - "name": "AccountStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1702, - "src": "14697:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,bool,string memory)" - } - }, - "id": 2221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14697:45:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2222, - "nodeType": "EmitStatement", - "src": "14692:50:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2223, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14755:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2193, - "id": 2224, - "nodeType": "Return", - "src": "14748:11:8" - } - ] - }, - "documentation": "@notice Set the global approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isAllowed Boolean (true/false) global status for a given account\n@param issuerFirm Firm name for issuing approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2226, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2183, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14242:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2182, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "14242:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2185, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14261:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2184, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14261:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2187, - "name": "isAllowed", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14278:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2186, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14278:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2189, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14294:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2188, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14294:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14241:71:8" - }, - "payable": false, - "returnParameters": { - "id": 2193, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2192, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2226, - "src": "14331:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2191, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14331:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14330:14:8" - }, - "scope": 4622, - "src": "14216:548:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2259, - "nodeType": "Block", - "src": "15649:289:8", - "statements": [ - { - "assignments": [ - 2238 - ], - "declarations": [ - { - "constant": false, - "id": 2238, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15655:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2237, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15655:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2246, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6d61737465722e6163636f756e74", - "id": 2242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15695:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - "value": "master.account" - }, - { - "argumentTypes": null, - "id": 2243, - "name": "forwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "15713:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2240, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "15678:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15678:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15678:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2239, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "15668:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15668:63:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15655:76:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2251, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2238, - "src": "15776:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2252, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2230, - "src": "15780:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2248, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2228, - "src": "15752:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2249, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "15752:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4966, - "src": "15752:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15752:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2254, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15804:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2247, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "15737:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15737:179:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2256, - "nodeType": "ExpressionStatement", - "src": "15737:179:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15929:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2236, - "id": 2258, - "nodeType": "Return", - "src": "15922:11:8" - } - ] - }, - "documentation": "@notice Set a forwarded address for an account.\n@dev | This method has an `internal` view\n@dev | Forwarded accounts must be set by an authority in case of account recovery;\n@dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n@dev | All transactions will be logged under the same KYC information as the original account holder;\n@param self Internal storage proxying TokenIOStorage contract\n@param originalAccount Original registered Ethereum address of the account holder\n@param forwardedAccount Forwarded Ethereum address of the account holder\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2260, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setForwardedAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2233, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2228, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15547:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2227, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "15547:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2230, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15566:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15566:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2232, - "name": "forwardedAccount", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15591:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2231, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15591:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15546:70:8" - }, - "payable": false, - "returnParameters": { - "id": 2236, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2235, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2260, - "src": "15635:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2234, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15635:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15634:14:8" - }, - "scope": 4622, - "src": "15518:420:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2297, - "nodeType": "Block", - "src": "16517:242:8", - "statements": [ - { - "assignments": [ - 2270 - ], - "declarations": [ - { - "constant": false, - "id": 2270, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16523:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2269, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16523:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2278, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6d61737465722e6163636f756e74", - "id": 2274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16563:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - "value": "master.account" - }, - { - "argumentTypes": null, - "id": 2275, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2264, - "src": "16581:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2272, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "16546:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16546:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16546:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2271, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "16536:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16536:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16523:67:8" - }, - { - "assignments": [ - 2280 - ], - "declarations": [ - { - "constant": false, - "id": 2280, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16596:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2279, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16596:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2286, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2284, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2270, - "src": "16646:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2281, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2262, - "src": "16622:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2282, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "16622:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5180, - "src": "16622:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16622:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16596:53:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2287, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "16659:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2288, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16678:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "16659:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2295, - "nodeType": "Block", - "src": "16726:29:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2293, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2264, - "src": "16741:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2268, - "id": 2294, - "nodeType": "Return", - "src": "16734:14:8" - } - ] - }, - "id": 2296, - "nodeType": "IfStatement", - "src": "16655:100:8", - "trueBody": { - "id": 2292, - "nodeType": "Block", - "src": "16683:37:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2290, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "16698:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2268, - "id": 2291, - "nodeType": "Return", - "src": "16691:22:8" - } - ] - } - } - ] - }, - "documentation": "@notice Get the original address for a forwarded account\n@dev | This method has an `internal` view\n@dev | Will return the registered account for the given forwarded account\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}", - "id": 2298, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getForwardedAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2265, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2262, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16431:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2261, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "16431:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2264, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16450:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2263, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16450:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16430:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2268, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2267, - "name": "registeredAccount", - "nodeType": "VariableDeclaration", - "scope": 2298, - "src": "16490:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2266, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16490:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16489:27:8" - }, - "scope": 4622, - "src": "16402:357:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2326, - "nodeType": "Block", - "src": "17258:143:8", - "statements": [ - { - "assignments": [ - 2308 - ], - "declarations": [ - { - "constant": false, - "id": 2308, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17266:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2307, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17266:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2319, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e6b7963", - "id": 2312, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17306:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - "value": "account.kyc" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2314, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2300, - "src": "17341:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2315, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2302, - "src": "17347:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2313, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "17321:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17321:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2310, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "17289:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2311, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17289:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17289:67:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2309, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "17279:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17279:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17266:91:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2323, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2308, - "src": "17393:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2320, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2300, - "src": "17372:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2321, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "17372:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "17372:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 2324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17372:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2306, - "id": 2325, - "nodeType": "Return", - "src": "17365:31:8" - } - ] - }, - "documentation": "@notice Get KYC approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the KYC approval status for an account holder\" }", - "id": 2327, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getKYCApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2300, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17186:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2299, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "17186:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2302, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17205:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2301, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17205:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17185:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2306, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2305, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17245:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2304, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17245:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17244:13:8" - }, - "scope": 4622, - "src": "17162:239:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2355, - "nodeType": "Block", - "src": "17908:143:8", - "statements": [ - { - "assignments": [ - 2337 - ], - "declarations": [ - { - "constant": false, - "id": 2337, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2356, - "src": "17914:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2336, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17914:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2348, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e616c6c6f776564", - "id": 2341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17954:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - "value": "account.allowed" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2343, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "17993:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2331, - "src": "17999:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2342, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "17973:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17973:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2339, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "17937:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2340, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17937:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17937:71:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2338, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "17927:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17927:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17914:95:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2352, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2337, - "src": "18043:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2349, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "18022:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2350, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "18022:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "18022:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 2353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18022:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2335, - "id": 2354, - "nodeType": "Return", - "src": "18015:31:8" - } - ] - }, - "documentation": "@notice Get global approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the global approval status for an account holder\" }", - "id": 2356, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2332, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2329, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2356, - "src": "17836:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2328, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "17836:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2331, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2356, - "src": "17855:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2330, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17855:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17835:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2335, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2334, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 2356, - "src": "17895:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2333, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17895:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17894:13:8" - }, - "scope": 4622, - "src": "17810:241:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2381, - "nodeType": "Block", - "src": "18535:120:8", - "statements": [ - { - "assignments": [ - 2366 - ], - "declarations": [ - { - "constant": false, - "id": 2366, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2382, - "src": "18541:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2365, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "18541:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2374, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d657370616365", - "id": 2370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18581:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - "value": "token.namespace" - }, - { - "argumentTypes": null, - "id": 2371, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2360, - "src": "18600:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2368, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "18564:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18564:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18564:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2367, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "18554:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18554:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18541:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2378, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2366, - "src": "18647:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2375, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2358, - "src": "18623:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2376, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "18623:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5180, - "src": "18623:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18623:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2364, - "id": 2380, - "nodeType": "Return", - "src": "18616:34:8" - } - ] - }, - "documentation": "@notice Get the contract interface address associated with token symbol\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }", - "id": 2382, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenNameSpace", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2358, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2382, - "src": "18451:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2357, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "18451:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2360, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2382, - "src": "18470:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2359, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "18470:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18450:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2364, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2363, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2382, - "src": "18510:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2362, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18510:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18509:25:8" - }, - "scope": 4622, - "src": "18424:231:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2407, - "nodeType": "Block", - "src": "19153:121:8", - "statements": [ - { - "assignments": [ - 2392 - ], - "declarations": [ - { - "constant": false, - "id": 2392, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2408, - "src": "19159:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2391, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19159:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2400, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d65", - "id": 2396, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19199:12:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - "value": "token.name" - }, - { - "argumentTypes": null, - "id": 2397, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2386, - "src": "19213:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2394, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "19182:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2395, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19182:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19182:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2393, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "19172:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19172:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19159:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2404, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "19266:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2401, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "19243:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2402, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "19243:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "19243:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19243:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2390, - "id": 2406, - "nodeType": "Return", - "src": "19236:33:8" - } - ] - }, - "documentation": "@notice Get the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenName\" : \"Name of the token contract\"}", - "id": 2408, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2387, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2384, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2408, - "src": "19068:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2383, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "19068:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2386, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2408, - "src": "19087:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2385, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19087:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19067:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2390, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2389, - "name": "tokenName", - "nodeType": "VariableDeclaration", - "scope": 2408, - "src": "19135:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2388, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "19135:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19134:18:8" - }, - "scope": 4622, - "src": "19046:228:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2433, - "nodeType": "Block", - "src": "19782:123:8", - "statements": [ - { - "assignments": [ - 2418 - ], - "declarations": [ - { - "constant": false, - "id": 2418, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2434, - "src": "19788:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2417, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19788:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2426, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e73796d626f6c", - "id": 2422, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19828:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - "value": "token.symbol" - }, - { - "argumentTypes": null, - "id": 2423, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2412, - "src": "19844:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2420, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "19811:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19811:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19811:49:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2419, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "19801:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19801:60:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19788:73:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2430, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2418, - "src": "19897:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2427, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "19874:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2428, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "19874:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "19874:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19874:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2416, - "id": 2432, - "nodeType": "Return", - "src": "19867:33:8" - } - ] - }, - "documentation": "@notice Get the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenSymbol\" : \"Symbol of the token contract\"}", - "id": 2434, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenSymbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2410, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2434, - "src": "19695:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2409, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "19695:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2412, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2434, - "src": "19714:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2411, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19714:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19694:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2415, - "name": "tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 2434, - "src": "19762:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2414, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "19762:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19761:20:8" - }, - "scope": 4622, - "src": "19671:234:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2459, - "nodeType": "Block", - "src": "20426:120:8", - "statements": [ - { - "assignments": [ - 2444 - ], - "declarations": [ - { - "constant": false, - "id": 2444, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2460, - "src": "20432:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2443, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "20432:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2452, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e746c61", - "id": 2448, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20472:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - "value": "token.tla" - }, - { - "argumentTypes": null, - "id": 2449, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2438, - "src": "20485:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2446, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "20455:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2447, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20455:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20455:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2445, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "20445:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20445:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20432:70:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2456, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2444, - "src": "20538:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2453, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2436, - "src": "20515:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2454, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "20515:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2455, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "20515:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20515:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2442, - "id": 2458, - "nodeType": "Return", - "src": "20508:33:8" - } - ] - }, - "documentation": "@notice Get the token Three letter abbreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenTLA\" : \"TLA of the token contract\"}", - "id": 2460, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenTLA", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2439, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2436, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2460, - "src": "20342:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2435, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "20342:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2438, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2460, - "src": "20361:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2437, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20361:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20341:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2442, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2441, - "name": "tokenTLA", - "nodeType": "VariableDeclaration", - "scope": 2460, - "src": "20409:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2440, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "20409:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20408:17:8" - }, - "scope": 4622, - "src": "20321:225:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2485, - "nodeType": "Block", - "src": "21055:124:8", - "statements": [ - { - "assignments": [ - 2470 - ], - "declarations": [ - { - "constant": false, - "id": 2470, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "21061:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2469, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "21061:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2478, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e76657273696f6e", - "id": 2474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21101:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - "value": "token.version" - }, - { - "argumentTypes": null, - "id": 2475, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2464, - "src": "21118:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2472, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "21084:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21084:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21084:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2471, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "21074:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21074:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21061:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2482, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2470, - "src": "21171:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2479, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2462, - "src": "21148:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2480, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "21148:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "21148:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21148:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2468, - "id": 2484, - "nodeType": "Return", - "src": "21141:33:8" - } - ] - }, - "documentation": "@notice Get the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenVersion\" : \"Semantic version of the token contract\"}", - "id": 2486, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenVersion", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2465, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2462, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "20980:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2461, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "20980:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2464, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "20999:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2463, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20999:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20979:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2467, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "21047:6:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2466, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "21047:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21046:8:8" - }, - "scope": 4622, - "src": "20955:224:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2511, - "nodeType": "Block", - "src": "21690:116:8", - "statements": [ - { - "assignments": [ - 2496 - ], - "declarations": [ - { - "constant": false, - "id": 2496, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2512, - "src": "21696:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2495, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "21696:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2504, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e646563696d616c73", - "id": 2500, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21736:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - "value": "token.decimals" - }, - { - "argumentTypes": null, - "id": 2501, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2490, - "src": "21754:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2498, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "21719:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2499, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21719:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21719:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2497, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "21709:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21709:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21696:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2508, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2496, - "src": "21798:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2505, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2488, - "src": "21777:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "21777:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "21777:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21777:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2494, - "id": 2510, - "nodeType": "Return", - "src": "21770:31:8" - } - ] - }, - "documentation": "@notice Get the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"tokenDecimals\" : \"Decimals of the token contract\"}", - "id": 2512, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenDecimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2491, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2488, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2512, - "src": "21611:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2487, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "21611:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2490, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2512, - "src": "21630:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2489, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "21630:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21610:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2494, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2493, - "name": "tokenDecimals", - "nodeType": "VariableDeclaration", - "scope": 2512, - "src": "21670:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2492, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "21670:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21669:20:8" - }, - "scope": 4622, - "src": "21585:221:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2537, - "nodeType": "Block", - "src": "22295:116:8", - "statements": [ - { - "assignments": [ - 2522 - ], - "declarations": [ - { - "constant": false, - "id": 2522, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2538, - "src": "22301:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2521, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "22301:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2530, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 2526, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22341:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "id": 2527, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2516, - "src": "22352:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2524, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "22324:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22324:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22324:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2523, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "22314:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22314:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "22301:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2534, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "22403:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2531, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2514, - "src": "22382:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2532, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "22382:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "22382:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22382:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2520, - "id": 2536, - "nodeType": "Return", - "src": "22375:31:8" - } - ] - }, - "documentation": "@notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}", - "id": 2538, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeBPS", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2517, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2514, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2538, - "src": "22215:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2513, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "22215:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2516, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2538, - "src": "22234:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22234:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22214:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2520, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2519, - "name": "feeBps", - "nodeType": "VariableDeclaration", - "scope": 2538, - "src": "22282:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2518, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "22282:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22281:13:8" - }, - "scope": 4622, - "src": "22196:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2563, - "nodeType": "Block", - "src": "22890:116:8", - "statements": [ - { - "assignments": [ - 2548 - ], - "declarations": [ - { - "constant": false, - "id": 2548, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2564, - "src": "22896:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2547, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "22896:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2556, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 2552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22936:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "id": 2553, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2542, - "src": "22947:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2550, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "22919:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22919:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22919:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2549, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "22909:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22909:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "22896:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2560, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2548, - "src": "22998:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2557, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2540, - "src": "22977:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2558, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "22977:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "22977:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22977:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2546, - "id": 2562, - "nodeType": "Return", - "src": "22970:31:8" - } - ] - }, - "documentation": "@notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}", - "id": 2564, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2543, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2540, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2564, - "src": "22810:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2539, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "22810:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2542, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2564, - "src": "22829:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2541, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22829:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22809:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2546, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2545, - "name": "feeMin", - "nodeType": "VariableDeclaration", - "scope": 2564, - "src": "22877:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2544, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "22877:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22876:13:8" - }, - "scope": 4622, - "src": "22791:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2589, - "nodeType": "Block", - "src": "23485:116:8", - "statements": [ - { - "assignments": [ - 2574 - ], - "declarations": [ - { - "constant": false, - "id": 2574, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2590, - "src": "23491:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2573, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "23491:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2582, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 2578, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23531:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "id": 2579, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2568, - "src": "23542:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2576, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "23514:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23514:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23514:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2575, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "23504:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23504:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "23491:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2586, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2574, - "src": "23593:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2583, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2566, - "src": "23572:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2584, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "23572:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "23572:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23572:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2572, - "id": 2588, - "nodeType": "Return", - "src": "23565:31:8" - } - ] - }, - "documentation": "@notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}", - "id": 2590, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMax", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2569, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2566, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2590, - "src": "23405:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2565, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "23405:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2568, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2590, - "src": "23424:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2567, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23424:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23404:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2572, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2571, - "name": "feeMax", - "nodeType": "VariableDeclaration", - "scope": 2590, - "src": "23472:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2570, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "23472:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23471:13:8" - }, - "scope": 4622, - "src": "23386:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2615, - "nodeType": "Block", - "src": "24077:117:8", - "statements": [ - { - "assignments": [ - 2600 - ], - "declarations": [ - { - "constant": false, - "id": 2600, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2616, - "src": "24083:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2599, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "24083:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2608, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24123:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "id": 2605, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2594, - "src": "24135:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2602, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "24106:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2603, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24106:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24106:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2601, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "24096:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24096:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24083:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2612, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2600, - "src": "24186:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2609, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2592, - "src": "24165:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "24165:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "24165:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24165:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2598, - "id": 2614, - "nodeType": "Return", - "src": "24158:31:8" - } - ] - }, - "documentation": "@notice Get the flat fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}", - "id": 2616, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeFlat", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2592, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2616, - "src": "23996:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2591, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "23996:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2594, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2616, - "src": "24015:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2593, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24015:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23995:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2597, - "name": "feeFlat", - "nodeType": "VariableDeclaration", - "scope": 2616, - "src": "24063:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2596, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "24063:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24062:14:8" - }, - "scope": 4622, - "src": "23976:218:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2641, - "nodeType": "Block", - "src": "24682:117:8", - "statements": [ - { - "assignments": [ - 2626 - ], - "declarations": [ - { - "constant": false, - "id": 2626, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2642, - "src": "24688:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2625, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "24688:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2634, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d7367", - "id": 2630, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24728:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - "value": "fee.msg" - }, - { - "argumentTypes": null, - "id": 2631, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2620, - "src": "24739:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2628, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "24711:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2629, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24711:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24711:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2627, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "24701:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24701:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24688:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2638, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2626, - "src": "24791:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2635, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2618, - "src": "24769:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2636, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "24769:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBytes", - "nodeType": "MemberAccess", - "referencedDeclaration": 5216, - "src": "24769:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes32) view external returns (bytes memory)" - } - }, - "id": 2639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24769:25:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2624, - "id": 2640, - "nodeType": "Return", - "src": "24762:32:8" - } - ] - }, - "documentation": "@notice Get the flat message of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}", - "id": 2642, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMsg", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2621, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2618, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2642, - "src": "24601:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2617, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "24601:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2620, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2642, - "src": "24620:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24620:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24600:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2624, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2623, - "name": "feeMsg", - "nodeType": "VariableDeclaration", - "scope": 2642, - "src": "24668:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2622, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "24668:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24667:14:8" - }, - "scope": 4622, - "src": "24582:217:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2672, - "nodeType": "Block", - "src": "25356:276:8", - "statements": [ - { - "assignments": [ - 2652 - ], - "declarations": [ - { - "constant": false, - "id": 2652, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2673, - "src": "25362:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2651, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "25362:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2659, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e636f6e74726163742e6d6173746572", - "id": 2656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25402:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - }, - "value": "fee.contract.master" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2654, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "25385:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2655, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25385:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2657, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25385:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2653, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "25375:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25375:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25362:63:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2664, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2652, - "src": "25470:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2665, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2646, - "src": "25474:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2661, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2644, - "src": "25446:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2662, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "25446:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4966, - "src": "25446:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25446:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25498:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2660, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "25431:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25431:179:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2669, - "nodeType": "ExpressionStatement", - "src": "25431:179:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25623:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2650, - "id": 2671, - "nodeType": "Return", - "src": "25616:11:8" - } - ] - }, - "documentation": "@notice Set the master fee contract used as the default fee contract when none is provided\n@dev | This method has an `internal` view\n@dev | This value is set in the TokenIOAuthority contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2673, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setMasterFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2644, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2673, - "src": "25280:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2643, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "25280:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2646, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2673, - "src": "25299:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2645, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25299:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25279:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2650, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2649, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2673, - "src": "25342:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2648, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "25342:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25341:14:8" - }, - "scope": 4622, - "src": "25250:382:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2695, - "nodeType": "Block", - "src": "26025:114:8", - "statements": [ - { - "assignments": [ - 2681 - ], - "declarations": [ - { - "constant": false, - "id": 2681, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2696, - "src": "26031:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2680, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "26031:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2688, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e636f6e74726163742e6d6173746572", - "id": 2685, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26071:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - }, - "value": "fee.contract.master" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2683, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "26054:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26054:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2686, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26054:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2682, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "26044:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2687, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26044:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26031:63:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2692, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2681, - "src": "26131:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2689, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "26107:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2690, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "26107:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5180, - "src": "26107:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26107:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2679, - "id": 2694, - "nodeType": "Return", - "src": "26100:34:8" - } - ] - }, - "documentation": "@notice Get the master fee contract set via the TokenIOAuthority contract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}", - "id": 2696, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getMasterFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2676, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2675, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2696, - "src": "25956:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2674, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "25956:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25955:19:8" - }, - "payable": false, - "returnParameters": { - "id": 2679, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2678, - "name": "masterFeeContract", - "nodeType": "VariableDeclaration", - "scope": 2696, - "src": "25998:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2677, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25998:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25997:27:8" - }, - "scope": 4622, - "src": "25926:213:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2735, - "nodeType": "Block", - "src": "26838:252:8", - "statements": [ - { - "assignments": [ - 2706 - ], - "declarations": [ - { - "constant": false, - "id": 2706, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26844:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2705, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "26844:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2714, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6163636f756e74", - "id": 2710, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26884:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - "value": "fee.account" - }, - { - "argumentTypes": null, - "id": 2711, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "26899:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2708, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "26867:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26867:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26867:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2707, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "26857:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26857:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26844:72:8" - }, - { - "assignments": [ - 2716 - ], - "declarations": [ - { - "constant": false, - "id": 2716, - "name": "feeAccount", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26923:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2715, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26923:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2722, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2720, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2706, - "src": "26968:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2717, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2698, - "src": "26944:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2718, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "26944:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5180, - "src": "26944:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26944:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26923:48:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2723, - "name": "feeAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2716, - "src": "26981:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26995:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "26981:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2733, - "nodeType": "Block", - "src": "27054:32:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2731, - "name": "feeAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2716, - "src": "27069:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2704, - "id": 2732, - "nodeType": "Return", - "src": "27062:17:8" - } - ] - }, - "id": 2734, - "nodeType": "IfStatement", - "src": "26977:109:8", - "trueBody": { - "id": 2730, - "nodeType": "Block", - "src": "27000:48:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2727, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2698, - "src": "27036:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - ], - "id": 2726, - "name": "getMasterFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2696, - "src": "27015:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer) view returns (address)" - } - }, - "id": 2728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27015:26:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2704, - "id": 2729, - "nodeType": "Return", - "src": "27008:33:8" - } - ] - } - } - ] - }, - "documentation": "@notice Get the fee contract set for a contract interface\n@dev | This method has an `internal` view\n@dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n@dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}", - "id": 2736, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2701, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2698, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26750:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2697, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "26750:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2700, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26769:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2699, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26769:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26749:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2704, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2703, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "26817:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2702, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26817:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26816:21:8" - }, - "scope": 4622, - "src": "26726:364:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2761, - "nodeType": "Block", - "src": "27553:114:8", - "statements": [ - { - "assignments": [ - 2746 - ], - "declarations": [ - { - "constant": false, - "id": 2746, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2762, - "src": "27559:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2745, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "27559:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2754, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 2750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27599:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 2751, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2740, - "src": "27615:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2748, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "27582:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2749, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27582:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2752, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27582:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2747, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "27572:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27572:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "27559:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2758, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2746, - "src": "27659:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2755, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2738, - "src": "27638:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2756, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "27638:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "27638:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27638:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2744, - "id": 2760, - "nodeType": "Return", - "src": "27631:31:8" - } - ] - }, - "documentation": "@notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"supply\" : \"Returns the token supply of the given currency\"}", - "id": 2762, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2738, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2762, - "src": "27481:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2737, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "27481:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2740, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2762, - "src": "27500:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2739, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "27500:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27480:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2744, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2743, - "name": "supply", - "nodeType": "VariableDeclaration", - "scope": 2762, - "src": "27540:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2742, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "27540:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27539:13:8" - }, - "scope": 4622, - "src": "27457:210:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2799, - "nodeType": "Block", - "src": "28194:189:8", - "statements": [ - { - "assignments": [ - 2776 - ], - "declarations": [ - { - "constant": false, - "id": 2776, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28200:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2775, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "28200:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2792, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 2780, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28240:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 2781, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2766, - "src": "28259:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2783, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2764, - "src": "28289:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2784, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2768, - "src": "28295:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2782, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "28269:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28269:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2787, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2764, - "src": "28325:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2788, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2770, - "src": "28331:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2786, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "28305:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28305:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2778, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "28223:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28223:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28223:117:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2777, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "28213:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28213:128:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "28200:141:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2796, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "28375:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2793, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2764, - "src": "28354:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2794, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "28354:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "28354:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28354:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2774, - "id": 2798, - "nodeType": "Return", - "src": "28347:31:8" - } - ] - }, - "documentation": "@notice Get the token spender allowance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param spender Ethereum address of spender\n@return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}", - "id": 2800, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2764, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28085:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2763, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "28085:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2766, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28104:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2765, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "28104:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2768, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28121:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2767, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28121:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2770, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28138:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2769, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28138:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28084:70:8" - }, - "payable": false, - "returnParameters": { - "id": 2774, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2773, - "name": "allowance", - "nodeType": "VariableDeclaration", - "scope": 2800, - "src": "28178:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2772, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "28178:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28177:16:8" - }, - "scope": 4622, - "src": "28058:325:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2831, - "nodeType": "Block", - "src": "28906:151:8", - "statements": [ - { - "assignments": [ - 2812 - ], - "declarations": [ - { - "constant": false, - "id": 2812, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28912:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "28912:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2824, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 2816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28952:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 2817, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2804, - "src": "28969:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2819, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2802, - "src": "28999:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2820, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2806, - "src": "29005:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2818, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "28979:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28979:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2814, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "28935:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28935:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28935:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2813, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "28925:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28925:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "28912:103:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2828, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2812, - "src": "29049:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2825, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2802, - "src": "29028:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2826, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "29028:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "29028:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29028:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2810, - "id": 2830, - "nodeType": "Return", - "src": "29021:31:8" - } - ] - }, - "documentation": "@notice Get the token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"balance\" : \"Return the balance of a given account for a specified currency\"}", - "id": 2832, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2802, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28816:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2801, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "28816:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2804, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28835:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2803, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "28835:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2806, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28852:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2805, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28852:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28815:53:8" - }, - "payable": false, - "returnParameters": { - "id": 2810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2809, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 2832, - "src": "28892:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2808, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "28892:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28891:14:8" - }, - "scope": 4622, - "src": "28791:266:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2863, - "nodeType": "Block", - "src": "29612:150:8", - "statements": [ - { - "assignments": [ - 2844 - ], - "declarations": [ - { - "constant": false, - "id": 2844, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29618:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2843, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "29618:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2856, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e66726f7a656e", - "id": 2848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "29658:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - "value": "token.frozen" - }, - { - "argumentTypes": null, - "id": 2849, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2836, - "src": "29674:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2851, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "29704:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2852, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2838, - "src": "29710:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2850, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "29684:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29684:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2846, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "29641:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "29641:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29641:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2845, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "29631:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29631:89:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "29618:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2860, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2844, - "src": "29754:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2857, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "29733:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2858, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "29733:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "29733:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29733:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2842, - "id": 2862, - "nodeType": "Return", - "src": "29726:31:8" - } - ] - }, - "documentation": "@notice Get the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}", - "id": 2864, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenFrozenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2839, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2834, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29516:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2833, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "29516:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2836, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29535:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2835, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "29535:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2838, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29552:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "29552:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "29515:53:8" - }, - "payable": false, - "returnParameters": { - "id": 2842, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2841, - "name": "frozenBalance", - "nodeType": "VariableDeclaration", - "scope": 2864, - "src": "29592:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2840, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "29592:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "29591:20:8" - }, - "scope": 4622, - "src": "29485:277:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2903, - "nodeType": "Block", - "src": "30358:303:8", - "statements": [ - { - "assignments": [ - 2878 - ], - "declarations": [ - { - "constant": false, - "id": 2878, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30364:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2877, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "30364:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2890, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e66726f7a656e", - "id": 2882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30404:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - "value": "token.frozen" - }, - { - "argumentTypes": null, - "id": 2883, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2868, - "src": "30420:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2885, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2866, - "src": "30450:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2886, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "30456:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2884, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "30430:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30430:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2880, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "30387:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "30387:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30387:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2879, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "30377:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30377:89:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "30364:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2895, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2878, - "src": "30508:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2896, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2872, - "src": "30512:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2892, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2866, - "src": "30487:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2893, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "30487:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "30487:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 2897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30487:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30527:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2891, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "30472:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30472:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2900, - "nodeType": "ExpressionStatement", - "src": "30472:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30652:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2876, - "id": 2902, - "nodeType": "Return", - "src": "30645:11:8" - } - ] - }, - "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Amount of tokens to freeze for account\n@return { \"success\" : \"Return true if successfully called from another contract\"}", - "id": 2904, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenFrozenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2873, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2866, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30260:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2865, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "30260:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2868, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30279:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2867, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "30279:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2870, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30296:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2869, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "30296:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2872, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30313:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2871, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "30313:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "30259:66:8" - }, - "payable": false, - "returnParameters": { - "id": 2876, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2875, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "30344:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2874, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "30344:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "30343:14:8" - }, - "scope": 4622, - "src": "30229:432:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3003, - "nodeType": "Block", - "src": "31192:598:8", - "statements": [ - { - "assignments": [ - 2916 - ], - "declarations": [ - { - "constant": false, - "id": 2916, - "name": "maxFee", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31199:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2915, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31199:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2928, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 2923, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31261:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "id": 2924, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2908, - "src": "31272:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2921, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "31244:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31244:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31244:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2920, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "31234:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31234:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2917, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "31213:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2918, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "31213:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "31213:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31213:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31199:91:8" - }, - { - "assignments": [ - 2930 - ], - "declarations": [ - { - "constant": false, - "id": 2930, - "name": "minFee", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31296:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2929, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31296:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2942, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 2937, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31358:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "id": 2938, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2908, - "src": "31369:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2935, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "31341:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2936, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31341:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31341:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2934, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "31331:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31331:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2931, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "31310:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2932, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "31310:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "31310:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31310:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31296:91:8" - }, - { - "assignments": [ - 2944 - ], - "declarations": [ - { - "constant": false, - "id": 2944, - "name": "bpsFee", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31393:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2943, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31393:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2956, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 2951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31455:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "id": 2952, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2908, - "src": "31466:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2949, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "31438:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31438:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31438:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2948, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "31428:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31428:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2945, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "31407:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2946, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "31407:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "31407:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31407:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31393:91:8" - }, - { - "assignments": [ - 2958 - ], - "declarations": [ - { - "constant": false, - "id": 2958, - "name": "flatFee", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31490:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2957, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31490:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2970, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31553:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "id": 2966, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2908, - "src": "31565:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2963, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "31536:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31536:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31536:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2962, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "31526:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31526:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2959, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "31505:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2960, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "31505:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "31505:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31505:78:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31490:93:8" - }, - { - "assignments": [ - 2972 - ], - "declarations": [ - { - "constant": false, - "id": 2972, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31589:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2971, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31589:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2985, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2983, - "name": "flatFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2958, - "src": "31639:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3130303030", - "id": 2979, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31627:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - }, - "value": "10000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2975, - "name": "bpsFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2944, - "src": "31614:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2973, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2910, - "src": "31603:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "31603:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31603:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2977, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31602:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "31602:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31602:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2981, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31601:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "31601:37:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31601:46:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31589:58:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2986, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "31658:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2987, - "name": "maxFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2916, - "src": "31665:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31658:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2992, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "31711:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 2993, - "name": "minFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "31718:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31711:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3000, - "nodeType": "Block", - "src": "31760:26:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2998, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "31775:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2914, - "id": 2999, - "nodeType": "Return", - "src": "31768:11:8" - } - ] - }, - "id": 3001, - "nodeType": "IfStatement", - "src": "31707:79:8", - "trueBody": { - "id": 2997, - "nodeType": "Block", - "src": "31726:28:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2995, - "name": "minFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "31741:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2914, - "id": 2996, - "nodeType": "Return", - "src": "31734:13:8" - } - ] - } - }, - "id": 3002, - "nodeType": "IfStatement", - "src": "31654:132:8", - "trueBody": { - "id": 2991, - "nodeType": "Block", - "src": "31673:28:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2989, - "name": "maxFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2916, - "src": "31688:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2914, - "id": 2990, - "nodeType": "Return", - "src": "31681:13:8" - } - ] - } - } - ] - }, - "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the fee contract\n@param amount Transaction value\n@return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }", - "id": 3004, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "calculateFees", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2906, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31091:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2905, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "31091:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2908, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31110:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2907, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "31110:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2910, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31135:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2909, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31135:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "31090:57:8" - }, - "payable": false, - "returnParameters": { - "id": 2914, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2913, - "name": "calculatedFees", - "nodeType": "VariableDeclaration", - "scope": 3004, - "src": "31171:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2912, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31171:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "31170:21:8" - }, - "scope": 4622, - "src": "31068:722:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3033, - "nodeType": "Block", - "src": "32390:334:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3017, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3006, - "src": "32425:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3018, - "name": "accountA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3008, - "src": "32431:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3016, - "name": "verifyAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3062, - "src": "32411:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32411:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", - "id": 3020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32448:92:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - }, - "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - } - ], - "id": 3015, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "32396:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32396:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3022, - "nodeType": "ExpressionStatement", - "src": "32396:150:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3025, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3006, - "src": "32581:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3026, - "name": "accountB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3010, - "src": "32587:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3024, - "name": "verifyAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3062, - "src": "32567:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32567:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", - "id": 3028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32604:92:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - }, - "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - } - ], - "id": 3023, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "32552:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32552:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3030, - "nodeType": "ExpressionStatement", - "src": "32552:150:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3031, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32715:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3014, - "id": 3032, - "nodeType": "Return", - "src": "32708:11:8" - } - ] - }, - "documentation": "@notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param accountA Ethereum address of first account holder to verify\n@param accountB Ethereum address of second account holder to verify\n@return { \"verified\" : \"Returns true if both accounts are successfully verified\" }", - "id": 3034, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyAccounts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3006, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3034, - "src": "32297:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3005, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "32297:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3008, - "name": "accountA", - "nodeType": "VariableDeclaration", - "scope": 3034, - "src": "32316:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "32316:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3010, - "name": "accountB", - "nodeType": "VariableDeclaration", - "scope": 3034, - "src": "32334:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3009, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "32334:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32296:55:8" - }, - "payable": false, - "returnParameters": { - "id": 3014, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3013, - "name": "verified", - "nodeType": "VariableDeclaration", - "scope": 3034, - "src": "32375:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3012, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "32375:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32374:15:8" - }, - "scope": 4622, - "src": "32273:451:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3061, - "nodeType": "Block", - "src": "33214:262:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3045, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3036, - "src": "33250:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3046, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "33256:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3044, - "name": "getKYCApproval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2327, - "src": "33235:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33235:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e7420646f6573206e6f742068617665204b594320617070726f76616c2e", - "id": 3048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33272:44:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", - "typeString": "literal_string \"Error: Account does not have KYC approval.\"" - }, - "value": "Error: Account does not have KYC approval." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", - "typeString": "literal_string \"Error: Account does not have KYC approval.\"" - } - ], - "id": 3043, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "33220:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33220:102:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3050, - "nodeType": "ExpressionStatement", - "src": "33220:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3053, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3036, - "src": "33360:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3054, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "33366:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3052, - "name": "getAccountStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2356, - "src": "33343:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33343:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e7420737461747573206973206066616c7365602e204163636f756e7420737461747573206d757374206265206074727565602e", - "id": 3056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33382:66:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", - "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" - }, - "value": "Error: Account status is `false`. Account status must be `true`." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", - "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" - } - ], - "id": 3051, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "33328:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33328:126:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3058, - "nodeType": "ExpressionStatement", - "src": "33328:126:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33467:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3042, - "id": 3060, - "nodeType": "Return", - "src": "33460:11:8" - } - ] - }, - "documentation": "@notice Verified KYC and global status for a single account and return true or throw if account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder to verify\n@return { \"verified\" : \"Returns true if account is successfully verified\" }", - "id": 3062, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3039, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3036, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3062, - "src": "33140:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3035, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "33140:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3038, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3062, - "src": "33159:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3037, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "33159:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33139:36:8" - }, - "payable": false, - "returnParameters": { - "id": 3042, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3041, - "name": "verified", - "nodeType": "VariableDeclaration", - "scope": 3062, - "src": "33199:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3040, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "33199:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33198:15:8" - }, - "scope": 4622, - "src": "33117:359:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3155, - "nodeType": "Block", - "src": "34346:799:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3079, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3068, - "src": "34368:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "34360:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34360:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34375:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "34360:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f6020616464726573732063616e6e6f74206265206e756c6c2e", - "id": 3083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34380:37:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", - "typeString": "literal_string \"Error: `to` address cannot be null.\"" - }, - "value": "Error: `to` address cannot be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", - "typeString": "literal_string \"Error: `to` address cannot be null.\"" - } - ], - "id": 3077, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34352:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34352:67:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3085, - "nodeType": "ExpressionStatement", - "src": "34352:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3087, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "34433:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34442:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "34433:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060616d6f756e7460206d7573742062652067726561746572207468616e207a65726f", - "id": 3090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34445:43:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", - "typeString": "literal_string \"Error: `amount` must be greater than zero\"" - }, - "value": "Error: `amount` must be greater than zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", - "typeString": "literal_string \"Error: `amount` must be greater than zero\"" - } - ], - "id": 3086, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34425:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34425:64:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3092, - "nodeType": "ExpressionStatement", - "src": "34425:64:8" - }, - { - "assignments": [ - 3094 - ], - "declarations": [ - { - "constant": false, - "id": 3094, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34496:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3093, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "34496:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3101, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3096, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34533:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3098, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "34547:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 3097, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "34539:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34539:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3095, - "name": "getFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2736, - "src": "34518:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34518:35:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34496:57:8" - }, - { - "assignments": [ - 3103 - ], - "declarations": [ - { - "constant": false, - "id": 3103, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34559:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3102, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "34559:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3109, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3105, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34585:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3106, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3094, - "src": "34591:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3107, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "34604:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3104, - "name": "calculateFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "34571:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" - } - }, - "id": 3108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34571:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34559:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3112, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34658:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3113, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "34664:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34664:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3116, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34691:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3117, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3066, - "src": "34697:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3118, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "34707:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3115, - "name": "getFxUSDAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4621, - "src": "34676:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" - } - }, - "id": 3119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34676:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3111, - "name": "setAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4400, - "src": "34633:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 3120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34633:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d6f756e7420666f72206163636f756e742e", - "id": 3121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34723:51:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", - "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" - }, - "value": "Error: Unable to set spending amount for account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", - "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" - } - ], - "id": 3110, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34618:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34618:157:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3123, - "nodeType": "ExpressionStatement", - "src": "34618:157:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3126, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34811:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3127, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3066, - "src": "34817:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3128, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "34827:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34827:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3130, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3068, - "src": "34839:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3131, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "34843:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3132, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3072, - "src": "34851:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3125, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "34797:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34797:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 3134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34864:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 3124, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34782:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34782:128:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3136, - "nodeType": "ExpressionStatement", - "src": "34782:128:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3139, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "34988:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3140, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3066, - "src": "34994:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3141, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "35004:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "35004:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3143, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3094, - "src": "35016:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3144, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3103, - "src": "35029:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3146, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3064, - "src": "35045:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3147, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3094, - "src": "35051:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3145, - "name": "getFeeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2642, - "src": "35035:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" - } - }, - "id": 3148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "35035:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3138, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "34974:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34974:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", - "id": 3150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "35072:49:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - }, - "value": "Error: Unable to transfer fees to fee contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - } - ], - "id": 3137, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "34959:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34959:163:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3152, - "nodeType": "ExpressionStatement", - "src": "34959:163:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "35136:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3076, - "id": 3154, - "nodeType": "Return", - "src": "35129:11:8" - } - ] - }, - "documentation": "@notice Transfer an amount of currency token from msg.sender account to another specified account\n@dev This function is called by an interface that is accessible directly to the account holder\n@dev | This method has an `internal` view\n@dev | This method uses `forceTransfer()` low-level api\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3156, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3073, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3064, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34241:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3063, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "34241:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3066, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34260:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3065, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "34260:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3068, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34277:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3067, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "34277:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3070, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34289:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3069, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "34289:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3072, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34302:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3071, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "34302:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "34240:73:8" - }, - "payable": false, - "returnParameters": { - "id": 3076, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3075, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3156, - "src": "34332:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3074, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "34332:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "34331:14:8" - }, - "scope": 4622, - "src": "34223:922:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3251, - "nodeType": "Block", - "src": "36402:1060:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3175, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3164, - "src": "36431:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3174, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "36423:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36423:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36438:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "36423:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", - "id": 3179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36449:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - }, - "value": "Error: `to` address must not be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - } - ], - "id": 3173, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "36408:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36408:86:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3181, - "nodeType": "ExpressionStatement", - "src": "36408:86:8" - }, - { - "assignments": [ - 3183 - ], - "declarations": [ - { - "constant": false, - "id": 3183, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36501:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3182, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36501:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3190, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3185, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36538:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3187, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "36552:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 3186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "36544:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36544:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3184, - "name": "getFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2736, - "src": "36523:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36523:35:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "36501:57:8" - }, - { - "assignments": [ - 3192 - ], - "declarations": [ - { - "constant": false, - "id": 3192, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36564:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3191, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "36564:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3198, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3194, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36590:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3195, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "36596:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3166, - "src": "36609:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3193, - "name": "calculateFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "36576:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" - } - }, - "id": 3197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36576:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "36564:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3201, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36756:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3202, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3162, - "src": "36762:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3204, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36783:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3205, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3160, - "src": "36789:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3206, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3166, - "src": "36799:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3203, - "name": "getFxUSDAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4621, - "src": "36768:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" - } - }, - "id": 3207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36768:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3200, - "name": "setAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4400, - "src": "36731:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 3208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36731:76:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", - "id": 3209, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36815:47:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", - "typeString": "literal_string \"Error: Unable to set account spending amount.\"" - }, - "value": "Error: Unable to set account spending amount." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", - "typeString": "literal_string \"Error: Unable to set account spending amount.\"" - } - ], - "id": 3199, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "36716:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36716:152:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3211, - "nodeType": "ExpressionStatement", - "src": "36716:152:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3214, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "36948:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3215, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3160, - "src": "36954:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3216, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3162, - "src": "36964:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3217, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3164, - "src": "36970:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3218, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3166, - "src": "36974:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3219, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3168, - "src": "36982:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3213, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "36934:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36934:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 3221, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36995:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 3212, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "36919:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36919:127:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3223, - "nodeType": "ExpressionStatement", - "src": "36919:127:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3226, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "37124:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3227, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3160, - "src": "37130:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3228, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3162, - "src": "37140:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3229, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "37146:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3230, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3192, - "src": "37159:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3232, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "37175:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3233, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "37181:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3231, - "name": "getFeeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2642, - "src": "37165:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" - } - }, - "id": 3234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37165:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3225, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "37110:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37110:84:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", - "id": 3236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37202:49:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - }, - "value": "Error: Unable to transfer fees to fee contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - } - ], - "id": 3224, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "37095:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37095:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3238, - "nodeType": "ExpressionStatement", - "src": "37095:162:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3241, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3158, - "src": "37348:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3242, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3160, - "src": "37354:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3243, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3162, - "src": "37364:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3244, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3166, - "src": "37370:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3240, - "name": "updateAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3403, - "src": "37332:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256) returns (bool)" - } - }, - "id": 3245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37332:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e636520666f72207370656e6465722e", - "id": 3246, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37385:48:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", - "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" - }, - "value": "Error: Unable to update allowance for spender." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", - "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" - } - ], - "id": 3239, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "37317:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37317:122:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3248, - "nodeType": "ExpressionStatement", - "src": "37317:122:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3249, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37453:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3172, - "id": 3250, - "nodeType": "Return", - "src": "37446:11:8" - } - ] - }, - "documentation": "@notice Transfer an amount of currency token from account to another specified account via an approved spender account\n@dev This function is called by an interface that is accessible directly to the account spender\n@dev | This method has an `internal` view\n@dev | Transactions will fail if the spending amount exceeds the daily limit\n@dev | This method uses `forceTransfer()` low-level api\n@dev | This method implements ERC20 transferFrom() method with approved spender behavior\n@dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3252, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3169, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3158, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36283:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3157, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "36283:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3160, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36302:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3159, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "36302:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3162, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36319:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3161, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36319:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3164, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36333:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3163, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36333:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3166, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36345:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3165, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "36345:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3168, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36358:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3167, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "36358:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "36282:87:8" - }, - "payable": false, - "returnParameters": { - "id": 3172, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3171, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3252, - "src": "36388:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3170, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "36388:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "36387:14:8" - }, - "scope": 4622, - "src": "36261:1201:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3350, - "nodeType": "Block", - "src": "38351:801:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3271, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "38380:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "38372:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38372:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38387:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "38372:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", - "id": 3275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38398:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - }, - "value": "Error: `to` address must not be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - } - ], - "id": 3269, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "38357:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38357:86:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3277, - "nodeType": "ExpressionStatement", - "src": "38357:86:8" - }, - { - "assignments": [ - 3279 - ], - "declarations": [ - { - "constant": false, - "id": 3279, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38450:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3278, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "38450:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3291, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38492:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3284, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3256, - "src": "38509:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3286, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38539:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3287, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3258, - "src": "38545:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3285, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "38519:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38519:31:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3281, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "38475:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3282, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "38475:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38475:76:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3280, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "38465:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38465:87:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "38450:102:8" - }, - { - "assignments": [ - 3293 - ], - "declarations": [ - { - "constant": false, - "id": 3293, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38558:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3292, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "38558:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3305, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3297, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38600:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3298, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3256, - "src": "38617:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3300, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38647:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3301, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "38653:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3299, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "38627:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38627:29:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3295, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "38583:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "38583:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38583:74:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3294, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "38573:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38573:85:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "38558:100:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3310, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3279, - "src": "38701:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3317, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3262, - "src": "38738:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3314, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3279, - "src": "38728:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3311, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38707:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3312, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "38707:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "38707:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38707:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "38707:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38707:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3307, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38680:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3308, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "38680:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "38680:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38680:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38754:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3306, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "38665:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38665:202:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3322, - "nodeType": "ExpressionStatement", - "src": "38665:202:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3327, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3293, - "src": "38909:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3334, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3262, - "src": "38946:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3331, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3293, - "src": "38936:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3328, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38915:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3329, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "38915:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "38915:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38915:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "38915:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38915:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3324, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "38888:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3325, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "38888:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "38888:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38888:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38962:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3323, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "38873:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38873:202:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3339, - "nodeType": "ExpressionStatement", - "src": "38873:202:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3341, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3256, - "src": "39096:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3342, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3258, - "src": "39106:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3343, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "39112:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3344, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3262, - "src": "39116:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3345, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3264, - "src": "39124:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3340, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1686, - "src": "39087:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,address,uint256,bytes memory)" - } - }, - "id": 3346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39087:42:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3347, - "nodeType": "EmitStatement", - "src": "39082:47:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "39143:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3268, - "id": 3349, - "nodeType": "Return", - "src": "39136:11:8" - } - ] - }, - "documentation": "@notice Low-level transfer method\n@dev | This method has an `internal` view\n@dev | This method does not include fees or approved allowances.\n@dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3351, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "forceTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3265, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3254, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38232:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3253, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "38232:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3256, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38251:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3255, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "38251:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3258, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38268:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3257, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "38268:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3260, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38282:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3259, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "38282:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3262, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38294:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3261, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "38294:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3264, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38307:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3263, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "38307:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "38231:87:8" - }, - "payable": false, - "returnParameters": { - "id": 3268, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3267, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3351, - "src": "38337:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3266, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "38337:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "38336:14:8" - }, - "scope": 4622, - "src": "38209:943:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3402, - "nodeType": "Block", - "src": "39829:376:8", - "statements": [ - { - "assignments": [ - 3365 - ], - "declarations": [ - { - "constant": false, - "id": 3365, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39835:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3364, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "39835:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3382, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 3369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "39875:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 3370, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3355, - "src": "39894:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3372, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "39924:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3373, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3357, - "src": "39930:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3371, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "39904:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39904:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3376, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "39960:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3377, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "39966:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "39966:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3375, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "39940:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39940:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3367, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "39858:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "39858:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39858:120:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3366, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "39848:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39848:131:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "39835:144:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3387, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3365, - "src": "40021:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3394, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3359, - "src": "40054:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3391, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3365, - "src": "40046:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3388, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "40025:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3389, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "40025:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "40025:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40025:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "40025:28:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40025:36:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3384, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "40000:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3385, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "40000:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "40000:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40000:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3397, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40070:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3383, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "39985:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39985:198:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3399, - "nodeType": "ExpressionStatement", - "src": "39985:198:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40196:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3363, - "id": 3401, - "nodeType": "Return", - "src": "40189:11:8" - } - ] - }, - "documentation": "@notice Low-level method to update spender allowance for account\n@dev | This method is called inside the `transferFrom()` method\n@dev | msg.sender == spender address\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Value to reduce allowance by (i.e. the amount spent)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3403, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "updateAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3360, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3353, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39731:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3352, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "39731:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3355, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39750:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3354, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "39750:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3357, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39767:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3356, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "39767:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3359, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39784:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3358, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "39784:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "39730:66:8" - }, - "payable": false, - "returnParameters": { - "id": 3363, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3362, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3403, - "src": "39815:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3361, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "39815:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "39814:14:8" - }, - "scope": 4622, - "src": "39706:499:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3523, - "nodeType": "Block", - "src": "40769:1110:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3415, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3407, - "src": "40783:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3416, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40794:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "40783:14:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20607370656e6465726020616464726573732063616e6e6f74206265206e756c6c2e", - "id": 3418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40807:42:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", - "typeString": "literal_string \"Error: `spender` address cannot be null.\"" - }, - "value": "Error: `spender` address cannot be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", - "typeString": "literal_string \"Error: `spender` address cannot be null.\"" - } - ], - "id": 3414, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "40775:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40775:75:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3420, - "nodeType": "ExpressionStatement", - "src": "40775:75:8" - }, - { - "assignments": [ - 3422 - ], - "declarations": [ - { - "constant": false, - "id": 3422, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40857:22:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3421, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "40857:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3429, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3424, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "40897:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3426, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5277, - "src": "40911:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4622", - "typeString": "library TokenIOLib" - } - ], - "id": 3425, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "40903:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40903:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3423, - "name": "getTokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2434, - "src": "40882:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" - } - }, - "id": 3428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40882:35:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "40857:60:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3432, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "40961:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3433, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3422, - "src": "40967:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3435, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "40997:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3436, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3407, - "src": "41003:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3434, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "40977:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40977:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3431, - "name": "getTokenFrozenBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2864, - "src": "40939:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" - } - }, - "id": 3438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40939:73:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41016:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "40939:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205370656e646572206d757374206e6f74206861766520612066726f7a656e2062616c616e6365206469726563746c79", - "id": 3441, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41025:56:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", - "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" - }, - "value": "Error: Spender must not have a frozen balance directly" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", - "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" - } - ], - "id": 3430, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "40924:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40924:158:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3443, - "nodeType": "ExpressionStatement", - "src": "40924:158:8" - }, - { - "assignments": [ - 3445 - ], - "declarations": [ - { - "constant": false, - "id": 3445, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "41089:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3444, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "41089:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3462, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 3449, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41131:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 3450, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3422, - "src": "41150:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3452, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41180:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3453, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "41186:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41186:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3451, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "41160:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3455, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41160:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3457, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41219:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3458, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3407, - "src": "41225:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3456, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "41199:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41199:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3447, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "41114:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3448, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41114:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41114:120:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3446, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "41104:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41104:131:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "41089:146:8" - }, - { - "assignments": [ - 3464 - ], - "declarations": [ - { - "constant": false, - "id": 3464, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "41241:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3463, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "41241:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3477, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3468, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41283:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3469, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3422, - "src": "41300:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3471, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41330:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3472, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "41336:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41336:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3470, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "41310:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41310:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3466, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "41266:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41266:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41266:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3465, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "41256:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41256:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "41241:108:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3482, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3445, - "src": "41392:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3479, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41371:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3480, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "41371:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "41371:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41371:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41401:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "41371:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3486, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3409, - "src": "41406:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41416:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "41406:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "41371:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283029206265666f72652073657474696e6720616e207570646174656420616c6c6f77616e636520666f72207370656e6465722e", - "id": 3490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41425:84:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", - "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" - }, - "value": "Error: Allowance must be zero (0) before setting an updated allowance for spender." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", - "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" - } - ], - "id": 3478, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "41356:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41356:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3492, - "nodeType": "ExpressionStatement", - "src": "41356:154:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3497, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3464, - "src": "41553:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3494, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41532:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "41532:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "41532:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41532:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3499, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3409, - "src": "41562:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "41532:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d73672e73656e64657220746f6b656e2062616c616e63652e", - "id": 3501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41576:58:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", - "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" - }, - "value": "Error: Allowance cannot exceed msg.sender token balance." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", - "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" - } - ], - "id": 3493, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "41517:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41517:118:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3503, - "nodeType": "ExpressionStatement", - "src": "41517:118:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3508, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3445, - "src": "41678:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3509, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3409, - "src": "41684:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3505, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3405, - "src": "41657:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "41657:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "41657:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41657:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3511, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41699:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3504, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "41642:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41642:165:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3513, - "nodeType": "ExpressionStatement", - "src": "41642:165:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3515, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "41828:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41828:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3517, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3407, - "src": "41840:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3518, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3409, - "src": "41849:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3514, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1654, - "src": "41819:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41819:37:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3520, - "nodeType": "EmitStatement", - "src": "41814:42:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41870:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3413, - "id": 3522, - "nodeType": "Return", - "src": "41863:11:8" - } - ] - }, - "documentation": "@notice Low-level method to set the allowance for a spender\n@dev | This method is called inside the `approve()` ERC20 method\n@dev | msg.sender == account holder\n@param self Internal storage proxying TokenIOStorage contract\n@param spender Ethereum address of account spender\n@param amount Value to set for spender allowance\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3524, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approveAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3405, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40688:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3404, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "40688:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3407, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40707:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3406, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "40707:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3409, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40724:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3408, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "40724:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "40687:49:8" - }, - "payable": false, - "returnParameters": { - "id": 3413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3412, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3524, - "src": "40755:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3411, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "40755:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "40754:14:8" - }, - "scope": 4622, - "src": "40662:1217:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3634, - "nodeType": "Block", - "src": "42706:943:8", - "statements": [ - { - "assignments": [ - 3540 - ], - "declarations": [ - { - "constant": false, - "id": 3540, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42712:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3539, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3552, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3544, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42754:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3545, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3528, - "src": "42771:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3547, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "42801:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3548, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3530, - "src": "42807:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3546, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "42781:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42781:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3542, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "42737:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42737:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42737:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3541, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "42727:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42727:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42712:105:8" - }, - { - "assignments": [ - 3554 - ], - "declarations": [ - { - "constant": false, - "id": 3554, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42823:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3553, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42823:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3563, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e697373756564", - "id": 3558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42865:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - "value": "token.issued" - }, - { - "argumentTypes": null, - "id": 3559, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3528, - "src": "42881:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3560, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3534, - "src": "42891:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3556, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "42848:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3557, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42848:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42848:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3555, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "42838:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42838:65:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42823:80:8" - }, - { - "assignments": [ - 3565 - ], - "declarations": [ - { - "constant": false, - "id": 3565, - "name": "id_c", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42909:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3564, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42909:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3573, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 3569, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42951:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 3570, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3528, - "src": "42967:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3567, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "42934:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3568, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42934:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42934:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3566, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "42924:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42924:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42909:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3578, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3540, - "src": "43014:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3585, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "43051:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3582, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3540, - "src": "43041:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3579, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43020:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3580, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43020:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "43020:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43020:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43020:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43020:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3575, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "42993:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3576, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "42993:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "42993:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42993:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43067:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "42985:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42985:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3590, - "nodeType": "ExpressionStatement", - "src": "42985:190:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3595, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3554, - "src": "43210:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3602, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "43247:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3599, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3554, - "src": "43237:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3596, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43216:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3597, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43216:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "43216:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43216:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43216:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43216:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3592, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43189:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3593, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43189:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "43189:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43189:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43263:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3591, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "43181:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43181:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3607, - "nodeType": "ExpressionStatement", - "src": "43181:190:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3612, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "43406:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3619, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "43443:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3616, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "43433:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3613, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43412:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3614, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43412:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "43412:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43412:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43412:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43412:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3609, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3526, - "src": "43385:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "43385:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "43385:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43385:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3622, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43459:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3608, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "43377:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43377:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3624, - "nodeType": "ExpressionStatement", - "src": "43377:190:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3626, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3528, - "src": "43587:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3627, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3530, - "src": "43597:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3628, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "43606:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3629, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3534, - "src": "43614:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3625, - "name": "Deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1664, - "src": "43579:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,uint256,string memory)" - } - }, - "id": 3630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43579:46:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3631, - "nodeType": "EmitStatement", - "src": "43574:51:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3632, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43639:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3538, - "id": 3633, - "nodeType": "Return", - "src": "43632:11:8" - } - ] - }, - "documentation": "@notice Deposit an amount of currency into the Ethereum account holder\n@dev | The total supply of the token increases only when new funds are deposited 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to deposit for account\n@param issuerFirm Name of the issuing firm authorizing the deposit\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3635, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3535, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3526, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42589:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3525, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "42589:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3528, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42608:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3527, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "42608:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3530, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42625:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3529, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "42625:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3532, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42642:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3531, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "42642:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3534, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42655:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3533, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "42655:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "42588:85:8" - }, - "payable": false, - "returnParameters": { - "id": 3538, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3537, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "42692:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3536, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "42692:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "42691:14:8" - }, - "scope": 4622, - "src": "42572:1077:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3745, - "nodeType": "Block", - "src": "44480:1002:8", - "statements": [ - { - "assignments": [ - 3651 - ], - "declarations": [ - { - "constant": false, - "id": 3651, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44486:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3650, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44486:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3663, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3655, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44528:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3656, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3639, - "src": "44545:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3658, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "44575:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3659, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3641, - "src": "44581:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3657, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "44555:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44555:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3653, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "44511:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3654, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44511:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44511:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3652, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "44501:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44501:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44486:105:8" - }, - { - "assignments": [ - 3665 - ], - "declarations": [ - { - "constant": false, - "id": 3665, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44597:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3664, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44597:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3674, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e697373756564", - "id": 3669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44639:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - "value": "token.issued" - }, - { - "argumentTypes": null, - "id": 3670, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3639, - "src": "44655:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3671, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3645, - "src": "44665:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3667, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "44622:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44622:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44622:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3666, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "44612:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44612:65:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44597:80:8" - }, - { - "assignments": [ - 3676 - ], - "declarations": [ - { - "constant": false, - "id": 3676, - "name": "id_c", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44721:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3675, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44721:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3684, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 3680, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44763:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 3681, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3639, - "src": "44779:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3678, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "44746:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44746:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44746:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3677, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "44736:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44736:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44721:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3689, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3651, - "src": "44832:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3696, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3643, - "src": "44869:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3693, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3651, - "src": "44859:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3690, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "44838:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3691, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "44838:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "44838:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44838:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "44838:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44838:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3686, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "44811:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3687, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "44811:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "44811:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44811:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44885:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3685, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "44796:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44796:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3701, - "nodeType": "ExpressionStatement", - "src": "44796:197:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3706, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3665, - "src": "45035:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3713, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3643, - "src": "45072:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3710, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3665, - "src": "45062:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3707, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "45041:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3708, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "45041:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3709, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "45041:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45041:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "45041:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45041:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3703, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "45014:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3704, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "45014:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "45014:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45014:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3716, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45088:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3702, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "44999:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44999:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3718, - "nodeType": "ExpressionStatement", - "src": "44999:197:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3723, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3676, - "src": "45238:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3730, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3643, - "src": "45275:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3727, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3676, - "src": "45265:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3724, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "45244:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "45244:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "45244:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45244:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "45244:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45244:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3720, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3637, - "src": "45217:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3721, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "45217:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "45217:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45217:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45291:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3719, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "45202:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45202:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3735, - "nodeType": "ExpressionStatement", - "src": "45202:197:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3737, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3639, - "src": "45420:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3738, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3641, - "src": "45430:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3739, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3643, - "src": "45439:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3740, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3645, - "src": "45447:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3736, - "name": "Withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1674, - "src": "45411:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,uint256,string memory)" - } - }, - "id": 3741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45411:47:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3742, - "nodeType": "EmitStatement", - "src": "45406:52:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45472:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3649, - "id": 3744, - "nodeType": "Return", - "src": "45465:11:8" - } - ] - }, - "documentation": "@notice Withdraw an amount of currency from the Ethereum account holder\n@dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to withdraw for account\n@param issuerFirm Name of the issuing firm authorizing the withdraw\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3746, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3646, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3637, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44363:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3636, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "44363:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3639, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44382:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3638, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "44382:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3641, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44399:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3640, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "44399:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3643, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44416:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3642, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "44416:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3645, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44429:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3644, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "44429:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "44362:85:8" - }, - "payable": false, - "returnParameters": { - "id": 3649, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3648, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3746, - "src": "44466:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3647, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "44466:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "44465:14:8" - }, - "scope": 4622, - "src": "44345:1137:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3779, - "nodeType": "Block", - "src": "46215:275:8", - "statements": [ - { - "assignments": [ - 3758 - ], - "declarations": [ - { - "constant": false, - "id": 3758, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46221:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3757, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "46221:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3766, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e6669726d", - "id": 3762, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46261:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - "value": "registered.firm" - }, - { - "argumentTypes": null, - "id": 3763, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3750, - "src": "46280:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3760, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "46244:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3761, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "46244:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46244:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3759, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "46234:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46234:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "46221:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3771, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3758, - "src": "46334:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3772, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3752, - "src": "46338:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3768, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3748, - "src": "46313:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3769, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "46313:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "46313:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 3773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46313:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3774, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46355:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3767, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "46298:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46298:170:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3776, - "nodeType": "ExpressionStatement", - "src": "46298:170:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46481:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3756, - "id": 3778, - "nodeType": "Return", - "src": "46474:11:8" - } - ] - }, - "documentation": "@notice Method for setting a registered issuer firm\n@dev | Only Token, Inc. and other authorized institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered\n@param approved Approval status to set for the firm (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3780, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setRegisteredFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3753, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3748, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46130:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3747, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "46130:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3750, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46149:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3749, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "46149:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3752, - "name": "approved", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46168:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3751, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "46168:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "46129:53:8" - }, - "payable": false, - "returnParameters": { - "id": 3756, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3755, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3780, - "src": "46201:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3754, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "46201:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "46200:14:8" - }, - "scope": 4622, - "src": "46103:387:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3844, - "nodeType": "Block", - "src": "47323:679:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3795, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3782, - "src": "47361:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3796, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3784, - "src": "47367:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3794, - "name": "isRegisteredFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3900, - "src": "47344:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" - } - }, - "id": 3797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47344:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20606973737565724669726d60206d75737420626520726567697374657265642e", - "id": 3798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47386:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", - "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" - }, - "value": "Error: `issuerFirm` must be registered." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", - "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" - } - ], - "id": 3793, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "47329:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47329:99:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3800, - "nodeType": "ExpressionStatement", - "src": "47329:99:8" - }, - { - "assignments": [ - 3802 - ], - "declarations": [ - { - "constant": false, - "id": 3802, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47435:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3801, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "47435:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3811, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3806, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47477:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "id": 3807, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3784, - "src": "47501:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3808, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3786, - "src": "47513:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3804, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "47460:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3805, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "47460:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47460:70:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3803, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "47450:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47450:81:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "47435:96:8" - }, - { - "assignments": [ - 3813 - ], - "declarations": [ - { - "constant": false, - "id": 3813, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47537:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3812, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "47537:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3821, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f726974792e6669726d", - "id": 3817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47579:27:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - "value": "registered.authority.firm" - }, - { - "argumentTypes": null, - "id": 3818, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3786, - "src": "47608:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3815, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "47562:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "47562:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47562:63:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3814, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "47552:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47552:74:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "47537:89:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3826, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3802, - "src": "47669:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3827, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3788, - "src": "47675:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3823, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3782, - "src": "47648:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3824, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "47648:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "47648:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 3828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47648:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47692:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3822, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "47633:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47633:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3831, - "nodeType": "ExpressionStatement", - "src": "47633:167:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3836, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3813, - "src": "47845:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3837, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3784, - "src": "47851:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3833, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3782, - "src": "47822:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3834, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "47822:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5006, - "src": "47822:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 3838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47822:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3839, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47870:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3832, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "47807:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47807:171:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3841, - "nodeType": "ExpressionStatement", - "src": "47807:171:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47993:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3792, - "id": 3843, - "nodeType": "Return", - "src": "47986:11:8" - } - ] - }, - "documentation": "@notice Method for setting a registered issuer firm authority\n@dev | Only Token, Inc. and other approved institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | Authority can only be set for a registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered to authority\n@param authorityAddress Ethereum address of the firm authority to be approved\n@param approved Approval status to set for the firm authority (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3845, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setRegisteredAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3782, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47212:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3781, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "47212:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3784, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47231:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3783, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "47231:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3786, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47250:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3785, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "47250:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3788, - "name": "approved", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47276:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3787, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "47276:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "47211:79:8" - }, - "payable": false, - "returnParameters": { - "id": 3792, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3791, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3845, - "src": "47309:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3790, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "47309:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "47308:14:8" - }, - "scope": 4622, - "src": "47180:822:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3873, - "nodeType": "Block", - "src": "48490:164:8", - "statements": [ - { - "assignments": [ - 3855 - ], - "declarations": [ - { - "constant": false, - "id": 3855, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3874, - "src": "48496:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3854, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "48496:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f726974792e6669726d", - "id": 3859, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "48536:27:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - "value": "registered.authority.firm" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3861, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3847, - "src": "48585:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3862, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3849, - "src": "48591:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3860, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "48565:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48565:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3857, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "48519:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "48519:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48519:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3856, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "48509:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48509:101:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "48496:114:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3870, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3855, - "src": "48646:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3867, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3847, - "src": "48623:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3868, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "48623:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5204, - "src": "48623:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 3871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48623:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 3853, - "id": 3872, - "nodeType": "Return", - "src": "48616:33:8" - } - ] - }, - "documentation": "@notice Get the issuer firm registered to the authority Ethereum address\n@dev | Only one firm can be registered per authority\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"issuerFirm\" : \"Name of the firm registered to authority\" }", - "id": 3874, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFirmFromAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3847, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3874, - "src": "48403:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3846, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "48403:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3849, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3874, - "src": "48422:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3848, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "48422:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48402:45:8" - }, - "payable": false, - "returnParameters": { - "id": 3853, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3852, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3874, - "src": "48471:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3851, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "48471:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48470:19:8" - }, - "scope": 4622, - "src": "48373:281:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3899, - "nodeType": "Block", - "src": "49052:119:8", - "statements": [ - { - "assignments": [ - 3884 - ], - "declarations": [ - { - "constant": false, - "id": 3884, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3900, - "src": "49058:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3883, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "49058:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3892, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e6669726d", - "id": 3888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "49098:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - "value": "registered.firm" - }, - { - "argumentTypes": null, - "id": 3889, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3878, - "src": "49117:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3886, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "49081:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3887, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "49081:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49081:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3885, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "49071:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49071:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "49058:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3896, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3884, - "src": "49163:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3893, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3876, - "src": "49142:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3894, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "49142:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "49142:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49142:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3882, - "id": 3898, - "nodeType": "Return", - "src": "49135:31:8" - } - ] - }, - "documentation": "@notice Return the boolean (true/false) registration status for an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@return { \"registered\" : \"Return if the issuer firm has been registered\" }", - "id": 3900, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3879, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3876, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3900, - "src": "48974:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3875, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "48974:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3878, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3900, - "src": "48993:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3877, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "48993:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48973:38:8" - }, - "payable": false, - "returnParameters": { - "id": 3882, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3881, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3900, - "src": "49035:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3880, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "49035:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49034:17:8" - }, - "scope": 4622, - "src": "48948:223:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3931, - "nodeType": "Block", - "src": "49703:169:8", - "statements": [ - { - "assignments": [ - 3912 - ], - "declarations": [ - { - "constant": false, - "id": 3912, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49709:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3911, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "49709:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3924, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3916, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "49749:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "id": 3917, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3904, - "src": "49773:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3919, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "49805:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3920, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3906, - "src": "49811:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3918, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "49785:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49785:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3914, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "49732:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3915, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "49732:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49732:97:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3913, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "49722:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49722:108:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "49709:121:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3928, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3912, - "src": "49864:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3925, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "49843:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3926, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "49843:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "49843:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49843:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3910, - "id": 3930, - "nodeType": "Return", - "src": "49836:31:8" - } - ] - }, - "documentation": "@notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }", - "id": 3932, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredToFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3907, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3902, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49599:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3901, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "49599:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3904, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49618:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3903, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "49618:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3906, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49637:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3905, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "49637:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49598:64:8" - }, - "payable": false, - "returnParameters": { - "id": 3910, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3909, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3932, - "src": "49686:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3908, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "49686:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49685:17:8" - }, - "scope": 4622, - "src": "49571:301:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3967, - "nodeType": "Block", - "src": "50348:230:8", - "statements": [ - { - "assignments": [ - 3942 - ], - "declarations": [ - { - "constant": false, - "id": 3942, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3968, - "src": "50354:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3941, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "50354:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3960, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3946, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "50394:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3948, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3934, - "src": "50439:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3950, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3934, - "src": "50465:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3951, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3936, - "src": "50471:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3949, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "50445:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50445:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3947, - "name": "getFirmFromAuthority", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3874, - "src": "50418:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" - } - }, - "id": 3953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50418:71:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3955, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3934, - "src": "50511:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3956, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3936, - "src": "50517:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3954, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "50491:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50491:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3944, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "50377:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3945, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "50377:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50377:158:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3943, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "50367:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50367:169:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "50354:182:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3964, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3942, - "src": "50570:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3961, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3934, - "src": "50549:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3962, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "50549:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "50549:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50549:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3940, - "id": 3966, - "nodeType": "Return", - "src": "50542:31:8" - } - ] - }, - "documentation": "@notice Return if an authority address is registered\n@dev | This also checks the status of the registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered\" }", - "id": 3968, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3934, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3968, - "src": "50263:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3933, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "50263:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3936, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3968, - "src": "50282:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3935, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "50282:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50262:45:8" - }, - "payable": false, - "returnParameters": { - "id": 3940, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3939, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3968, - "src": "50331:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3938, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "50331:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50330:17:8" - }, - "scope": 4622, - "src": "50232:346:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3993, - "nodeType": "Block", - "src": "51023:109:8", - "statements": [ - { - "assignments": [ - 3978 - ], - "declarations": [ - { - "constant": false, - "id": 3978, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3994, - "src": "51029:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3977, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51029:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3986, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74782e737461747573", - "id": 3982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51069:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - "value": "tx.status" - }, - { - "argumentTypes": null, - "id": 3983, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3972, - "src": "51082:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 3980, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "51052:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "51052:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51052:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3979, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "51042:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51042:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "51029:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3990, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3978, - "src": "51124:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3987, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3970, - "src": "51103:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3988, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "51103:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "51103:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51103:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3976, - "id": 3992, - "nodeType": "Return", - "src": "51096:31:8" - } - ] - }, - "documentation": "@notice Return boolean transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}", - "id": 3994, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTxStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3973, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3970, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3994, - "src": "50950:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3969, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "50950:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3972, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 3994, - "src": "50969:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3971, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "50969:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50949:35:8" - }, - "payable": false, - "returnParameters": { - "id": 3976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3975, - "name": "txStatus", - "nodeType": "VariableDeclaration", - "scope": 3994, - "src": "51008:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3974, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "51008:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51007:15:8" - }, - "scope": 4622, - "src": "50929:203:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4034, - "nodeType": "Block", - "src": "51541:486:8", - "statements": [ - { - "assignments": [ - 4004 - ], - "declarations": [ - { - "constant": false, - "id": 4004, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "51547:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4003, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51547:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4012, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74782e737461747573", - "id": 4008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51587:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - "value": "tx.status" - }, - { - "argumentTypes": null, - "id": 4009, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3998, - "src": "51600:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 4006, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "51570:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4007, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "51570:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51570:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4005, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "51560:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51560:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "51547:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "51677:26:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4015, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3996, - "src": "51690:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4016, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3998, - "src": "51696:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4014, - "name": "getTxStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3994, - "src": "51678:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) view returns (bool)" - } - }, - "id": 4017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51678:25:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205472616e73616374696f6e20737461747573206d7573742062652066616c7365206265666f72652073657474696e6720746865207472616e73616374696f6e207374617475732e", - "id": 4019, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51711:80:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", - "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" - }, - "value": "Error: Transaction status must be false before setting the transaction status." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", - "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" - } - ], - "id": 4013, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "51669:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51669:123:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4021, - "nodeType": "ExpressionStatement", - "src": "51669:123:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4026, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4004, - "src": "51879:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4027, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51883:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4023, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3996, - "src": "51858:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4024, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "51858:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "51858:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 4028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51858:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 4029, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51896:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 4022, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "51850:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51850:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4031, - "nodeType": "ExpressionStatement", - "src": "51850:154:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "52018:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4002, - "id": 4033, - "nodeType": "Return", - "src": "52011:11:8" - } - ] - }, - "documentation": "@notice Set transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 4035, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTxStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3999, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3996, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "51474:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3995, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "51474:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3998, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "51493:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3997, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51493:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51473:35:8" - }, - "payable": false, - "returnParameters": { - "id": 4002, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4001, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "51527:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "51527:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51526:14:8" - }, - "scope": 4622, - "src": "51453:574:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4148, - "nodeType": "Block", - "src": "53347:1436:8", - "statements": [ - { - "assignments": [ - 4061 - ], - "declarations": [ - { - "constant": false, - "id": 4061, - "name": "fxTxHash", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53354:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4060, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53354:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4073, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4065, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "53400:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4066, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4041, - "src": "53411:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4067, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4043, - "src": "53420:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4068, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "53429:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4069, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4047, - "src": "53437:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4070, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4055, - "src": "53445:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4063, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "53383:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4064, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "53383:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53383:73:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4062, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "53373:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53373:84:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "53354:103:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4076, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "53630:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4077, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "53636:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "53636:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4079, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "53648:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4075, - "name": "verifyAccounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3034, - "src": "53615:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) view returns (bool)" - } - }, - "id": 4080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53615:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204f6e6c79207665726966696564206163636f756e74732063616e20706572666f726d2063757272656e63792073776170732e", - "id": 4081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "53666:59:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", - "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" - }, - "value": "Error: Only verified accounts can perform currency swaps." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", - "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" - } - ], - "id": 4074, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "53600:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53600:126:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4083, - "nodeType": "ExpressionStatement", - "src": "53600:126:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4086, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "53850:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4087, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4061, - "src": "53856:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4085, - "name": "setTxStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4035, - "src": "53838:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) returns (bool)" - } - }, - "id": 4088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53838:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204661696c656420746f20736574207472616e73616374696f6e2073746174757320746f2066756c66696c6c65642e", - "id": 4089, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "53873:55:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", - "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" - }, - "value": "Error: Failed to set transaction status to fulfilled." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", - "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" - } - ], - "id": 4084, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "53823:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53823:106:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4091, - "nodeType": "ExpressionStatement", - "src": "53823:106:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4093, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4055, - "src": "53994:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4094, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5258, - "src": "54008:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "53994:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205472616e73616374696f6e20686173206578706972656421", - "id": 4096, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54013:33:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", - "typeString": "literal_string \"Error: Transaction has expired!\"" - }, - "value": "Error: Transaction has expired!" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", - "typeString": "literal_string \"Error: Transaction has expired!\"" - } - ], - "id": 4092, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "53986:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53986:61:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4098, - "nodeType": "ExpressionStatement", - "src": "53986:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4101, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4061, - "src": "54207:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4102, - "name": "sigV", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4049, - "src": "54217:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 4103, - "name": "sigR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4051, - "src": "54223:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4104, - "name": "sigS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4053, - "src": "54229:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4100, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5248, - "src": "54197:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 4105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54197:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4106, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "54238:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "54197:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204164647265737320646572697665642066726f6d207472616e73616374696f6e207369676e617475726520646f6573206e6f74206d6174636820746865207265717565737465722061646472657373", - "id": 4108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54255:88:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", - "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" - }, - "value": "Error: Address derived from transaction signature does not match the requester address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", - "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" - } - ], - "id": 4099, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "54182:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54182:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4110, - "nodeType": "ExpressionStatement", - "src": "54182:162:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4113, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "54438:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4114, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4041, - "src": "54444:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "54453:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "54453:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4117, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "54465:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4118, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "54476:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 4119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54484:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - } - ], - "id": 4112, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "54424:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 4120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54424:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 4121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54498:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 4111, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "54409:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54409:135:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4123, - "nodeType": "ExpressionStatement", - "src": "54409:135:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4126, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "54580:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4127, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4043, - "src": "54586:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4128, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "54595:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4129, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5256, - "src": "54606:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4130, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "54606:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4131, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4047, - "src": "54618:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 4132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54626:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - } - ], - "id": 4125, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3351, - "src": "54566:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 4133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54566:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 4134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54640:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 4124, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "54551:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54551:135:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4136, - "nodeType": "ExpressionStatement", - "src": "54551:135:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4138, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4041, - "src": "54705:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4139, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4043, - "src": "54714:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4140, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "54723:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4141, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4047, - "src": "54731:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4142, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4055, - "src": "54739:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4143, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4061, - "src": "54751:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4137, - "name": "FxSwap", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1716, - "src": "54698:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", - "typeString": "function (string memory,string memory,uint256,uint256,uint256,bytes32)" - } - }, - "id": 4144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54698:62:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4145, - "nodeType": "EmitStatement", - "src": "54693:67:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54774:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4059, - "id": 4147, - "nodeType": "Return", - "src": "54767:11:8" - } - ] - }, - "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev | This method can be called directly between peers\n@dev | This method does not take transaction fees from the swap\n@param self Internal storage proxying TokenIOStorage contract\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", - "id": 4149, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "execSwap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4056, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4037, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53123:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4036, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "53123:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4039, - "name": "requester", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53146:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "53146:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4041, - "name": "symbolA", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53169:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4040, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "53169:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4043, - "name": "symbolB", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53189:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4042, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "53189:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4045, - "name": "valueA", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53209:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4044, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53209:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4047, - "name": "valueB", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53226:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4046, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53226:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4049, - "name": "sigV", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53243:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4048, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "53243:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4051, - "name": "sigR", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53259:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4050, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53259:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4053, - "name": "sigS", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53277:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4052, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53277:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4055, - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53295:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4054, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53295:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "53117:197:8" - }, - "payable": false, - "returnParameters": { - "id": 4059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4058, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4149, - "src": "53333:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4057, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "53333:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "53332:14:8" - }, - "scope": 4622, - "src": "53100:1683:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4187, - "nodeType": "Block", - "src": "55336:350:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4159, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4153, - "src": "55350:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 4160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55369:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "55350:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2063616e6e6f74206465707265636174652061206e756c6c20616464726573732e", - "id": 4162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55382:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", - "typeString": "literal_string \"Error: cannot deprecate a null address.\"" - }, - "value": "Error: cannot deprecate a null address." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", - "typeString": "literal_string \"Error: cannot deprecate a null address.\"" - } - ], - "id": 4158, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "55342:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55342:82:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4164, - "nodeType": "ExpressionStatement", - "src": "55342:82:8" - }, - { - "assignments": [ - 4166 - ], - "declarations": [ - { - "constant": false, - "id": 4166, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4188, - "src": "55431:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4165, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "55431:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4174, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6465706372656361746564", - "id": 4170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55471:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - "value": "depcrecated" - }, - { - "argumentTypes": null, - "id": 4171, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4153, - "src": "55486:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4168, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "55454:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "55454:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55454:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4167, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "55444:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55444:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "55431:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4179, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4166, - "src": "55539:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4180, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55543:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4176, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4151, - "src": "55518:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4177, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "55518:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5046, - "src": "55518:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 4181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55518:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55556:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4175, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "55510:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55510:153:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4184, - "nodeType": "ExpressionStatement", - "src": "55510:153:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4185, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55677:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4157, - "id": 4186, - "nodeType": "Return", - "src": "55670:11:8" - } - ] - }, - "documentation": "@notice Deprecate a contract interface\n@dev | This is a low-level method to deprecate a contract interface.\n@dev | This is useful if the interface needs to be updated or becomes out of date\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", - "id": 4188, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setDeprecatedContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4151, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4188, - "src": "55260:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4150, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "55260:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4153, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 4188, - "src": "55279:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "55279:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "55259:44:8" - }, - "payable": false, - "returnParameters": { - "id": 4157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4156, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4188, - "src": "55322:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4155, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "55322:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "55321:14:8" - }, - "scope": 4622, - "src": "55229:457:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4213, - "nodeType": "Block", - "src": "56100:120:8", - "statements": [ - { - "assignments": [ - 4198 - ], - "declarations": [ - { - "constant": false, - "id": 4198, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "56106:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4197, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "56106:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4206, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6465706372656361746564", - "id": 4202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56146:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - "value": "depcrecated" - }, - { - "argumentTypes": null, - "id": 4203, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4192, - "src": "56161:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4200, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "56129:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4201, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "56129:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56129:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4199, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "56119:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56119:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "56106:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4210, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4198, - "src": "56212:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4207, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4190, - "src": "56191:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4208, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "56191:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5228, - "src": "56191:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 4211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56191:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 4196, - "id": 4212, - "nodeType": "Return", - "src": "56184:31:8" - } - ] - }, - "documentation": "@notice Return the deprecation status of a contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}", - "id": 4214, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isContractDeprecated", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4193, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4190, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "56020:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4189, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "56020:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4192, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "56039:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "56039:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56019:44:8" - }, - "payable": false, - "returnParameters": { - "id": 4196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4195, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "56087:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4194, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "56087:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56086:13:8" - }, - "scope": 4622, - "src": "55990:230:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4247, - "nodeType": "Block", - "src": "56743:264:8", - "statements": [ - { - "assignments": [ - 4226 - ], - "declarations": [ - { - "constant": false, - "id": 4226, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56749:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4225, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "56749:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4234, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6c696d69742e7370656e64696e672e706572696f64", - "id": 4230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56789:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - "value": "limit.spending.period" - }, - { - "argumentTypes": null, - "id": 4231, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4218, - "src": "56814:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4228, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "56772:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "56772:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56772:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4227, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "56762:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56762:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "56749:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4239, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4226, - "src": "56858:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4240, - "name": "period", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4220, - "src": "56862:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4236, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4216, - "src": "56837:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4237, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "56837:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "56837:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56837:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56877:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4235, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "56829:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56829:155:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4244, - "nodeType": "ExpressionStatement", - "src": "56829:155:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4245, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56998:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4224, - "id": 4246, - "nodeType": "Return", - "src": "56991:11:8" - } - ] - }, - "documentation": "@notice Set the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param period Unix timestamp of the spending period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4248, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4216, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56662:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4215, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "56662:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4218, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56681:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4217, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "56681:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4220, - "name": "period", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56698:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4219, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "56698:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56661:49:8" - }, - "payable": false, - "returnParameters": { - "id": 4224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4223, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4248, - "src": "56729:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4222, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "56729:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56728:14:8" - }, - "scope": 4622, - "src": "56628:379:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4273, - "nodeType": "Block", - "src": "57592:122:8", - "statements": [ - { - "assignments": [ - 4258 - ], - "declarations": [ - { - "constant": false, - "id": 4258, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4274, - "src": "57598:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4257, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "57598:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4266, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6c696d69742e7370656e64696e672e706572696f64", - "id": 4262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "57638:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - "value": "limit.spending.period" - }, - { - "argumentTypes": null, - "id": 4263, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4252, - "src": "57663:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4260, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "57621:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "57621:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57621:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4259, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "57611:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57611:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "57598:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4270, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4258, - "src": "57706:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4267, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4250, - "src": "57685:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4268, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "57685:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "57685:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57685:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4256, - "id": 4272, - "nodeType": "Return", - "src": "57678:31:8" - } - ] - }, - "documentation": "@notice Get the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@dev | If the current spending period has expired, it will be set upon next `transfer()`\nor `transferFrom()` request\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"period\" : \"Returns Unix timestamp of the current spending period\"}", - "id": 4274, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4253, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4250, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4274, - "src": "57520:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4249, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "57520:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4252, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4274, - "src": "57539:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "57539:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "57519:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4256, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4255, - "name": "period", - "nodeType": "VariableDeclaration", - "scope": 4274, - "src": "57579:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4254, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "57579:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "57578:13:8" - }, - "scope": 4622, - "src": "57486:228:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4307, - "nodeType": "Block", - "src": "58200:264:8", - "statements": [ - { - "assignments": [ - 4286 - ], - "declarations": [ - { - "constant": false, - "id": 4286, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58206:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4285, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "58206:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4294, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", - "id": 4290, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58246:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - "value": "account.spending.limit" - }, - { - "argumentTypes": null, - "id": 4291, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4278, - "src": "58272:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4288, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "58229:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "58229:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58229:51:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4287, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "58219:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58219:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "58206:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4299, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4286, - "src": "58316:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4300, - "name": "limit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4280, - "src": "58320:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4296, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4276, - "src": "58295:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4297, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "58295:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "58295:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58295:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4302, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58334:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4295, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "58287:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58287:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4304, - "nodeType": "ExpressionStatement", - "src": "58287:154:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58455:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4284, - "id": 4306, - "nodeType": "Return", - "src": "58448:11:8" - } - ] - }, - "documentation": "@notice Set the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param limit Spending limit amount\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4308, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingLimit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4276, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58120:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4275, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "58120:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4278, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58139:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4277, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "58139:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4280, - "name": "limit", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58156:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4279, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "58156:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58119:48:8" - }, - "payable": false, - "returnParameters": { - "id": 4284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4283, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4308, - "src": "58186:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4282, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "58186:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58185:14:8" - }, - "scope": 4622, - "src": "58087:377:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4333, - "nodeType": "Block", - "src": "58889:123:8", - "statements": [ - { - "assignments": [ - 4318 - ], - "declarations": [ - { - "constant": false, - "id": 4318, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4334, - "src": "58895:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4317, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "58895:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4326, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", - "id": 4322, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58935:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - "value": "account.spending.limit" - }, - { - "argumentTypes": null, - "id": 4323, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "58961:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4320, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "58918:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "58918:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58918:51:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4319, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "58908:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58908:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "58895:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4330, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4318, - "src": "59004:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4327, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "58983:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4328, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "58983:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "58983:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58983:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4316, - "id": 4332, - "nodeType": "Return", - "src": "58976:31:8" - } - ] - }, - "documentation": "@notice Get the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"limit\" : \"Returns the account spending limit amount\"}", - "id": 4334, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingLimit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4313, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4310, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4334, - "src": "58818:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4309, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "58818:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4312, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4334, - "src": "58837:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "58837:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58817:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4316, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4315, - "name": "limit", - "nodeType": "VariableDeclaration", - "scope": 4334, - "src": "58877:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4314, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "58877:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58876:12:8" - }, - "scope": 4622, - "src": "58785:227:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4399, - "nodeType": "Block", - "src": "59712:887:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4347, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "59846:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4348, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "59852:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4346, - "name": "updateAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4457, - "src": "59818:27:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" - } - }, - "id": 4349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59818:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4350, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "59868:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4345, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "59810:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59810:109:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4352, - "nodeType": "ExpressionStatement", - "src": "59810:109:8" - }, - { - "assignments": [ - 4354 - ], - "declarations": [ - { - "constant": false, - "id": 4354, - "name": "updatedAmount", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59926:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4353, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "59926:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4362, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4360, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4340, - "src": "59991:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4356, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "59972:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4357, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "59978:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4355, - "name": "getAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4487, - "src": "59947:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59947:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "59947:43:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59947:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "59926:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4365, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "60128:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4366, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60134:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4364, - "name": "getAccountSpendingLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4334, - "src": "60104:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60104:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4368, - "name": "updatedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4354, - "src": "60146:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "60104:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e742063616e6e6f742065786365656420697473206461696c79207370656e64206c696d69742e", - "id": 4370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60167:53:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", - "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" - }, - "value": "Error: Account cannot exceed its daily spend limit." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", - "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" - } - ], - "id": 4363, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "60089:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60089:132:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4372, - "nodeType": "ExpressionStatement", - "src": "60089:132:8" - }, - { - "assignments": [ - 4374 - ], - "declarations": [ - { - "constant": false, - "id": 4374, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "60291:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4373, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "60291:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", - "id": 4378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60331:25:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - "value": "account.spending.amount" - }, - { - "argumentTypes": null, - "id": 4379, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60358:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4381, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "60392:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4382, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60398:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4380, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4274, - "src": "60367:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60367:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4376, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "60314:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4377, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "60314:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60314:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4375, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "60304:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60304:104:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "60291:117:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4391, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4374, - "src": "60443:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4392, - "name": "updatedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4354, - "src": "60447:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4388, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "60422:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4389, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "60422:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "60422:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60422:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60469:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4387, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "60414:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60414:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4396, - "nodeType": "ExpressionStatement", - "src": "60414:162:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4397, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60590:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4344, - "id": 4398, - "nodeType": "Return", - "src": "60583:11:8" - } - ] - }, - "documentation": "@notice Set the account spending amount for the daily period\n@dev | Each account has it's own daily spending limit\n@dev | This transaction will throw if the new spending amount is greater than the limit\n@dev | This method is called in the `transfer()` and `transferFrom()` methods\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param amount Set the amount spent for the daily period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4400, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4336, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59631:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4335, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "59631:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4338, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59650:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4337, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "59650:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4340, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59667:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4339, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "59667:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59630:49:8" - }, - "payable": false, - "returnParameters": { - "id": 4344, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4343, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4400, - "src": "59698:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4342, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "59698:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59697:14:8" - }, - "scope": 4622, - "src": "59597:1002:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4456, - "nodeType": "Block", - "src": "61159:398:8", - "statements": [ - { - "assignments": [ - 4410 - ], - "declarations": [ - { - "constant": false, - "id": 4410, - "name": "begDate", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61165:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4409, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "61165:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4415, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4412, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4402, - "src": "61205:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4413, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4404, - "src": "61211:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4411, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4274, - "src": "61180:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61180:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "61165:54:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4416, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4410, - "src": "61229:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 4417, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5258, - "src": "61239:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "61229:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 4454, - "nodeType": "Block", - "src": "61276:277:8", - "statements": [ - { - "assignments": [ - 4423 - ], - "declarations": [ - { - "constant": false, - "id": 4423, - "name": "duration", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61284:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4422, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "61284:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4425, - "initialValue": { - "argumentTypes": null, - "hexValue": "3836343030", - "id": 4424, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61300:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "86400" - }, - "nodeType": "VariableDeclarationStatement", - "src": "61284:21:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4428, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4402, - "src": "61381:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4429, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4404, - "src": "61387:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4445, - "name": "duration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4423, - "src": "61454:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 4441, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61446:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4438, - "name": "duration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4423, - "src": "61432:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4434, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4410, - "src": "61418:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4432, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5258, - "src": "61410:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "61410:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61410:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4436, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "61409:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "61409:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61409:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "61409:36:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61409:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4443, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "61408:41:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "61408:45:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61408:55:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4430, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4410, - "src": "61396:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "61396:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61396:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 4427, - "name": "setAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4248, - "src": "61356:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1646_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 4448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61356:109:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4449, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61475:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4426, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "61339:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61339:187:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4451, - "nodeType": "ExpressionStatement", - "src": "61339:187:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4452, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61542:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4408, - "id": 4453, - "nodeType": "Return", - "src": "61535:11:8" - } - ] - }, - "id": 4455, - "nodeType": "IfStatement", - "src": "61225:328:8", - "trueBody": { - "id": 4421, - "nodeType": "Block", - "src": "61244:26:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61259:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4408, - "id": 4420, - "nodeType": "Return", - "src": "61252:11:8" - } - ] - } - } - ] - }, - "documentation": "@notice Low-level API to ensure the account spending period is always current\n@dev | This method is internally called by `setAccountSpendingAmount()` to ensure\nspending period is always the most current daily period.\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4457, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "updateAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4402, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61091:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4401, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "61091:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4404, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61110:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4403, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61110:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61090:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4408, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4407, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4457, - "src": "61145:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4406, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "61145:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61144:14:8" - }, - "scope": 4622, - "src": "61054:503:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4486, - "nodeType": "Block", - "src": "62021:165:8", - "statements": [ - { - "assignments": [ - 4467 - ], - "declarations": [ - { - "constant": false, - "id": 4467, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4487, - "src": "62027:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4466, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "62027:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4479, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", - "id": 4471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "62067:25:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - "value": "account.spending.amount" - }, - { - "argumentTypes": null, - "id": 4472, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4461, - "src": "62094:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4474, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4459, - "src": "62128:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4475, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4461, - "src": "62134:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4473, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4274, - "src": "62103:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62103:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4469, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "62050:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "62050:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62050:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4468, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "62040:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62040:104:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "62027:117:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4483, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4467, - "src": "62178:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4480, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4459, - "src": "62157:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4481, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "62157:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "62157:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62157:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4465, - "id": 4485, - "nodeType": "Return", - "src": "62150:31:8" - } - ] - }, - "documentation": "@notice Return the amount spent during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount spent by the account during the current period\"}", - "id": 4487, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4459, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4487, - "src": "61949:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4458, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "61949:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4461, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4487, - "src": "61968:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4460, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61968:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61948:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4465, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4464, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4487, - "src": "62008:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4463, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "62008:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62007:13:8" - }, - "scope": 4622, - "src": "61915:271:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4507, - "nodeType": "Block", - "src": "62669:101:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4502, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4489, - "src": "62750:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4503, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4491, - "src": "62756:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4501, - "name": "getAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4487, - "src": "62725:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62725:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4497, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4489, - "src": "62706:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4498, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4491, - "src": "62712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4496, - "name": "getAccountSpendingLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4334, - "src": "62682:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62682:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "62682:42:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62682:83:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4495, - "id": 4506, - "nodeType": "Return", - "src": "62675:90:8" - } - ] - }, - "documentation": "@notice Return the amount remaining during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}", - "id": 4508, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingRemaining", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4492, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4489, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4508, - "src": "62589:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4488, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "62589:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4491, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4508, - "src": "62608:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4490, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "62608:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62588:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4495, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4494, - "name": "remainingLimit", - "nodeType": "VariableDeclaration", - "scope": 4508, - "src": "62648:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4493, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "62648:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62647:21:8" - }, - "scope": 4622, - "src": "62552:218:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4541, - "nodeType": "Block", - "src": "63363:207:8", - "statements": [ - { - "assignments": [ - 4520 - ], - "declarations": [ - { - "constant": false, - "id": 4520, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63369:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4519, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "63369:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4528, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66782e7573642e72617465", - "id": 4524, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63409:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - "value": "fx.usd.rate" - }, - { - "argumentTypes": null, - "id": 4525, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4512, - "src": "63424:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4522, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "63392:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4523, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "63392:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63392:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4521, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "63382:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63382:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "63369:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4533, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4520, - "src": "63476:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4534, - "name": "bpsRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4514, - "src": "63480:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4530, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4510, - "src": "63455:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4531, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "63455:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4986, - "src": "63455:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63455:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63496:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4529, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5259, - 5260 - ], - "referencedDeclaration": 5260, - "src": "63440:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63440:107:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4538, - "nodeType": "ExpressionStatement", - "src": "63440:107:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63561:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4518, - "id": 4540, - "nodeType": "Return", - "src": "63554:11:8" - } - ] - }, - "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@return { \"success\": \"Returns true if successfully called from another contract\"}", - "id": 4542, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFxUSDBPSRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4515, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4510, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63281:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4509, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "63281:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4512, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63300:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4511, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "63300:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4514, - "name": "bpsRate", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63317:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4513, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "63317:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63280:50:8" - }, - "payable": false, - "returnParameters": { - "id": 4518, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4517, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4542, - "src": "63349:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4516, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "63349:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63348:14:8" - }, - "scope": 4622, - "src": "63256:314:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4567, - "nodeType": "Block", - "src": "63976:113:8", - "statements": [ - { - "assignments": [ - 4552 - ], - "declarations": [ - { - "constant": false, - "id": 4552, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4568, - "src": "63982:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4551, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "63982:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4560, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66782e7573642e72617465", - "id": 4556, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64022:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - "value": "fx.usd.rate" - }, - { - "argumentTypes": null, - "id": 4557, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4546, - "src": "64037:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4554, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5243, - "src": "64005:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "64005:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64005:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4553, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "63995:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63995:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "63982:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4564, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4552, - "src": "64081:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4561, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4544, - "src": "64060:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4562, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1645, - "src": "64060:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5241", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5192, - "src": "64060:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64060:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4550, - "id": 4566, - "nodeType": "Return", - "src": "64053:31:8" - } - ] - }, - "documentation": "@notice Return the foreign currency USD exchanged amount in basis points\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", - "id": 4568, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFxUSDBPSRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4544, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4568, - "src": "63903:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4543, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "63903:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4546, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4568, - "src": "63922:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4545, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "63922:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63902:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4550, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4549, - "name": "bpsRate", - "nodeType": "VariableDeclaration", - "scope": 4568, - "src": "63962:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4548, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "63962:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63961:14:8" - }, - "scope": 4622, - "src": "63878:211:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4620, - "nodeType": "Block", - "src": "64558:330:8", - "statements": [ - { - "assignments": [ - 4580 - ], - "declarations": [ - { - "constant": false, - "id": 4580, - "name": "usdDecimals", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64564:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4579, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64564:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4585, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4582, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "64600:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "hexValue": "55534478", - "id": 4583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64606:6:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", - "typeString": "literal_string \"USDx\"" - }, - "value": "USDx" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", - "typeString": "literal_string \"USDx\"" - } - ], - "id": 4581, - "name": "getTokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2512, - "src": "64583:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64583:30:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64564:49:8" - }, - { - "assignments": [ - 4587 - ], - "declarations": [ - { - "constant": false, - "id": 4587, - "name": "fxDecimals", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64619:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4586, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64619:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4592, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4589, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "64654:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4590, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4572, - "src": "64660:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4588, - "name": "getTokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2512, - "src": "64637:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64637:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64619:50:8" - }, - { - "assignments": [ - 4594 - ], - "declarations": [ - { - "constant": false, - "id": 4594, - "name": "usdAmount", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64743:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4593, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64743:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4617, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 4613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64846:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "id": 4614, - "name": "fxDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4587, - "src": "64850:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "64846:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 4607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64824:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "id": 4608, - "name": "usdDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4580, - "src": "64828:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "64824:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3130303030", - "id": 4603, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64812:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - }, - "value": "10000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4598, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "64791:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4599, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4572, - "src": "64797:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4597, - "name": "getFxUSDBPSRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4568, - "src": "64775:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1646_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64775:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4595, - "name": "fxAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4574, - "src": "64762:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "64762:12:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64762:45:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "64762:49:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64762:56:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4605, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "64761:58:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "64761:62:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64761:79:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4611, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "64760:81:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "64760:85:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64760:101:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64743:118:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 4618, - "name": "usdAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4594, - "src": "64874:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4578, - "id": 4619, - "nodeType": "Return", - "src": "64867:16:8" - } - ] - }, - "documentation": "@notice Return the foreign currency USD exchanged amount\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"amount\" : \"Returns the foreign currency amount in USD\"}", - "id": 4621, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFxUSDAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4575, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4570, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64471:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4569, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1646, - "src": "64471:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1646_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4572, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64490:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4571, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "64490:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4574, - "name": "fxAmount", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64507:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4573, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64507:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "64470:51:8" - }, - "payable": false, - "returnParameters": { - "id": 4578, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4577, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4621, - "src": "64545:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4576, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64545:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "64544:13:8" - }, - "scope": 4622, - "src": "64447:441:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4623, - "src": "900:63992:8" - } - ], - "src": "0:64893:8" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": { - "1": { - "events": {}, - "links": {}, - "address": "0xcccfe9e6d1baceef27b419620792dbf77ccb8ab7", - "transactionHash": "0x60ded27a41d0d3109119edefdfb66820903c19ceb56d46590a201a7c2f1646dd" - } - }, - "schemaVersion": "2.0.1", - "updatedAt": "2018-09-18T18:57:45.654Z" -} \ No newline at end of file diff --git a/deployed/mainnet-v1.0.1/TokenIOLib.json b/deployed/mainnet-v1.0.1/TokenIOLib.json deleted file mode 100644 index 85f83a1..0000000 --- a/deployed/mainnet-v1.0.1/TokenIOLib.json +++ /dev/null @@ -1,87996 +0,0 @@ -{ - "contractName": "TokenIOLib", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "currency", - "type": "string" - }, - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "currency", - "type": "string" - }, - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "currency", - "type": "string" - }, - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "name": "data", - "type": "bytes" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "status", - "type": "bool" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "KYCApproval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "status", - "type": "bool" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "AccountStatus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "tokenASymbol", - "type": "string" - }, - { - "indexed": false, - "name": "tokenBSymbol", - "type": "string" - }, - { - "indexed": false, - "name": "tokenAValue", - "type": "uint256" - }, - { - "indexed": false, - "name": "tokenBValue", - "type": "uint256" - }, - { - "indexed": false, - "name": "expiration", - "type": "uint256" - }, - { - "indexed": false, - "name": "transactionHash", - "type": "bytes32" - } - ], - "name": "FxSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "originalAccount", - "type": "address" - }, - { - "indexed": true, - "name": "forwardedAccount", - "type": "address" - } - ], - "name": "AccountForward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "authority", - "type": "address" - }, - { - "indexed": false, - "name": "issuerFirm", - "type": "string" - } - ], - "name": "NewAuthority", - "type": "event" - } - ], - "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058203d7c9467d5596ee788b18c8a5c40e914538e3e309a4d8cc478e6d8386b70d4560029", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058203d7c9467d5596ee788b18c8a5c40e914538e3e309a4d8cc478e6d8386b70d4560029", - "sourceMap": "898:63992:8:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", - "deployedSourceMap": "898:63992:8:-;;;;;;;;", - "source": "pragma solidity 0.4.24;\n\nimport \"./SafeMath.sol\";\nimport \"./TokenIOStorage.sol\";\n\n/**\nCOPYRIGHT 2018 Token, Inc.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n@title TokenIOLib\n\n@author Ryan Tate , Sean Pollock \n\n@notice This library proxies the TokenIOStorage contract for the interface contract,\nallowing the library and the interfaces to remain stateless, and share a universally\navailable storage contract between interfaces.\n\n\n*/\n\n\nlibrary TokenIOLib {\n\n /// @dev all math operating are using SafeMath methods to check for overflow/underflows\n using SafeMath for uint;\n\n /// @dev the Data struct uses the Storage contract for stateful setters\n struct Data {\n TokenIOStorage Storage;\n }\n\n /// @notice Not using `Log` prefix for events to be consistent with ERC20 named events;\n event Approval(address indexed owner, address indexed spender, uint amount);\n event Deposit(string currency, address indexed account, uint amount, string issuerFirm);\n event Withdraw(string currency, address indexed account, uint amount, string issuerFirm);\n event Transfer(string currency, address indexed from, address indexed to, uint amount, bytes data);\n event KYCApproval(address indexed account, bool status, string issuerFirm);\n event AccountStatus(address indexed account, bool status, string issuerFirm);\n event FxSwap(string tokenASymbol,string tokenBSymbol,uint tokenAValue,uint tokenBValue, uint expiration, bytes32 transactionHash);\n event AccountForward(address indexed originalAccount, address indexed forwardedAccount);\n event NewAuthority(address indexed authority, string issuerFirm);\n\n /**\n * @notice Set the token name for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenName Name of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenName(Data storage self, string tokenName) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.name', address(this)));\n require(\n self.Storage.setString(id, tokenName),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token symbol for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenSymbol Symbol of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenSymbol(Data storage self, string tokenSymbol) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.symbol', address(this)));\n require(\n self.Storage.setString(id, tokenSymbol),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token three letter abreviation (TLA) for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenTLA TLA of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenTLA(Data storage self, string tokenTLA) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.tla', address(this)));\n require(\n self.Storage.setString(id, tokenTLA),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token version for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenVersion(Data storage self, string tokenVersion) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.version', address(this)));\n require(\n self.Storage.setString(id, tokenVersion),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the token decimals for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @dev This method is not set to the address of the contract, rather is maped to currency\n * @dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param tokenDecimals Decimal representation of the token contract unit amount\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenDecimals(Data storage self, string currency, uint tokenDecimals) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.decimals', currency));\n require(\n self.Storage.setUint(id, tokenDecimals),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set basis point fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeBPS Basis points fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeBPS(Data storage self, uint feeBPS) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.bps', address(this)));\n require(\n self.Storage.setUint(id, feeBPS),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set minimum fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMin Minimum fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMin(Data storage self, uint feeMin) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.min', address(this)));\n require(\n self.Storage.setUint(id, feeMin),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set maximum fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMax Maximum fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMax(Data storage self, uint feeMax) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.max', address(this)));\n require(\n self.Storage.setUint(id, feeMax),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set flat fee for contract interface\n * @dev Transaction fees can be set by the TokenIOFeeContract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeFlat Flat fee for interface contract transactions\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeFlat(Data storage self, uint feeFlat) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.flat', address(this)));\n require(\n self.Storage.setUint(id, feeFlat),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set fee message for contract interface\n * @dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n * @dev Fee messages vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeMsg Fee message included in a transaction with fees\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeMsg(Data storage self, bytes feeMsg) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.msg', address(this)));\n require(\n self.Storage.setBytes(id, feeMsg),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set fee contract for a contract interface\n * @dev feeContract must be a TokenIOFeeContract storage approved contract\n * @dev Fees vary by contract interface specified `feeContract`\n * @dev | This method has an `internal` view\n * @dev | This must be called directly from the interface contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param feeContract Set the fee contract for `this` contract address interface\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setFeeContract(Data storage self, address feeContract) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.account', address(this)));\n require(\n self.Storage.setAddress(id, feeContract),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n * @dev | This should only be called once from a token interface contract;\n * @dev | This method has an `internal` view\n * @dev | This method is experimental and may be deprecated/refactored\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setTokenNameSpace(Data storage self, string currency) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.namespace', currency));\n require(\n self.Storage.setAddress(id, address(this)),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the KYC approval status (true/false) for a given account\n * @dev | This method has an `internal` view\n * @dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n * @dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param isApproved Boolean (true/false) KYC approval status for a given account\n * @param issuerFirm Firm name for issuing KYC approval\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setKYCApproval(Data storage self, address account, bool isApproved, string issuerFirm) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account)));\n require(\n self.Storage.setBool(id, isApproved),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n\n /// @dev NOTE: Issuer is logged for setting account KYC status\n emit KYCApproval(account, isApproved, issuerFirm);\n return true;\n }\n\n /**\n * @notice Set the global approval status (true/false) for a given account\n * @dev | This method has an `internal` view\n * @dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n * @dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param isAllowed Boolean (true/false) global status for a given account\n * @param issuerFirm Firm name for issuing approval\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setAccountStatus(Data storage self, address account, bool isAllowed, string issuerFirm) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account)));\n require(\n self.Storage.setBool(id, isAllowed),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n\n /// @dev NOTE: Issuer is logged for setting account status\n emit AccountStatus(account, isAllowed, issuerFirm);\n return true;\n }\n\n\n /**\n * @notice Set a forwarded address for an account.\n * @dev | This method has an `internal` view\n * @dev | Forwarded accounts must be set by an authority in case of account recovery;\n * @dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n * @dev | All transactions will be logged under the same KYC information as the original account holder;\n * @param self Internal storage proxying TokenIOStorage contract\n * @param originalAccount Original registered Ethereum address of the account holder\n * @param forwardedAccount Forwarded Ethereum address of the account holder\n * @return {\"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setForwardedAccount(Data storage self, address originalAccount, address forwardedAccount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('master.account', forwardedAccount));\n require(\n self.Storage.setAddress(id, originalAccount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Get the original address for a forwarded account\n * @dev | This method has an `internal` view\n * @dev | Will return the registered account for the given forwarded account\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}\n */\n function getForwardedAccount(Data storage self, address account) internal view returns (address registeredAccount) {\n bytes32 id = keccak256(abi.encodePacked('master.account', account));\n address originalAccount = self.Storage.getAddress(id);\n if (originalAccount != 0x0) {\n return originalAccount;\n } else {\n return account;\n }\n }\n\n /**\n * @notice Get KYC approval status for the account holder\n * @dev | This method has an `internal` view\n * @dev | All forwarded accounts will use the original account's status\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"status\" : \"Returns the KYC approval status for an account holder\" }\n */\n function getKYCApproval(Data storage self, address account) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('account.kyc', getForwardedAccount(self, account)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Get global approval status for the account holder\n * @dev | This method has an `internal` view\n * @dev | All forwarded accounts will use the original account's status\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @return { \"status\" : \"Returns the global approval status for an account holder\" }\n */\n function getAccountStatus(Data storage self, address account) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('account.allowed', getForwardedAccount(self, account)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Get the contract interface address associated with token symbol\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }\n */\n function getTokenNameSpace(Data storage self, string currency) internal view returns (address contractAddress) {\n bytes32 id = keccak256(abi.encodePacked('token.namespace', currency));\n return self.Storage.getAddress(id);\n }\n\n /**\n * @notice Get the token name for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenName\" : \"Name of the token contract\"}\n */\n function getTokenName(Data storage self, address contractAddress) internal view returns (string tokenName) {\n bytes32 id = keccak256(abi.encodePacked('token.name', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token symbol for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenSymbol\" : \"Symbol of the token contract\"}\n */\n function getTokenSymbol(Data storage self, address contractAddress) internal view returns (string tokenSymbol) {\n bytes32 id = keccak256(abi.encodePacked('token.symbol', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token Three letter abbreviation (TLA) for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenTLA\" : \"TLA of the token contract\"}\n */\n function getTokenTLA(Data storage self, address contractAddress) internal view returns (string tokenTLA) {\n bytes32 id = keccak256(abi.encodePacked('token.tla', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token version for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return {\"tokenVersion\" : \"Semantic version of the token contract\"}\n */\n function getTokenVersion(Data storage self, address contractAddress) internal view returns (string) {\n bytes32 id = keccak256(abi.encodePacked('token.version', contractAddress));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Get the token decimals for Token interfaces\n * @dev This method must be set by the token interface's setParams() method\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return {\"tokenDecimals\" : \"Decimals of the token contract\"}\n */\n function getTokenDecimals(Data storage self, string currency) internal view returns (uint tokenDecimals) {\n bytes32 id = keccak256(abi.encodePacked('token.decimals', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}\n */\n function getFeeBPS(Data storage self, address contractAddress) internal view returns (uint feeBps) {\n bytes32 id = keccak256(abi.encodePacked('fee.bps', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}\n */\n function getFeeMin(Data storage self, address contractAddress) internal view returns (uint feeMin) {\n bytes32 id = keccak256(abi.encodePacked('fee.min', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}\n */\n function getFeeMax(Data storage self, address contractAddress) internal view returns (uint feeMax) {\n bytes32 id = keccak256(abi.encodePacked('fee.max', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the flat fee of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}\n */\n function getFeeFlat(Data storage self, address contractAddress) internal view returns (uint feeFlat) {\n bytes32 id = keccak256(abi.encodePacked('fee.flat', contractAddress));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the flat message of the contract address; typically TokenIOFeeContract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}\n */\n function getFeeMsg(Data storage self, address contractAddress) internal view returns (bytes feeMsg) {\n bytes32 id = keccak256(abi.encodePacked('fee.msg', contractAddress));\n return self.Storage.getBytes(id);\n }\n\n /**\n * @notice Set the master fee contract used as the default fee contract when none is provided\n * @dev | This method has an `internal` view\n * @dev | This value is set in the TokenIOAuthority contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"success\" : \"Returns true when successfully called from another contract\"}\n */\n function setMasterFeeContract(Data storage self, address contractAddress) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fee.contract.master'));\n require(\n self.Storage.setAddress(id, contractAddress),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Get the master fee contract set via the TokenIOAuthority contract\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}\n */\n function getMasterFeeContract(Data storage self) internal view returns (address masterFeeContract) {\n bytes32 id = keccak256(abi.encodePacked('fee.contract.master'));\n return self.Storage.getAddress(id);\n }\n\n /**\n * @notice Get the fee contract set for a contract interface\n * @dev | This method has an `internal` view\n * @dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n * @dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the queryable interface\n * @return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}\n */\n function getFeeContract(Data storage self, address contractAddress) internal view returns (address feeContract) {\n bytes32 id = keccak256(abi.encodePacked('fee.account', contractAddress));\n\n address feeAccount = self.Storage.getAddress(id);\n if (feeAccount == 0x0) {\n return getMasterFeeContract(self);\n } else {\n return feeAccount;\n }\n }\n\n /**\n * @notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @return { \"supply\" : \"Returns the token supply of the given currency\"}\n */\n function getTokenSupply(Data storage self, string currency) internal view returns (uint supply) {\n bytes32 id = keccak256(abi.encodePacked('token.supply', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the token spender allowance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder\n * @param spender Ethereum address of spender\n * @return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}\n */\n function getTokenAllowance(Data storage self, string currency, address account, address spender) internal view returns (uint allowance) {\n bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, spender)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @return { \"balance\" : \"Return the balance of a given account for a specified currency\"}\n */\n function getTokenBalance(Data storage self, string currency, address account) internal view returns (uint balance) {\n bytes32 id = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Get the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}\n */\n function getTokenFrozenBalance(Data storage self, string currency, address account) internal view returns (uint frozenBalance) {\n bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @param amount Amount of tokens to freeze for account\n * @return { \"success\" : \"Return true if successfully called from another contract\"}\n */\n function setTokenFrozenBalance(Data storage self, string currency, address account, uint amount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.frozen', currency, getForwardedAccount(self, account)));\n require(\n self.Storage.setUint(id, amount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Set the frozen token balance for a given account\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Contract address of the fee contract\n * @param amount Transaction value\n * @return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }\n */\n function calculateFees(Data storage self, address contractAddress, uint amount) internal view returns (uint calculatedFees) {\n\n uint maxFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.max', contractAddress)));\n uint minFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.min', contractAddress)));\n uint bpsFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.bps', contractAddress)));\n uint flatFee = self.Storage.getUint(keccak256(abi.encodePacked('fee.flat', contractAddress)));\n uint fees = ((amount.mul(bpsFee)).div(10000)).add(flatFee);\n\n if (fees > maxFee) {\n return maxFee;\n } else if (fees < minFee) {\n return minFee;\n } else {\n return fees;\n }\n }\n\n /**\n * @notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param accountA Ethereum address of first account holder to verify\n * @param accountB Ethereum address of second account holder to verify\n * @return { \"verified\" : \"Returns true if both accounts are successfully verified\" }\n */\n function verifyAccounts(Data storage self, address accountA, address accountB) internal view returns (bool verified) {\n require(\n verifyAccount(self, accountA),\n \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"\n );\n require(\n verifyAccount(self, accountB),\n \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"\n );\n return true;\n }\n\n /**\n * @notice Verified KYC and global status for a single account and return true or throw if account is not verified\n * @dev | This method has an `internal` view\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of account holder to verify\n * @return { \"verified\" : \"Returns true if account is successfully verified\" }\n */\n function verifyAccount(Data storage self, address account) internal view returns (bool verified) {\n require(\n getKYCApproval(self, account),\n \"Error: Account does not have KYC approval.\"\n );\n require(\n getAccountStatus(self, account),\n \"Error: Account status is `false`. Account status must be `true`.\"\n );\n return true;\n }\n\n\n /**\n * @notice Transfer an amount of currency token from msg.sender account to another specified account\n * @dev This function is called by an interface that is accessible directly to the account holder\n * @dev | This method has an `internal` view\n * @dev | This method uses `forceTransfer()` low-level api\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function transfer(Data storage self, string currency, address to, uint amount, bytes data) internal returns (bool success) {\n require(address(to) != 0x0, \"Error: `to` address cannot be null.\" );\n require(amount > 0, \"Error: `amount` must be greater than zero\");\n\n address feeContract = getFeeContract(self, address(this));\n uint fees = calculateFees(self, feeContract, amount);\n\n require(\n setAccountSpendingAmount(self, msg.sender, getFxUSDAmount(self, currency, amount)),\n \"Error: Unable to set spending amount for account.\");\n\n require(\n forceTransfer(self, currency, msg.sender, to, amount, data),\n \"Error: Unable to transfer funds to account.\");\n\n // @dev transfer fees to fee contract\n require(\n forceTransfer(self, currency, msg.sender, feeContract, fees, getFeeMsg(self, feeContract)),\n \"Error: Unable to transfer fees to fee contract.\");\n\n return true;\n }\n\n /**\n * @notice Transfer an amount of currency token from account to another specified account via an approved spender account\n * @dev This function is called by an interface that is accessible directly to the account spender\n * @dev | This method has an `internal` view\n * @dev | Transactions will fail if the spending amount exceeds the daily limit\n * @dev | This method uses `forceTransfer()` low-level api\n * @dev | This method implements ERC20 transferFrom() method with approved spender behavior\n * @dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param from Ethereum address of account to send currency amount from\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function transferFrom(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) {\n require(\n address(to) != 0x0,\n \"Error: `to` address must not be null.\"\n );\n\n address feeContract = getFeeContract(self, address(this));\n uint fees = calculateFees(self, feeContract, amount);\n\n /// @dev NOTE: This transaction will fail if the spending amount exceeds the daily limit\n require(\n setAccountSpendingAmount(self, from, getFxUSDAmount(self, currency, amount)),\n \"Error: Unable to set account spending amount.\"\n );\n\n /// @dev Attempt to transfer the amount\n require(\n forceTransfer(self, currency, from, to, amount, data),\n \"Error: Unable to transfer funds to account.\"\n );\n\n // @dev transfer fees to fee contract\n require(\n forceTransfer(self, currency, from, feeContract, fees, getFeeMsg(self, feeContract)),\n \"Error: Unable to transfer fees to fee contract.\"\n );\n\n /// @dev Attempt to update the spender allowance\n require(\n updateAllowance(self, currency, from, amount),\n \"Error: Unable to update allowance for spender.\"\n );\n\n return true;\n }\n\n /**\n * @notice Low-level transfer method\n * @dev | This method has an `internal` view\n * @dev | This method does not include fees or approved allowances.\n * @dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param from Ethereum address of account to send currency amount from\n * @param to Ethereum address of account to send currency amount to\n * @param amount Value of currency to transfer\n * @param data Arbitrary bytes data to include with the transaction\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function forceTransfer(Data storage self, string currency, address from, address to, uint amount, bytes data) internal returns (bool success) {\n require(\n address(to) != 0x0,\n \"Error: `to` address must not be null.\"\n );\n\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, from)));\n bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, to)));\n\n require(\n self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n require(\n self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n\n emit Transfer(currency, from, to, amount, data);\n\n return true;\n }\n\n /**\n * @notice Low-level method to update spender allowance for account\n * @dev | This method is called inside the `transferFrom()` method\n * @dev | msg.sender == spender address\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder\n * @param amount Value to reduce allowance by (i.e. the amount spent)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function updateAllowance(Data storage self, string currency, address account, uint amount) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, msg.sender)));\n require(\n self.Storage.setUint(id, self.Storage.getUint(id).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Low-level method to set the allowance for a spender\n * @dev | This method is called inside the `approve()` ERC20 method\n * @dev | msg.sender == account holder\n * @param self Internal storage proxying TokenIOStorage contract\n * @param spender Ethereum address of account spender\n * @param amount Value to set for spender allowance\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function approveAllowance(Data storage self, address spender, uint amount) internal returns (bool success) {\n require(spender != 0x0,\n \"Error: `spender` address cannot be null.\");\n\n string memory currency = getTokenSymbol(self, address(this));\n\n require(\n getTokenFrozenBalance(self, currency, getForwardedAccount(self, spender)) == 0,\n \"Error: Spender must not have a frozen balance directly\");\n\n bytes32 id_a = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, msg.sender), getForwardedAccount(self, spender)));\n bytes32 id_b = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, msg.sender)));\n\n require(\n self.Storage.getUint(id_a) == 0 || amount == 0,\n \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\");\n\n require(\n self.Storage.getUint(id_b) >= amount,\n \"Error: Allowance cannot exceed msg.sender token balance.\");\n\n require(\n self.Storage.setUint(id_a, amount),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Approval(msg.sender, spender, amount);\n\n return true;\n }\n\n /**\n * @notice Deposit an amount of currency into the Ethereum account holder\n * @dev | The total supply of the token increases only when new funds are deposited 1:1\n * @dev | This method should only be called by authorized issuer firms\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder to deposit funds for\n * @param amount Value of currency to deposit for account\n * @param issuerFirm Name of the issuing firm authorizing the deposit\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function deposit(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) {\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm));\n bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency));\n\n\n require(self.Storage.setUint(id_a, self.Storage.getUint(id_a).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(self.Storage.setUint(id_b, self.Storage.getUint(id_b).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(self.Storage.setUint(id_c, self.Storage.getUint(id_c).add(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Deposit(currency, account, amount, issuerFirm);\n\n return true;\n\n }\n\n /**\n * @notice Withdraw an amount of currency from the Ethereum account holder\n * @dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n * @dev | This method should only be called by authorized issuer firms\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n * @param account Ethereum address of account holder to deposit funds for\n * @param amount Value of currency to withdraw for account\n * @param issuerFirm Name of the issuing firm authorizing the withdraw\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function withdraw(Data storage self, string currency, address account, uint amount, string issuerFirm) internal returns (bool success) {\n bytes32 id_a = keccak256(abi.encodePacked('token.balance', currency, getForwardedAccount(self, account)));\n bytes32 id_b = keccak256(abi.encodePacked('token.issued', currency, issuerFirm)); // possible for issuer to go negative\n bytes32 id_c = keccak256(abi.encodePacked('token.supply', currency));\n\n require(\n self.Storage.setUint(id_a, self.Storage.getUint(id_a).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(\n self.Storage.setUint(id_b, self.Storage.getUint(id_b).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n require(\n self.Storage.setUint(id_c, self.Storage.getUint(id_c).sub(amount)),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n emit Withdraw(currency, account, amount, issuerFirm);\n\n return true;\n\n }\n\n /**\n * @notice Method for setting a registered issuer firm\n * @dev | Only Token, Inc. and other authorized institutions may set a registered firm\n * @dev | The TokenIOAuthority.sol interface wraps this method\n * @dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the firm to be registered\n * @param approved Approval status to set for the firm (true/false)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setRegisteredFirm(Data storage self, string issuerFirm, bool approved) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm));\n require(\n self.Storage.setBool(id, approved),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"\n );\n return true;\n }\n\n /**\n * @notice Method for setting a registered issuer firm authority\n * @dev | Only Token, Inc. and other approved institutions may set a registered firm\n * @dev | The TokenIOAuthority.sol interface wraps this method\n * @dev | Authority can only be set for a registered issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the firm to be registered to authority\n * @param authorityAddress Ethereum address of the firm authority to be approved\n * @param approved Approval status to set for the firm authority (true/false)\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setRegisteredAuthority(Data storage self, string issuerFirm, address authorityAddress, bool approved) internal returns (bool success) {\n require(\n isRegisteredFirm(self, issuerFirm),\n \"Error: `issuerFirm` must be registered.\");\n\n bytes32 id_a = keccak256(abi.encodePacked('registered.authority', issuerFirm, authorityAddress));\n bytes32 id_b = keccak256(abi.encodePacked('registered.authority.firm', authorityAddress));\n\n require(\n self.Storage.setBool(id_a, approved),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n require(\n self.Storage.setString(id_b, issuerFirm),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n\n return true;\n }\n\n /**\n * @notice Get the issuer firm registered to the authority Ethereum address\n * @dev | Only one firm can be registered per authority\n * @param self Internal storage proxying TokenIOStorage contract\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"issuerFirm\" : \"Name of the firm registered to authority\" }\n */\n function getFirmFromAuthority(Data storage self, address authorityAddress) internal view returns (string issuerFirm) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority.firm', getForwardedAccount(self, authorityAddress)));\n return self.Storage.getString(id);\n }\n\n /**\n * @notice Return the boolean (true/false) registration status for an issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the issuer firm\n * @return { \"registered\" : \"Return if the issuer firm has been registered\" }\n */\n function isRegisteredFirm(Data storage self, string issuerFirm) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.firm', issuerFirm));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param issuerFirm Name of the issuer firm\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }\n */\n function isRegisteredToFirm(Data storage self, string issuerFirm, address authorityAddress) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority', issuerFirm, getForwardedAccount(self, authorityAddress)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return if an authority address is registered\n * @dev | This also checks the status of the registered issuer firm\n * @param self Internal storage proxying TokenIOStorage contract\n * @param authorityAddress Ethereum address of the firm authority to query\n * @return { \"registered\" : \"Return if the authority is registered\" }\n */\n function isRegisteredAuthority(Data storage self, address authorityAddress) internal view returns (bool registered) {\n bytes32 id = keccak256(abi.encodePacked('registered.authority', getFirmFromAuthority(self, getForwardedAccount(self, authorityAddress)), getForwardedAccount(self, authorityAddress)));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Return boolean transaction status if the transaction has been used\n * @param self Internal storage proxying TokenIOStorage contract\n * @param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n * @return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}\n */\n function getTxStatus(Data storage self, bytes32 txHash) internal view returns (bool txStatus) {\n bytes32 id = keccak256(abi.encodePacked('tx.status', txHash));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Set transaction status if the transaction has been used\n * @param self Internal storage proxying TokenIOStorage contract\n * @param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n * @return { \"success\" : \"Return true if successfully called from another contract\" }\n */\n function setTxStatus(Data storage self, bytes32 txHash) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('tx.status', txHash));\n /// @dev Ensure transaction has not yet been used;\n require(!getTxStatus(self, txHash),\n \"Error: Transaction status must be false before setting the transaction status.\");\n\n /// @dev Update the status of the transaction;\n require(self.Storage.setBool(id, true),\n \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Accepts a signed fx request to swap currency pairs at a given amount;\n * @dev | This method can be called directly between peers\n * @dev | This method does not take transaction fees from the swap\n * @param self Internal storage proxying TokenIOStorage contract\n * @param requester address Requester is the orginator of the offer and must\n * match the signature of the payload submitted by the fulfiller\n * @param symbolA Symbol of the currency desired\n * @param symbolB Symbol of the currency offered\n * @param valueA Amount of the currency desired\n * @param valueB Amount of the currency offered\n * @param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n * @param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n * @param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n * @param expiration Expiration of the offer; Offer is good until expired\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function execSwap(\n Data storage self,\n address requester,\n string symbolA,\n string symbolB,\n uint valueA,\n uint valueB,\n uint8 sigV,\n bytes32 sigR,\n bytes32 sigS,\n uint expiration\n ) internal returns (bool success) {\n\n bytes32 fxTxHash = keccak256(abi.encodePacked(requester, symbolA, symbolB, valueA, valueB, expiration));\n\n /// @notice check that sender and requester accounts are verified\n /// @notice Only verified accounts can perform currency swaps\n require(\n verifyAccounts(self, msg.sender, requester),\n \"Error: Only verified accounts can perform currency swaps.\");\n\n /// @dev Immediately set this transaction to be confirmed before updating any params;\n require(\n setTxStatus(self, fxTxHash),\n \"Error: Failed to set transaction status to fulfilled.\");\n\n /// @dev Ensure contract has not yet expired;\n require(expiration >= now, \"Error: Transaction has expired!\");\n\n /// @dev Recover the address of the signature from the hashed digest;\n /// @dev Ensure it equals the requester's address\n require(\n ecrecover(fxTxHash, sigV, sigR, sigS) == requester,\n \"Error: Address derived from transaction signature does not match the requester address\");\n\n /// @dev Transfer funds from each account to another.\n require(\n forceTransfer(self, symbolA, msg.sender, requester, valueA, \"0x0\"),\n \"Error: Unable to transfer funds to account.\");\n\n require(\n forceTransfer(self, symbolB, requester, msg.sender, valueB, \"0x0\"),\n \"Error: Unable to transfer funds to account.\");\n\n emit FxSwap(symbolA, symbolB, valueA, valueB, expiration, fxTxHash);\n\n return true;\n }\n\n /**\n * @notice Deprecate a contract interface\n * @dev | This is a low-level method to deprecate a contract interface.\n * @dev | This is useful if the interface needs to be updated or becomes out of date\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Ethereum address of the contract interface\n * @return {\"success\" : \"Returns true if successfully called from another contract\"}\n */\n function setDeprecatedContract(Data storage self, address contractAddress) internal returns (bool success) {\n require(contractAddress != 0x0,\n \"Error: cannot deprecate a null address.\");\n\n bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress));\n\n require(self.Storage.setBool(id, true),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Return the deprecation status of a contract\n * @param self Internal storage proxying TokenIOStorage contract\n * @param contractAddress Ethereum address of the contract interface\n * @return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}\n */\n function isContractDeprecated(Data storage self, address contractAddress) internal view returns (bool status) {\n bytes32 id = keccak256(abi.encodePacked('depcrecated', contractAddress));\n return self.Storage.getBool(id);\n }\n\n /**\n * @notice Set the Account Spending Period Limit as UNIX timestamp\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param period Unix timestamp of the spending period\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingPeriod(Data storage self, address account, uint period) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('limit.spending.period', account));\n require(self.Storage.setUint(id, period),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Get the Account Spending Period Limit as UNIX timestamp\n * @dev | Each account has it's own daily spending limit\n * @dev | If the current spending period has expired, it will be set upon next `transfer()`\n * or `transferFrom()` request\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"period\" : \"Returns Unix timestamp of the current spending period\"}\n */\n function getAccountSpendingPeriod(Data storage self, address account) internal view returns (uint period) {\n bytes32 id = keccak256(abi.encodePacked('limit.spending.period', account));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the account spending limit amount\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param limit Spending limit amount\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingLimit(Data storage self, address account, uint limit) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.limit', account));\n require(self.Storage.setUint(id, limit),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Get the account spending limit amount\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"limit\" : \"Returns the account spending limit amount\"}\n */\n function getAccountSpendingLimit(Data storage self, address account) internal view returns (uint limit) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.limit', account));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Set the account spending amount for the daily period\n * @dev | Each account has it's own daily spending limit\n * @dev | This transaction will throw if the new spending amount is greater than the limit\n * @dev | This method is called in the `transfer()` and `transferFrom()` methods\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @param amount Set the amount spent for the daily period\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function setAccountSpendingAmount(Data storage self, address account, uint amount) internal returns (bool success) {\n\n /// @dev NOTE: Always ensure the period is current when checking the daily spend limit\n require(updateAccountSpendingPeriod(self, account),\n \"Error: Unable to update account spending period.\");\n\n uint updatedAmount = getAccountSpendingAmount(self, account).add(amount);\n\n /// @dev Ensure the spend limit is greater than the amount spend for the period\n require(\n getAccountSpendingLimit(self, account) >= updatedAmount,\n \"Error: Account cannot exceed its daily spend limit.\");\n\n /// @dev Update the spending period amount if within limit\n bytes32 id = keccak256(abi.encodePacked('account.spending.amount', account, getAccountSpendingPeriod(self, account)));\n require(self.Storage.setUint(id, updatedAmount),\n \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\");\n\n return true;\n }\n\n /**\n * @notice Low-level API to ensure the account spending period is always current\n * @dev | This method is internally called by `setAccountSpendingAmount()` to ensure\n * spending period is always the most current daily period.\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"success\" : \"Returns true is successfully called from a contract\"}\n */\n function updateAccountSpendingPeriod(Data storage self, address account) internal returns (bool success) {\n uint begDate = getAccountSpendingPeriod(self, account);\n if (begDate > now) {\n return true;\n } else {\n uint duration = 86400; // 86400 seconds in a day\n require(\n setAccountSpendingPeriod(self, account, begDate.add(((now.sub(begDate)).div(duration).add(1)).mul(duration))),\n \"Error: Unable to update account spending period.\");\n\n return true;\n }\n }\n\n /**\n * @notice Return the amount spent during the current period\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"amount\" : \"Returns the amount spent by the account during the current period\"}\n */\n function getAccountSpendingAmount(Data storage self, address account) internal view returns (uint amount) {\n bytes32 id = keccak256(abi.encodePacked('account.spending.amount', account, getAccountSpendingPeriod(self, account)));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Return the amount remaining during the current period\n * @dev | Each account has it's own daily spending limit\n * @param self Internal storage proxying TokenIOStorage contract\n * @param account Ethereum address of the account holder\n * @return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}\n */\n function getAccountSpendingRemaining(Data storage self, address account) internal view returns (uint remainingLimit) {\n return getAccountSpendingLimit(self, account).sub(getAccountSpendingAmount(self, account));\n }\n\n /**\n * @notice Set the foreign currency exchange rate to USD in basis points\n * @dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param bpsRate Basis point rate of foreign currency exchange rate to USD\n * @return { \"success\": \"Returns true if successfully called from another contract\"}\n */\n function setFxUSDBPSRate(Data storage self, string currency, uint bpsRate) internal returns (bool success) {\n bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency));\n require(\n self.Storage.setUint(id, bpsRate),\n \"Error: Unable to update account spending period.\");\n\n return true;\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount in basis points\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDBPSRate(Data storage self, string currency) internal view returns (uint bpsRate) {\n bytes32 id = keccak256(abi.encodePacked('fx.usd.rate', currency));\n return self.Storage.getUint(id);\n }\n\n /**\n * @notice Return the foreign currency USD exchanged amount\n * @param self Internal storage proxying TokenIOStorage contract\n * @param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n * @param fxAmount Amount of foreign currency to exchange into USD\n * @return {\"amount\" : \"Returns the foreign currency amount in USD\"}\n */\n function getFxUSDAmount(Data storage self, string currency, uint fxAmount) internal view returns (uint amount) {\n uint usdDecimals = getTokenDecimals(self, 'USDx');\n uint fxDecimals = getTokenDecimals(self, currency);\n /// @dev ensure decimal precision is normalized to USD decimals\n uint usdAmount = ((fxAmount.mul(getFxUSDBPSRate(self, currency)).div(10000)).mul(10**usdDecimals)).div(10**fxDecimals);\n return usdAmount;\n }\n\n\n}\n", - "sourcePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", - "ast": { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", - "exportedSymbols": { - "TokenIOLib": [ - 4606 - ] - }, - "id": 4607, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1622, - "literals": [ - "solidity", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:23:8" - }, - { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", - "file": "./SafeMath.sol", - "id": 1623, - "nodeType": "ImportDirective", - "scope": 4607, - "sourceUnit": 286, - "src": "25:24:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", - "file": "./TokenIOStorage.sol", - "id": 1624, - "nodeType": "ImportDirective", - "scope": 4607, - "sourceUnit": 5226, - "src": "50:30:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title TokenIOLib\n@author Ryan Tate , Sean Pollock \n@notice This library proxies the TokenIOStorage contract for the interface contract,\nallowing the library and the interfaces to remain stateless, and share a universally\navailable storage contract between interfaces.", - "fullyImplemented": true, - "id": 4606, - "linearizedBaseContracts": [ - 4606 - ], - "name": "TokenIOLib", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 1627, - "libraryName": { - "contractScope": null, - "id": 1625, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 285, - "src": "1018:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$285", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "1012:24:8", - "typeName": { - "id": 1626, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1031:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "canonicalName": "TokenIOLib.Data", - "id": 1630, - "members": [ - { - "constant": false, - "id": 1629, - "name": "Storage", - "nodeType": "VariableDeclaration", - "scope": 1630, - "src": "1132:22:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - }, - "typeName": { - "contractScope": null, - "id": 1628, - "name": "TokenIOStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5225, - "src": "1132:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Data", - "nodeType": "StructDefinition", - "scope": 4606, - "src": "1114:45:8", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice Not using `Log` prefix for events to be consistent with ERC20 named events;", - "id": 1638, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1637, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1632, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1638, - "src": "1268:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1631, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1268:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1634, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1638, - "src": "1291:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1633, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1291:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1636, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1638, - "src": "1316:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1635, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1316:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1267:61:8" - }, - "src": "1253:76:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1648, - "name": "Deposit", - "nodeType": "EventDefinition", - "parameters": { - "id": 1647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1640, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1648, - "src": "1346:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1639, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1346:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1642, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1648, - "src": "1363:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1641, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1363:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1644, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1648, - "src": "1388:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1643, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1388:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1646, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1648, - "src": "1401:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1645, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1401:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1345:74:8" - }, - "src": "1332:88:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1658, - "name": "Withdraw", - "nodeType": "EventDefinition", - "parameters": { - "id": 1657, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1650, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1658, - "src": "1438:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1649, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1438:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1652, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1658, - "src": "1455:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1651, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1455:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1654, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1658, - "src": "1480:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1653, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1480:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1656, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1658, - "src": "1493:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1655, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1493:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1437:74:8" - }, - "src": "1423:89:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1670, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 1669, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1660, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1530:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1659, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1530:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1662, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1547:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1661, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1547:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1664, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1569:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1663, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1569:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1666, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1589:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1665, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1589:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1668, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1602:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1667, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1602:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1529:84:8" - }, - "src": "1515:99:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1678, - "name": "KYCApproval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1677, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1672, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1678, - "src": "1635:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1671, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1635:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1674, - "indexed": false, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1678, - "src": "1660:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1673, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1660:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1676, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1678, - "src": "1673:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1675, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1673:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1634:57:8" - }, - "src": "1617:75:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1686, - "name": "AccountStatus", - "nodeType": "EventDefinition", - "parameters": { - "id": 1685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1680, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1715:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1679, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1715:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1682, - "indexed": false, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1740:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1681, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1740:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1684, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1753:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1683, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1753:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1714:57:8" - }, - "src": "1695:77:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1700, - "name": "FxSwap", - "nodeType": "EventDefinition", - "parameters": { - "id": 1699, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1688, - "indexed": false, - "name": "tokenASymbol", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1788:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1687, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1788:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1690, - "indexed": false, - "name": "tokenBSymbol", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1808:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1689, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1808:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1692, - "indexed": false, - "name": "tokenAValue", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1828:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1691, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1828:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1694, - "indexed": false, - "name": "tokenBValue", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1845:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1693, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1845:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1696, - "indexed": false, - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1863:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1695, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1863:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1698, - "indexed": false, - "name": "transactionHash", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1880:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1697, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1880:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1787:117:8" - }, - "src": "1775:130:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1706, - "name": "AccountForward", - "nodeType": "EventDefinition", - "parameters": { - "id": 1705, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1702, - "indexed": true, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 1706, - "src": "1929:31:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1929:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1704, - "indexed": true, - "name": "forwardedAccount", - "nodeType": "VariableDeclaration", - "scope": 1706, - "src": "1962:32:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1703, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1962:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1928:67:8" - }, - "src": "1908:88:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1712, - "name": "NewAuthority", - "nodeType": "EventDefinition", - "parameters": { - "id": 1711, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1708, - "indexed": true, - "name": "authority", - "nodeType": "VariableDeclaration", - "scope": 1712, - "src": "2018:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1707, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2018:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1710, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1712, - "src": "2045:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1709, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2045:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2017:46:8" - }, - "src": "1999:65:8" - }, - { - "body": { - "id": 1745, - "nodeType": "Block", - "src": "2554:275:8", - "statements": [ - { - "assignments": [ - 1722 - ], - "declarations": [ - { - "constant": false, - "id": 1722, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1746, - "src": "2560:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1721, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2560:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1732, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d65", - "id": 1726, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2600:12:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - "value": "token.name" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1728, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "2622:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2614:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2614:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1724, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "2583:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1725, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2583:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2583:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1723, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "2573:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2573:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2560:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1737, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1722, - "src": "2673:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1738, - "name": "tokenName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1716, - "src": "2677:9:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1734, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1714, - "src": "2650:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1735, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "2650:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "2650:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2650:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1740, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2695:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1733, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "2635:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2635:172:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1742, - "nodeType": "ExpressionStatement", - "src": "2635:172:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2820:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1720, - "id": 1744, - "nodeType": "Return", - "src": "2813:11:8" - } - ] - }, - "documentation": "@notice Set the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenName Name of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1746, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1717, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1714, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1746, - "src": "2485:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1713, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "2485:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1716, - "name": "tokenName", - "nodeType": "VariableDeclaration", - "scope": 1746, - "src": "2504:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1715, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2504:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2484:37:8" - }, - "payable": false, - "returnParameters": { - "id": 1720, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1719, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1746, - "src": "2540:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1718, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2540:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2539:14:8" - }, - "scope": 4606, - "src": "2463:366:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1779, - "nodeType": "Block", - "src": "3329:279:8", - "statements": [ - { - "assignments": [ - 1756 - ], - "declarations": [ - { - "constant": false, - "id": 1756, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1780, - "src": "3335:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1755, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3335:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1766, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e73796d626f6c", - "id": 1760, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3375:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - "value": "token.symbol" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1762, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "3399:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1761, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3391:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3391:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1758, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "3358:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1759, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3358:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3358:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1757, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "3348:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3348:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3335:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1771, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1756, - "src": "3450:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1772, - "name": "tokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1750, - "src": "3454:11:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1768, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1748, - "src": "3427:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1769, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "3427:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "3427:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3427:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1774, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3474:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1767, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "3412:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3412:174:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1776, - "nodeType": "ExpressionStatement", - "src": "3412:174:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3599:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1754, - "id": 1778, - "nodeType": "Return", - "src": "3592:11:8" - } - ] - }, - "documentation": "@notice Set the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenSymbol Symbol of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1780, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenSymbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1751, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1748, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1780, - "src": "3258:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1747, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "3258:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1750, - "name": "tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 1780, - "src": "3277:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1749, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3277:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3257:39:8" - }, - "payable": false, - "returnParameters": { - "id": 1754, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1753, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1780, - "src": "3315:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1752, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3315:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3314:14:8" - }, - "scope": 4606, - "src": "3234:374:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1813, - "nodeType": "Block", - "src": "4120:273:8", - "statements": [ - { - "assignments": [ - 1790 - ], - "declarations": [ - { - "constant": false, - "id": 1790, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1814, - "src": "4126:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1789, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4126:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1800, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e746c61", - "id": 1794, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4166:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - "value": "token.tla" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1796, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "4187:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4179:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4179:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1792, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "4149:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1793, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4149:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4149:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1791, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "4139:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4139:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4126:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1805, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1790, - "src": "4238:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1806, - "name": "tokenTLA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1784, - "src": "4242:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1802, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1782, - "src": "4215:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1803, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "4215:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "4215:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4215:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4259:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1801, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "4200:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4200:171:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1810, - "nodeType": "ExpressionStatement", - "src": "4200:171:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1811, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4384:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1788, - "id": 1812, - "nodeType": "Return", - "src": "4377:11:8" - } - ] - }, - "documentation": "@notice Set the token three letter abreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenTLA TLA of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1814, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenTLA", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1785, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1782, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1814, - "src": "4052:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1781, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "4052:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1784, - "name": "tokenTLA", - "nodeType": "VariableDeclaration", - "scope": 1814, - "src": "4071:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1783, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4071:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4051:36:8" - }, - "payable": false, - "returnParameters": { - "id": 1788, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1787, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1814, - "src": "4106:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1786, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4106:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4105:14:8" - }, - "scope": 4606, - "src": "4031:362:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1847, - "nodeType": "Block", - "src": "4942:281:8", - "statements": [ - { - "assignments": [ - 1824 - ], - "declarations": [ - { - "constant": false, - "id": 1824, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1848, - "src": "4948:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1823, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4948:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1834, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e76657273696f6e", - "id": 1828, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4988:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - "value": "token.version" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1830, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "5013:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5005:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5005:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1826, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "4971:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1827, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4971:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4971:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1825, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "4961:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4961:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4948:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1839, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1824, - "src": "5064:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1840, - "name": "tokenVersion", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1818, - "src": "5068:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1836, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1816, - "src": "5041:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1837, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "5041:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "5041:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5041:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5089:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1835, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "5026:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5026:175:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1844, - "nodeType": "ExpressionStatement", - "src": "5026:175:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1845, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5214:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1822, - "id": 1846, - "nodeType": "Return", - "src": "5207:11:8" - } - ] - }, - "documentation": "@notice Set the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1848, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenVersion", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1819, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1816, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1848, - "src": "4870:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1815, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "4870:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1818, - "name": "tokenVersion", - "nodeType": "VariableDeclaration", - "scope": 1848, - "src": "4889:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1817, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4889:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4869:40:8" - }, - "payable": false, - "returnParameters": { - "id": 1822, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1821, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1848, - "src": "4928:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1820, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4928:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4927:14:8" - }, - "scope": 4606, - "src": "4845:378:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1881, - "nodeType": "Block", - "src": "6051:276:8", - "statements": [ - { - "assignments": [ - 1860 - ], - "declarations": [ - { - "constant": false, - "id": 1860, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "6057:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1859, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6057:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1868, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e646563696d616c73", - "id": 1864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6097:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - "value": "token.decimals" - }, - { - "argumentTypes": null, - "id": 1865, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1852, - "src": "6115:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1862, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "6080:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6080:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1866, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6080:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1861, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "6070:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6070:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6057:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1873, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1860, - "src": "6167:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1874, - "name": "tokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1854, - "src": "6171:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1870, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1850, - "src": "6146:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1871, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "6146:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "6146:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6146:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6193:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1869, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "6131:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6131:174:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1878, - "nodeType": "ExpressionStatement", - "src": "6131:174:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6318:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1858, - "id": 1880, - "nodeType": "Return", - "src": "6311:11:8" - } - ] - }, - "documentation": "@notice Set the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@dev This method is not set to the address of the contract, rather is maped to currency\n@dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param tokenDecimals Decimal representation of the token contract unit amount\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1882, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenDecimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1855, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1850, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "5963:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1849, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "5963:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1852, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "5982:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1851, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5982:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1854, - "name": "tokenDecimals", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "5999:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1853, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5999:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5962:56:8" - }, - "payable": false, - "returnParameters": { - "id": 1858, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1857, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "6037:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1856, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6037:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6036:14:8" - }, - "scope": 4606, - "src": "5937:390:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1915, - "nodeType": "Block", - "src": "6887:267:8", - "statements": [ - { - "assignments": [ - 1892 - ], - "declarations": [ - { - "constant": false, - "id": 1892, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1916, - "src": "6893:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1891, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6893:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1902, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 1896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6933:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1898, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "6952:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1897, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6944:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6944:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1894, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "6916:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1895, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6916:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6916:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1893, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "6906:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6906:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6893:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1907, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1892, - "src": "7001:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1908, - "name": "feeBPS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1886, - "src": "7005:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1904, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1884, - "src": "6980:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1905, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "6980:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "6980:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6980:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1910, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7020:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1903, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "6965:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6965:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1912, - "nodeType": "ExpressionStatement", - "src": "6965:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7145:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1890, - "id": 1914, - "nodeType": "Return", - "src": "7138:11:8" - } - ] - }, - "documentation": "@notice Set basis point fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeBPS Basis points fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1916, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeBPS", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1887, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1884, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1916, - "src": "6823:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1883, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "6823:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1886, - "name": "feeBPS", - "nodeType": "VariableDeclaration", - "scope": 1916, - "src": "6842:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1885, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6842:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6822:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1889, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1916, - "src": "6873:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1888, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6873:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6872:14:8" - }, - "scope": 4606, - "src": "6804:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1949, - "nodeType": "Block", - "src": "7705:267:8", - "statements": [ - { - "assignments": [ - 1926 - ], - "declarations": [ - { - "constant": false, - "id": 1926, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1950, - "src": "7711:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7711:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1936, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 1930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7751:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1932, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "7770:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1931, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7762:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7762:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1928, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "7734:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7734:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7734:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1927, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "7724:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7724:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7711:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1941, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1926, - "src": "7819:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1942, - "name": "feeMin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1920, - "src": "7823:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1938, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1918, - "src": "7798:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1939, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "7798:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "7798:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7798:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7838:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "7783:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7783:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1946, - "nodeType": "ExpressionStatement", - "src": "7783:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1947, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7963:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1924, - "id": 1948, - "nodeType": "Return", - "src": "7956:11:8" - } - ] - }, - "documentation": "@notice Set minimum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMin Minimum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1950, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1921, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1918, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1950, - "src": "7641:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1917, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "7641:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1920, - "name": "feeMin", - "nodeType": "VariableDeclaration", - "scope": 1950, - "src": "7660:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1919, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7660:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7640:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1924, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1923, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1950, - "src": "7691:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1922, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7691:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7690:14:8" - }, - "scope": 4606, - "src": "7622:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1983, - "nodeType": "Block", - "src": "8523:267:8", - "statements": [ - { - "assignments": [ - 1960 - ], - "declarations": [ - { - "constant": false, - "id": 1960, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1984, - "src": "8529:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1959, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8529:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1970, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 1964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8569:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1966, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "8588:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8580:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8580:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1962, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "8552:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8552:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8552:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1961, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "8542:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8542:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8529:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1975, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1960, - "src": "8637:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1976, - "name": "feeMax", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1954, - "src": "8641:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1972, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1952, - "src": "8616:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1973, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "8616:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "8616:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8616:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8656:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1971, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "8601:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8601:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1980, - "nodeType": "ExpressionStatement", - "src": "8601:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8781:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1958, - "id": 1982, - "nodeType": "Return", - "src": "8774:11:8" - } - ] - }, - "documentation": "@notice Set maximum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMax Maximum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1984, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMax", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1952, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1984, - "src": "8459:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1951, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "8459:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1954, - "name": "feeMax", - "nodeType": "VariableDeclaration", - "scope": 1984, - "src": "8478:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1953, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8478:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8458:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1958, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1957, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1984, - "src": "8509:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1956, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8509:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8508:14:8" - }, - "scope": 4606, - "src": "8440:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2017, - "nodeType": "Block", - "src": "9338:269:8", - "statements": [ - { - "assignments": [ - 1994 - ], - "declarations": [ - { - "constant": false, - "id": 1994, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2018, - "src": "9344:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1993, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9344:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2004, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 1998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9384:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2000, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "9404:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1999, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9396:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9396:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1996, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "9367:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9367:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9367:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1995, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "9357:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9357:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9344:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2009, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1994, - "src": "9453:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2010, - "name": "feeFlat", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1988, - "src": "9457:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2006, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1986, - "src": "9432:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2007, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "9432:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "9432:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 2011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9432:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9473:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2005, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "9417:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9417:168:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2014, - "nodeType": "ExpressionStatement", - "src": "9417:168:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2015, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9598:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1992, - "id": 2016, - "nodeType": "Return", - "src": "9591:11:8" - } - ] - }, - "documentation": "@notice Set flat fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeFlat Flat fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2018, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeFlat", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1986, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2018, - "src": "9273:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1985, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "9273:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1988, - "name": "feeFlat", - "nodeType": "VariableDeclaration", - "scope": 2018, - "src": "9292:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1987, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9292:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9272:33:8" - }, - "payable": false, - "returnParameters": { - "id": 1992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1991, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2018, - "src": "9324:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1990, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9324:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9323:14:8" - }, - "scope": 4606, - "src": "9253:354:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2051, - "nodeType": "Block", - "src": "10188:268:8", - "statements": [ - { - "assignments": [ - 2028 - ], - "declarations": [ - { - "constant": false, - "id": 2028, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "10194:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2027, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10194:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2038, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d7367", - "id": 2032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10234:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - "value": "fee.msg" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2034, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "10253:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 2033, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10245:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10245:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2030, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "10217:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2031, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10217:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10217:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2029, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "10207:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10207:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10194:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2043, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2028, - "src": "10303:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2044, - "name": "feeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2022, - "src": "10307:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2040, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2020, - "src": "10281:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "10281:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBytes", - "nodeType": "MemberAccess", - "referencedDeclaration": 5010, - "src": "10281:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,bytes memory) external returns (bool)" - } - }, - "id": 2045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10281:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2046, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10322:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2039, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "10266:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10266:168:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2048, - "nodeType": "ExpressionStatement", - "src": "10266:168:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2049, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10447:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2026, - "id": 2050, - "nodeType": "Return", - "src": "10440:11:8" - } - ] - }, - "documentation": "@notice Set fee message for contract interface\n@dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n@dev Fee messages vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMsg Fee message included in a transaction with fees\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2052, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMsg", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2023, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2020, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "10123:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2019, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "10123:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2022, - "name": "feeMsg", - "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "10142:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2021, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10142:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10122:33:8" - }, - "payable": false, - "returnParameters": { - "id": 2026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2025, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "10174:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2024, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10174:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10173:14:8" - }, - "scope": 4606, - "src": "10104:352:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2085, - "nodeType": "Block", - "src": "11121:279:8", - "statements": [ - { - "assignments": [ - 2062 - ], - "declarations": [ - { - "constant": false, - "id": 2062, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2086, - "src": "11127:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2061, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11127:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2072, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6163636f756e74", - "id": 2066, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11167:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - "value": "fee.account" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2068, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "11190:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 2067, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11182:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11182:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2064, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "11150:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11150:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11150:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2063, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "11140:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11140:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11127:70:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2077, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2062, - "src": "11242:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2078, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2056, - "src": "11246:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2074, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2054, - "src": "11218:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2075, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "11218:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4950, - "src": "11218:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11218:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11266:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2073, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "11203:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11203:175:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2082, - "nodeType": "ExpressionStatement", - "src": "11203:175:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11391:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2060, - "id": 2084, - "nodeType": "Return", - "src": "11384:11:8" - } - ] - }, - "documentation": "@notice Set fee contract for a contract interface\n@dev feeContract must be a TokenIOFeeContract storage approved contract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@dev | This must be called directly from the interface contract\n@param self Internal storage proxying TokenIOStorage contract\n@param feeContract Set the fee contract for `this` contract address interface\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2086, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2057, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2054, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2086, - "src": "11049:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2053, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "11049:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2056, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 2086, - "src": "11068:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2055, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11068:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11048:40:8" - }, - "payable": false, - "returnParameters": { - "id": 2060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2059, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2086, - "src": "11107:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2058, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11107:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11106:14:8" - }, - "scope": 4606, - "src": "11025:375:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2119, - "nodeType": "Block", - "src": "12035:280:8", - "statements": [ - { - "assignments": [ - 2096 - ], - "declarations": [ - { - "constant": false, - "id": 2096, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2120, - "src": "12041:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2095, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12041:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2104, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d657370616365", - "id": 2100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12081:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - "value": "token.namespace" - }, - { - "argumentTypes": null, - "id": 2101, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2090, - "src": "12100:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2098, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "12064:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12064:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12064:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2097, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "12054:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12054:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12041:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2109, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2096, - "src": "12155:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2111, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "12167:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 2110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12159:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12159:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2106, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2088, - "src": "12131:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2107, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "12131:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4950, - "src": "12131:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12131:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12181:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2105, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "12116:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12116:177:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2116, - "nodeType": "ExpressionStatement", - "src": "12116:177:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2117, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12306:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2094, - "id": 2118, - "nodeType": "Return", - "src": "12299:11:8" - } - ] - }, - "documentation": "@notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n@dev | This should only be called once from a token interface contract;\n@dev | This method has an `internal` view\n@dev | This method is experimental and may be deprecated/refactored\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2120, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenNameSpace", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2091, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2088, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2120, - "src": "11967:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2087, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "11967:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2090, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2120, - "src": "11986:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2089, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11986:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11966:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2094, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2093, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2120, - "src": "12021:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2092, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12021:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12020:14:8" - }, - "scope": 4606, - "src": "11940:375:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2164, - "nodeType": "Block", - "src": "13113:435:8", - "statements": [ - { - "assignments": [ - 2134 - ], - "declarations": [ - { - "constant": false, - "id": 2134, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13121:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2133, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13121:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2145, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e6b7963", - "id": 2138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13161:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - "value": "account.kyc" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2140, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2122, - "src": "13196:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2141, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2124, - "src": "13202:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2139, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "13176:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13176:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2136, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "13144:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13144:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13144:67:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2135, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "13134:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13134:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13121:91:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2150, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2134, - "src": "13258:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2151, - "name": "isApproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2126, - "src": "13262:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2147, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2122, - "src": "13237:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2148, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "13237:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "13237:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 2152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13237:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13283:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2146, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "13220:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13220:177:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2155, - "nodeType": "ExpressionStatement", - "src": "13220:177:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2157, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2124, - "src": "13492:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2158, - "name": "isApproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2126, - "src": "13501:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2159, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2128, - "src": "13513:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2156, - "name": "KYCApproval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1678, - "src": "13480:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,bool,string memory)" - } - }, - "id": 2160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13480:44:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2161, - "nodeType": "EmitStatement", - "src": "13475:49:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13539:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2132, - "id": 2163, - "nodeType": "Return", - "src": "13532:11:8" - } - ] - }, - "documentation": "@notice Set the KYC approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isApproved Boolean (true/false) KYC approval status for a given account\n@param issuerFirm Firm name for issuing KYC approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2165, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setKYCApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2129, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2122, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13009:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2121, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "13009:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2124, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13028:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13028:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2126, - "name": "isApproved", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13045:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2125, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13045:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2128, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13062:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2127, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "13062:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13008:72:8" - }, - "payable": false, - "returnParameters": { - "id": 2132, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2131, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13099:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2130, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13099:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13098:14:8" - }, - "scope": 4606, - "src": "12985:563:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2209, - "nodeType": "Block", - "src": "14343:419:8", - "statements": [ - { - "assignments": [ - 2179 - ], - "declarations": [ - { - "constant": false, - "id": 2179, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14349:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2178, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14349:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2190, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e616c6c6f776564", - "id": 2183, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14389:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - "value": "account.allowed" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2185, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "14428:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2186, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2169, - "src": "14434:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2184, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "14408:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14408:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2181, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "14372:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14372:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14372:71:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2180, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "14362:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14362:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14349:95:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2195, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "14486:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2196, - "name": "isAllowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2171, - "src": "14490:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2192, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "14465:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2193, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "14465:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "14465:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 2197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14465:35:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14508:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2191, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "14450:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14450:170:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2200, - "nodeType": "ExpressionStatement", - "src": "14450:170:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2202, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2169, - "src": "14709:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2203, - "name": "isAllowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2171, - "src": "14718:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2204, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "14729:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2201, - "name": "AccountStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1686, - "src": "14695:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,bool,string memory)" - } - }, - "id": 2205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14695:45:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2206, - "nodeType": "EmitStatement", - "src": "14690:50:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14753:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2177, - "id": 2208, - "nodeType": "Return", - "src": "14746:11:8" - } - ] - }, - "documentation": "@notice Set the global approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isAllowed Boolean (true/false) global status for a given account\n@param issuerFirm Firm name for issuing approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2210, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2167, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14240:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2166, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "14240:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2169, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14259:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2168, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14259:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2171, - "name": "isAllowed", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14276:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2170, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14276:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2173, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14292:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2172, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14292:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14239:71:8" - }, - "payable": false, - "returnParameters": { - "id": 2177, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2176, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14329:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2175, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14329:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14328:14:8" - }, - "scope": 4606, - "src": "14214:548:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2243, - "nodeType": "Block", - "src": "15647:289:8", - "statements": [ - { - "assignments": [ - 2222 - ], - "declarations": [ - { - "constant": false, - "id": 2222, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15653:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2221, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15653:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2230, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6d61737465722e6163636f756e74", - "id": 2226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15693:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - "value": "master.account" - }, - { - "argumentTypes": null, - "id": 2227, - "name": "forwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2216, - "src": "15711:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2224, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "15676:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2225, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15676:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15676:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2223, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "15666:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15666:63:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15653:76:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2235, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2222, - "src": "15774:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2236, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2214, - "src": "15778:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2232, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2212, - "src": "15750:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2233, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "15750:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4950, - "src": "15750:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15750:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15802:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2231, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "15735:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15735:179:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2240, - "nodeType": "ExpressionStatement", - "src": "15735:179:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15927:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2220, - "id": 2242, - "nodeType": "Return", - "src": "15920:11:8" - } - ] - }, - "documentation": "@notice Set a forwarded address for an account.\n@dev | This method has an `internal` view\n@dev | Forwarded accounts must be set by an authority in case of account recovery;\n@dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n@dev | All transactions will be logged under the same KYC information as the original account holder;\n@param self Internal storage proxying TokenIOStorage contract\n@param originalAccount Original registered Ethereum address of the account holder\n@param forwardedAccount Forwarded Ethereum address of the account holder\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2244, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setForwardedAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2217, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2212, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15545:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2211, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "15545:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2214, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15564:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2213, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15564:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2216, - "name": "forwardedAccount", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15589:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2215, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15589:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15544:70:8" - }, - "payable": false, - "returnParameters": { - "id": 2220, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2219, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15633:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2218, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15633:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15632:14:8" - }, - "scope": 4606, - "src": "15516:420:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2281, - "nodeType": "Block", - "src": "16515:242:8", - "statements": [ - { - "assignments": [ - 2254 - ], - "declarations": [ - { - "constant": false, - "id": 2254, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16521:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2253, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16521:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2262, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6d61737465722e6163636f756e74", - "id": 2258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16561:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - "value": "master.account" - }, - { - "argumentTypes": null, - "id": 2259, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2248, - "src": "16579:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2256, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "16544:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16544:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16544:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2255, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "16534:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16534:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16521:67:8" - }, - { - "assignments": [ - 2264 - ], - "declarations": [ - { - "constant": false, - "id": 2264, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16594:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2263, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16594:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2270, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2268, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2254, - "src": "16644:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2265, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2246, - "src": "16620:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2266, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "16620:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5164, - "src": "16620:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16620:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16594:53:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2271, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2264, - "src": "16657:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2272, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16676:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "16657:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2279, - "nodeType": "Block", - "src": "16724:29:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2277, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2248, - "src": "16739:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2252, - "id": 2278, - "nodeType": "Return", - "src": "16732:14:8" - } - ] - }, - "id": 2280, - "nodeType": "IfStatement", - "src": "16653:100:8", - "trueBody": { - "id": 2276, - "nodeType": "Block", - "src": "16681:37:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2274, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2264, - "src": "16696:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2252, - "id": 2275, - "nodeType": "Return", - "src": "16689:22:8" - } - ] - } - } - ] - }, - "documentation": "@notice Get the original address for a forwarded account\n@dev | This method has an `internal` view\n@dev | Will return the registered account for the given forwarded account\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}", - "id": 2282, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getForwardedAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2249, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2246, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16429:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2245, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "16429:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2248, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16448:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16448:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16428:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2252, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2251, - "name": "registeredAccount", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16488:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2250, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16488:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16487:27:8" - }, - "scope": 4606, - "src": "16400:357:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2310, - "nodeType": "Block", - "src": "17256:143:8", - "statements": [ - { - "assignments": [ - 2292 - ], - "declarations": [ - { - "constant": false, - "id": 2292, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2311, - "src": "17264:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2291, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17264:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2303, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e6b7963", - "id": 2296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17304:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - "value": "account.kyc" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2298, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "17339:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2299, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2286, - "src": "17345:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2297, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "17319:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17319:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2294, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "17287:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2295, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17287:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17287:67:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2293, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "17277:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17277:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17264:91:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2307, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "17391:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2304, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "17370:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2305, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "17370:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "17370:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 2308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17370:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2290, - "id": 2309, - "nodeType": "Return", - "src": "17363:31:8" - } - ] - }, - "documentation": "@notice Get KYC approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the KYC approval status for an account holder\" }", - "id": 2311, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getKYCApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2287, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2284, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2311, - "src": "17184:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2283, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "17184:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2286, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2311, - "src": "17203:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2285, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17203:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17183:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2289, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 2311, - "src": "17243:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2288, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17243:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17242:13:8" - }, - "scope": 4606, - "src": "17160:239:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2339, - "nodeType": "Block", - "src": "17906:143:8", - "statements": [ - { - "assignments": [ - 2321 - ], - "declarations": [ - { - "constant": false, - "id": 2321, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2340, - "src": "17912:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2320, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17912:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2332, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e616c6c6f776564", - "id": 2325, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17952:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - "value": "account.allowed" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2327, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2313, - "src": "17991:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2328, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2315, - "src": "17997:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2326, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "17971:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2323, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "17935:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2324, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17935:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17935:71:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2322, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "17925:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17925:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17912:95:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2336, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2321, - "src": "18041:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2333, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2313, - "src": "18020:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2334, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "18020:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "18020:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 2337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18020:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2319, - "id": 2338, - "nodeType": "Return", - "src": "18013:31:8" - } - ] - }, - "documentation": "@notice Get global approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the global approval status for an account holder\" }", - "id": 2340, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2316, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2313, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2340, - "src": "17834:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2312, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "17834:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2315, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2340, - "src": "17853:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2314, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17853:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17833:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2318, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 2340, - "src": "17893:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2317, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17893:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17892:13:8" - }, - "scope": 4606, - "src": "17808:241:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2365, - "nodeType": "Block", - "src": "18533:120:8", - "statements": [ - { - "assignments": [ - 2350 - ], - "declarations": [ - { - "constant": false, - "id": 2350, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2366, - "src": "18539:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2349, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "18539:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2358, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d657370616365", - "id": 2354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18579:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - "value": "token.namespace" - }, - { - "argumentTypes": null, - "id": 2355, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2344, - "src": "18598:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2352, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "18562:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2353, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18562:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18562:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2351, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "18552:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18552:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18539:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2362, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2350, - "src": "18645:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2359, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "18621:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2360, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "18621:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5164, - "src": "18621:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18621:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2348, - "id": 2364, - "nodeType": "Return", - "src": "18614:34:8" - } - ] - }, - "documentation": "@notice Get the contract interface address associated with token symbol\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }", - "id": 2366, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenNameSpace", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2345, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2342, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2366, - "src": "18449:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2341, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "18449:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2344, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2366, - "src": "18468:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2343, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "18468:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18448:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2347, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2366, - "src": "18508:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2346, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18508:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18507:25:8" - }, - "scope": 4606, - "src": "18422:231:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2391, - "nodeType": "Block", - "src": "19151:121:8", - "statements": [ - { - "assignments": [ - 2376 - ], - "declarations": [ - { - "constant": false, - "id": 2376, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2392, - "src": "19157:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2375, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19157:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2384, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d65", - "id": 2380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19197:12:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - "value": "token.name" - }, - { - "argumentTypes": null, - "id": 2381, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2370, - "src": "19211:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2378, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "19180:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19180:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19180:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2377, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "19170:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19170:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19157:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2388, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2376, - "src": "19264:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2385, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2368, - "src": "19241:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2386, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "19241:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "19241:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19241:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2374, - "id": 2390, - "nodeType": "Return", - "src": "19234:33:8" - } - ] - }, - "documentation": "@notice Get the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenName\" : \"Name of the token contract\"}", - "id": 2392, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2371, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2368, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2392, - "src": "19066:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2367, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "19066:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2370, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2392, - "src": "19085:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2369, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19085:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19065:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2374, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2373, - "name": "tokenName", - "nodeType": "VariableDeclaration", - "scope": 2392, - "src": "19133:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2372, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "19133:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19132:18:8" - }, - "scope": 4606, - "src": "19044:228:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2417, - "nodeType": "Block", - "src": "19780:123:8", - "statements": [ - { - "assignments": [ - 2402 - ], - "declarations": [ - { - "constant": false, - "id": 2402, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2418, - "src": "19786:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2401, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19786:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2410, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e73796d626f6c", - "id": 2406, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19826:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - "value": "token.symbol" - }, - { - "argumentTypes": null, - "id": 2407, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2396, - "src": "19842:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2404, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "19809:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2405, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19809:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19809:49:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2403, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "19799:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19799:60:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19786:73:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2414, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2402, - "src": "19895:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2411, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2394, - "src": "19872:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2412, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "19872:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "19872:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19872:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2400, - "id": 2416, - "nodeType": "Return", - "src": "19865:33:8" - } - ] - }, - "documentation": "@notice Get the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenSymbol\" : \"Symbol of the token contract\"}", - "id": 2418, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenSymbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2397, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2394, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2418, - "src": "19693:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2393, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "19693:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2396, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2418, - "src": "19712:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2395, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19692:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2400, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2399, - "name": "tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 2418, - "src": "19760:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2398, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "19760:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19759:20:8" - }, - "scope": 4606, - "src": "19669:234:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2443, - "nodeType": "Block", - "src": "20424:120:8", - "statements": [ - { - "assignments": [ - 2428 - ], - "declarations": [ - { - "constant": false, - "id": 2428, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2444, - "src": "20430:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2427, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "20430:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2436, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e746c61", - "id": 2432, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20470:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - "value": "token.tla" - }, - { - "argumentTypes": null, - "id": 2433, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "20483:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2430, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "20453:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20453:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20453:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2429, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "20443:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20443:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20430:70:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2440, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2428, - "src": "20536:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2437, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2420, - "src": "20513:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2438, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "20513:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "20513:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20513:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2426, - "id": 2442, - "nodeType": "Return", - "src": "20506:33:8" - } - ] - }, - "documentation": "@notice Get the token Three letter abbreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenTLA\" : \"TLA of the token contract\"}", - "id": 2444, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenTLA", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2420, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2444, - "src": "20340:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2419, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "20340:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2422, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2444, - "src": "20359:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2421, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20359:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20339:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2426, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2425, - "name": "tokenTLA", - "nodeType": "VariableDeclaration", - "scope": 2444, - "src": "20407:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2424, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "20407:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20406:17:8" - }, - "scope": 4606, - "src": "20319:225:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2469, - "nodeType": "Block", - "src": "21053:124:8", - "statements": [ - { - "assignments": [ - 2454 - ], - "declarations": [ - { - "constant": false, - "id": 2454, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2470, - "src": "21059:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2453, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "21059:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2462, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e76657273696f6e", - "id": 2458, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21099:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - "value": "token.version" - }, - { - "argumentTypes": null, - "id": 2459, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2448, - "src": "21116:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2456, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "21082:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2457, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21082:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21082:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2455, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "21072:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21072:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21059:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2466, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2454, - "src": "21169:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2463, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2446, - "src": "21146:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2464, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "21146:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "21146:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21146:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2452, - "id": 2468, - "nodeType": "Return", - "src": "21139:33:8" - } - ] - }, - "documentation": "@notice Get the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenVersion\" : \"Semantic version of the token contract\"}", - "id": 2470, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenVersion", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2449, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2446, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2470, - "src": "20978:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2445, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "20978:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2448, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2470, - "src": "20997:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2447, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20997:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20977:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2451, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2470, - "src": "21045:6:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2450, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "21045:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21044:8:8" - }, - "scope": 4606, - "src": "20953:224:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2495, - "nodeType": "Block", - "src": "21688:116:8", - "statements": [ - { - "assignments": [ - 2480 - ], - "declarations": [ - { - "constant": false, - "id": 2480, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2496, - "src": "21694:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2479, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "21694:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2488, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e646563696d616c73", - "id": 2484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21734:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - "value": "token.decimals" - }, - { - "argumentTypes": null, - "id": 2485, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2474, - "src": "21752:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2482, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "21717:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21717:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21717:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2481, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "21707:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21707:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21694:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2492, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2480, - "src": "21796:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2489, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2472, - "src": "21775:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2490, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "21775:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "21775:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21775:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2478, - "id": 2494, - "nodeType": "Return", - "src": "21768:31:8" - } - ] - }, - "documentation": "@notice Get the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"tokenDecimals\" : \"Decimals of the token contract\"}", - "id": 2496, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenDecimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2472, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2496, - "src": "21609:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2471, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "21609:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2474, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2496, - "src": "21628:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2473, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "21628:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21608:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2477, - "name": "tokenDecimals", - "nodeType": "VariableDeclaration", - "scope": 2496, - "src": "21668:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2476, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "21668:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21667:20:8" - }, - "scope": 4606, - "src": "21583:221:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2521, - "nodeType": "Block", - "src": "22293:116:8", - "statements": [ - { - "assignments": [ - 2506 - ], - "declarations": [ - { - "constant": false, - "id": 2506, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2522, - "src": "22299:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2505, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "22299:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2514, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 2510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22339:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "id": 2511, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2500, - "src": "22350:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2508, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "22322:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2509, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22322:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22322:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2507, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "22312:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22312:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "22299:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2518, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2506, - "src": "22401:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2515, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2498, - "src": "22380:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2516, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "22380:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "22380:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22380:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2504, - "id": 2520, - "nodeType": "Return", - "src": "22373:31:8" - } - ] - }, - "documentation": "@notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}", - "id": 2522, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeBPS", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2501, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2498, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2522, - "src": "22213:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2497, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "22213:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2500, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2522, - "src": "22232:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2499, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22232:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22212:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2504, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2503, - "name": "feeBps", - "nodeType": "VariableDeclaration", - "scope": 2522, - "src": "22280:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2502, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "22280:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22279:13:8" - }, - "scope": 4606, - "src": "22194:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2547, - "nodeType": "Block", - "src": "22888:116:8", - "statements": [ - { - "assignments": [ - 2532 - ], - "declarations": [ - { - "constant": false, - "id": 2532, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "22894:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2531, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "22894:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2540, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 2536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22934:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "id": 2537, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2526, - "src": "22945:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2534, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "22917:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22917:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22917:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2533, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "22907:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22907:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "22894:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2544, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2532, - "src": "22996:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2541, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2524, - "src": "22975:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2542, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "22975:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "22975:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22975:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2530, - "id": 2546, - "nodeType": "Return", - "src": "22968:31:8" - } - ] - }, - "documentation": "@notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}", - "id": 2548, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2524, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "22808:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2523, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "22808:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2526, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "22827:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2525, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22827:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22807:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2529, - "name": "feeMin", - "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "22875:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2528, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "22875:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22874:13:8" - }, - "scope": 4606, - "src": "22789:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2573, - "nodeType": "Block", - "src": "23483:116:8", - "statements": [ - { - "assignments": [ - 2558 - ], - "declarations": [ - { - "constant": false, - "id": 2558, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2574, - "src": "23489:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2557, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "23489:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2566, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 2562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23529:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "id": 2563, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2552, - "src": "23540:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2560, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "23512:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23512:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23512:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2559, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "23502:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23502:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "23489:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2570, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2558, - "src": "23591:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2567, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2550, - "src": "23570:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2568, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "23570:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "23570:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23570:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2556, - "id": 2572, - "nodeType": "Return", - "src": "23563:31:8" - } - ] - }, - "documentation": "@notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}", - "id": 2574, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMax", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2553, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2550, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2574, - "src": "23403:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2549, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "23403:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2552, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2574, - "src": "23422:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2551, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23422:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23402:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2555, - "name": "feeMax", - "nodeType": "VariableDeclaration", - "scope": 2574, - "src": "23470:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2554, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "23470:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23469:13:8" - }, - "scope": 4606, - "src": "23384:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2599, - "nodeType": "Block", - "src": "24075:117:8", - "statements": [ - { - "assignments": [ - 2584 - ], - "declarations": [ - { - "constant": false, - "id": 2584, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2600, - "src": "24081:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2583, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "24081:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2592, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24121:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "id": 2589, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2578, - "src": "24133:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2586, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "24104:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24104:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24104:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2585, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "24094:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24094:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24081:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2596, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2584, - "src": "24184:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2593, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2576, - "src": "24163:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "24163:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "24163:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24163:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2582, - "id": 2598, - "nodeType": "Return", - "src": "24156:31:8" - } - ] - }, - "documentation": "@notice Get the flat fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}", - "id": 2600, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeFlat", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2576, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2600, - "src": "23994:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2575, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "23994:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2578, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2600, - "src": "24013:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2577, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24013:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23993:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2582, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2581, - "name": "feeFlat", - "nodeType": "VariableDeclaration", - "scope": 2600, - "src": "24061:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2580, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "24061:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24060:14:8" - }, - "scope": 4606, - "src": "23974:218:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2625, - "nodeType": "Block", - "src": "24680:117:8", - "statements": [ - { - "assignments": [ - 2610 - ], - "declarations": [ - { - "constant": false, - "id": 2610, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2626, - "src": "24686:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2609, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "24686:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2618, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d7367", - "id": 2614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24726:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - "value": "fee.msg" - }, - { - "argumentTypes": null, - "id": 2615, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2604, - "src": "24737:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2612, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "24709:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24709:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24709:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2611, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "24699:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24699:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24686:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2622, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "24789:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2619, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2602, - "src": "24767:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2620, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "24767:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBytes", - "nodeType": "MemberAccess", - "referencedDeclaration": 5200, - "src": "24767:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes32) view external returns (bytes memory)" - } - }, - "id": 2623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24767:25:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2608, - "id": 2624, - "nodeType": "Return", - "src": "24760:32:8" - } - ] - }, - "documentation": "@notice Get the flat message of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}", - "id": 2626, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMsg", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2602, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2626, - "src": "24599:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2601, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "24599:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2604, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2626, - "src": "24618:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24618:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24598:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2608, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2607, - "name": "feeMsg", - "nodeType": "VariableDeclaration", - "scope": 2626, - "src": "24666:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2606, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "24666:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24665:14:8" - }, - "scope": 4606, - "src": "24580:217:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2656, - "nodeType": "Block", - "src": "25354:276:8", - "statements": [ - { - "assignments": [ - 2636 - ], - "declarations": [ - { - "constant": false, - "id": 2636, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "25360:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2635, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "25360:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2643, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e636f6e74726163742e6d6173746572", - "id": 2640, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25400:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - }, - "value": "fee.contract.master" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2638, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "25383:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2639, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25383:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2641, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25383:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2637, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "25373:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25373:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25360:63:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2648, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2636, - "src": "25468:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2649, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2630, - "src": "25472:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2645, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2628, - "src": "25444:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2646, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "25444:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4950, - "src": "25444:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25444:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2651, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25496:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2644, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "25429:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25429:179:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2653, - "nodeType": "ExpressionStatement", - "src": "25429:179:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2654, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25621:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2634, - "id": 2655, - "nodeType": "Return", - "src": "25614:11:8" - } - ] - }, - "documentation": "@notice Set the master fee contract used as the default fee contract when none is provided\n@dev | This method has an `internal` view\n@dev | This value is set in the TokenIOAuthority contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2657, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setMasterFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2631, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2628, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "25278:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2627, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "25278:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2630, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "25297:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2629, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25297:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25277:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2633, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "25340:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2632, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "25340:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25339:14:8" - }, - "scope": 4606, - "src": "25248:382:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2679, - "nodeType": "Block", - "src": "26023:114:8", - "statements": [ - { - "assignments": [ - 2665 - ], - "declarations": [ - { - "constant": false, - "id": 2665, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2680, - "src": "26029:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2664, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "26029:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2672, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e636f6e74726163742e6d6173746572", - "id": 2669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26069:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - }, - "value": "fee.contract.master" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2667, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "26052:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26052:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26052:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2666, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "26042:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26042:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26029:63:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2676, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2665, - "src": "26129:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2673, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2659, - "src": "26105:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2674, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "26105:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5164, - "src": "26105:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26105:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2663, - "id": 2678, - "nodeType": "Return", - "src": "26098:34:8" - } - ] - }, - "documentation": "@notice Get the master fee contract set via the TokenIOAuthority contract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}", - "id": 2680, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getMasterFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2660, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2659, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2680, - "src": "25954:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2658, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "25954:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25953:19:8" - }, - "payable": false, - "returnParameters": { - "id": 2663, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2662, - "name": "masterFeeContract", - "nodeType": "VariableDeclaration", - "scope": 2680, - "src": "25996:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2661, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25996:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25995:27:8" - }, - "scope": 4606, - "src": "25924:213:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2719, - "nodeType": "Block", - "src": "26836:252:8", - "statements": [ - { - "assignments": [ - 2690 - ], - "declarations": [ - { - "constant": false, - "id": 2690, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26842:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2689, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "26842:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2698, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6163636f756e74", - "id": 2694, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26882:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - "value": "fee.account" - }, - { - "argumentTypes": null, - "id": 2695, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2684, - "src": "26897:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2692, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "26865:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2693, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26865:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26865:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2691, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "26855:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26855:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26842:72:8" - }, - { - "assignments": [ - 2700 - ], - "declarations": [ - { - "constant": false, - "id": 2700, - "name": "feeAccount", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26921:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2699, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26921:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2706, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2704, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2690, - "src": "26966:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2701, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2682, - "src": "26942:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2702, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "26942:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5164, - "src": "26942:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26942:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26921:48:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2709, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2707, - "name": "feeAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "26979:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26993:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "26979:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2717, - "nodeType": "Block", - "src": "27052:32:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2715, - "name": "feeAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "27067:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2688, - "id": 2716, - "nodeType": "Return", - "src": "27060:17:8" - } - ] - }, - "id": 2718, - "nodeType": "IfStatement", - "src": "26975:109:8", - "trueBody": { - "id": 2714, - "nodeType": "Block", - "src": "26998:48:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2711, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2682, - "src": "27034:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - ], - "id": 2710, - "name": "getMasterFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2680, - "src": "27013:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer) view returns (address)" - } - }, - "id": 2712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27013:26:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2688, - "id": 2713, - "nodeType": "Return", - "src": "27006:33:8" - } - ] - } - } - ] - }, - "documentation": "@notice Get the fee contract set for a contract interface\n@dev | This method has an `internal` view\n@dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n@dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}", - "id": 2720, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2682, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26748:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2681, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "26748:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2684, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26767:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2683, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26767:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26747:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2687, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26815:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2686, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26815:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26814:21:8" - }, - "scope": 4606, - "src": "26724:364:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2745, - "nodeType": "Block", - "src": "27551:114:8", - "statements": [ - { - "assignments": [ - 2730 - ], - "declarations": [ - { - "constant": false, - "id": 2730, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "27557:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2729, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "27557:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2738, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 2734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27597:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 2735, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2724, - "src": "27613:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2732, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "27580:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27580:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27580:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2731, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "27570:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27570:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "27557:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2742, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2730, - "src": "27657:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2739, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2722, - "src": "27636:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2740, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "27636:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "27636:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27636:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2728, - "id": 2744, - "nodeType": "Return", - "src": "27629:31:8" - } - ] - }, - "documentation": "@notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"supply\" : \"Returns the token supply of the given currency\"}", - "id": 2746, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2722, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "27479:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2721, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "27479:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2724, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "27498:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2723, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "27498:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27478:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2728, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2727, - "name": "supply", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "27538:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2726, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "27538:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27537:13:8" - }, - "scope": 4606, - "src": "27455:210:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2783, - "nodeType": "Block", - "src": "28192:189:8", - "statements": [ - { - "assignments": [ - 2760 - ], - "declarations": [ - { - "constant": false, - "id": 2760, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28198:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2759, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "28198:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2776, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 2764, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28238:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 2765, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2750, - "src": "28257:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2767, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2748, - "src": "28287:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2768, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2752, - "src": "28293:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2766, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "28267:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28267:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2771, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2748, - "src": "28323:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2772, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2754, - "src": "28329:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2770, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "28303:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28303:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2762, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "28221:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2763, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28221:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28221:117:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2761, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "28211:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28211:128:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "28198:141:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2780, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2760, - "src": "28373:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2777, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2748, - "src": "28352:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2778, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "28352:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "28352:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28352:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2758, - "id": 2782, - "nodeType": "Return", - "src": "28345:31:8" - } - ] - }, - "documentation": "@notice Get the token spender allowance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param spender Ethereum address of spender\n@return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}", - "id": 2784, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2755, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2748, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28083:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2747, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "28083:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2750, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28102:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2749, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "28102:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2752, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28119:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28119:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2754, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28136:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2753, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28136:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28082:70:8" - }, - "payable": false, - "returnParameters": { - "id": 2758, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2757, - "name": "allowance", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28176:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2756, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "28176:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28175:16:8" - }, - "scope": 4606, - "src": "28056:325:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2815, - "nodeType": "Block", - "src": "28904:151:8", - "statements": [ - { - "assignments": [ - 2796 - ], - "declarations": [ - { - "constant": false, - "id": 2796, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28910:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2795, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "28910:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2808, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 2800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28950:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 2801, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2788, - "src": "28967:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2803, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "28997:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2804, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2790, - "src": "29003:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2802, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "28977:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28977:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2798, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "28933:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2799, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28933:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28933:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2797, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "28923:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28923:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "28910:103:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2812, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "29047:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2809, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "29026:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2810, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "29026:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "29026:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29026:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2794, - "id": 2814, - "nodeType": "Return", - "src": "29019:31:8" - } - ] - }, - "documentation": "@notice Get the token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"balance\" : \"Return the balance of a given account for a specified currency\"}", - "id": 2816, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2791, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2786, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28814:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2785, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "28814:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2788, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28833:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2787, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "28833:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2790, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28850:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2789, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28850:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28813:53:8" - }, - "payable": false, - "returnParameters": { - "id": 2794, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2793, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28890:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2792, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "28890:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28889:14:8" - }, - "scope": 4606, - "src": "28789:266:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2847, - "nodeType": "Block", - "src": "29610:150:8", - "statements": [ - { - "assignments": [ - 2828 - ], - "declarations": [ - { - "constant": false, - "id": 2828, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29616:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2827, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "29616:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2840, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e66726f7a656e", - "id": 2832, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "29656:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - "value": "token.frozen" - }, - { - "argumentTypes": null, - "id": 2833, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2820, - "src": "29672:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2835, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "29702:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2836, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2822, - "src": "29708:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2834, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "29682:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29682:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2830, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "29639:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2831, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "29639:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29639:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2829, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "29629:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29629:89:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "29616:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2844, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2828, - "src": "29752:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2841, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "29731:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2842, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "29731:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "29731:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29731:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2826, - "id": 2846, - "nodeType": "Return", - "src": "29724:31:8" - } - ] - }, - "documentation": "@notice Get the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}", - "id": 2848, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenFrozenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2823, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2818, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29514:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2817, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "29514:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2820, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29533:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2819, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "29533:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2822, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29550:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2821, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "29550:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "29513:53:8" - }, - "payable": false, - "returnParameters": { - "id": 2826, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2825, - "name": "frozenBalance", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29590:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2824, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "29590:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "29589:20:8" - }, - "scope": 4606, - "src": "29483:277:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2887, - "nodeType": "Block", - "src": "30356:303:8", - "statements": [ - { - "assignments": [ - 2862 - ], - "declarations": [ - { - "constant": false, - "id": 2862, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30362:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2861, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "30362:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2874, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e66726f7a656e", - "id": 2866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30402:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - "value": "token.frozen" - }, - { - "argumentTypes": null, - "id": 2867, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "30418:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2869, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2850, - "src": "30448:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2870, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2854, - "src": "30454:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2868, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "30428:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30428:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2864, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "30385:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2865, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "30385:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30385:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2863, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "30375:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30375:89:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "30362:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2879, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2862, - "src": "30506:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2880, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2856, - "src": "30510:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2876, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2850, - "src": "30485:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2877, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "30485:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "30485:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 2881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30485:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30525:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2875, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "30470:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30470:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2884, - "nodeType": "ExpressionStatement", - "src": "30470:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30650:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2860, - "id": 2886, - "nodeType": "Return", - "src": "30643:11:8" - } - ] - }, - "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Amount of tokens to freeze for account\n@return { \"success\" : \"Return true if successfully called from another contract\"}", - "id": 2888, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenFrozenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2850, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30258:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2849, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "30258:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2852, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30277:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2851, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "30277:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2854, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30294:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2853, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "30294:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2856, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30311:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2855, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "30311:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "30257:66:8" - }, - "payable": false, - "returnParameters": { - "id": 2860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2859, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30342:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2858, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "30342:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "30341:14:8" - }, - "scope": 4606, - "src": "30227:432:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2987, - "nodeType": "Block", - "src": "31190:598:8", - "statements": [ - { - "assignments": [ - 2900 - ], - "declarations": [ - { - "constant": false, - "id": 2900, - "name": "maxFee", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31197:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2899, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31197:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2912, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 2907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31259:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "id": 2908, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2892, - "src": "31270:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2905, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "31242:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31242:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31242:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2904, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "31232:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31232:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2901, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "31211:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2902, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "31211:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "31211:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31211:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31197:91:8" - }, - { - "assignments": [ - 2914 - ], - "declarations": [ - { - "constant": false, - "id": 2914, - "name": "minFee", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31294:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2913, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31294:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2926, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 2921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31356:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "id": 2922, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2892, - "src": "31367:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2919, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "31339:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2920, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31339:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31339:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2918, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "31329:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31329:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2915, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "31308:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2916, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "31308:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "31308:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31308:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31294:91:8" - }, - { - "assignments": [ - 2928 - ], - "declarations": [ - { - "constant": false, - "id": 2928, - "name": "bpsFee", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31391:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2927, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31391:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2940, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 2935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31453:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "id": 2936, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2892, - "src": "31464:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2933, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "31436:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31436:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31436:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2932, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "31426:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31426:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2929, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "31405:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2930, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "31405:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "31405:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31405:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31391:91:8" - }, - { - "assignments": [ - 2942 - ], - "declarations": [ - { - "constant": false, - "id": 2942, - "name": "flatFee", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31488:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2941, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31488:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2954, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31551:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "id": 2950, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2892, - "src": "31563:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2947, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "31534:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31534:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31534:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2946, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "31524:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31524:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2943, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "31503:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2944, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "31503:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "31503:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31503:78:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31488:93:8" - }, - { - "assignments": [ - 2956 - ], - "declarations": [ - { - "constant": false, - "id": 2956, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31587:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2955, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31587:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2967, - "name": "flatFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2942, - "src": "31637:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3130303030", - "id": 2963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31625:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - }, - "value": "10000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2959, - "name": "bpsFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2928, - "src": "31612:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2957, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2894, - "src": "31601:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "31601:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2960, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31601:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2961, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31600:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "31600:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31600:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2965, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31599:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "31599:37:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31599:46:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31587:58:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2970, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2956, - "src": "31656:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2971, - "name": "maxFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "31663:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31656:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2976, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2956, - "src": "31709:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 2977, - "name": "minFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2914, - "src": "31716:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31709:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2984, - "nodeType": "Block", - "src": "31758:26:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2982, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2956, - "src": "31773:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2898, - "id": 2983, - "nodeType": "Return", - "src": "31766:11:8" - } - ] - }, - "id": 2985, - "nodeType": "IfStatement", - "src": "31705:79:8", - "trueBody": { - "id": 2981, - "nodeType": "Block", - "src": "31724:28:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2979, - "name": "minFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2914, - "src": "31739:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2898, - "id": 2980, - "nodeType": "Return", - "src": "31732:13:8" - } - ] - } - }, - "id": 2986, - "nodeType": "IfStatement", - "src": "31652:132:8", - "trueBody": { - "id": 2975, - "nodeType": "Block", - "src": "31671:28:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2973, - "name": "maxFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "31686:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2898, - "id": 2974, - "nodeType": "Return", - "src": "31679:13:8" - } - ] - } - } - ] - }, - "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the fee contract\n@param amount Transaction value\n@return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }", - "id": 2988, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "calculateFees", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2895, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2890, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31089:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2889, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "31089:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2892, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31108:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2891, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "31108:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2894, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31133:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2893, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31133:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "31088:57:8" - }, - "payable": false, - "returnParameters": { - "id": 2898, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2897, - "name": "calculatedFees", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31169:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2896, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31169:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "31168:21:8" - }, - "scope": 4606, - "src": "31066:722:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3017, - "nodeType": "Block", - "src": "32388:334:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3001, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2990, - "src": "32423:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3002, - "name": "accountA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2992, - "src": "32429:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3000, - "name": "verifyAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3046, - "src": "32409:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32409:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", - "id": 3004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32446:92:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - }, - "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - } - ], - "id": 2999, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "32394:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32394:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3006, - "nodeType": "ExpressionStatement", - "src": "32394:150:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3009, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2990, - "src": "32579:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3010, - "name": "accountB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2994, - "src": "32585:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3008, - "name": "verifyAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3046, - "src": "32565:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32565:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", - "id": 3012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32602:92:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - }, - "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - } - ], - "id": 3007, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "32550:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32550:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3014, - "nodeType": "ExpressionStatement", - "src": "32550:150:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3015, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32713:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2998, - "id": 3016, - "nodeType": "Return", - "src": "32706:11:8" - } - ] - }, - "documentation": "@notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param accountA Ethereum address of first account holder to verify\n@param accountB Ethereum address of second account holder to verify\n@return { \"verified\" : \"Returns true if both accounts are successfully verified\" }", - "id": 3018, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyAccounts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2995, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2990, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3018, - "src": "32295:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2989, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "32295:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2992, - "name": "accountA", - "nodeType": "VariableDeclaration", - "scope": 3018, - "src": "32314:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2991, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "32314:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2994, - "name": "accountB", - "nodeType": "VariableDeclaration", - "scope": 3018, - "src": "32332:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2993, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "32332:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32294:55:8" - }, - "payable": false, - "returnParameters": { - "id": 2998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2997, - "name": "verified", - "nodeType": "VariableDeclaration", - "scope": 3018, - "src": "32373:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2996, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "32373:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32372:15:8" - }, - "scope": 4606, - "src": "32271:451:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3045, - "nodeType": "Block", - "src": "33212:262:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3029, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3020, - "src": "33248:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3030, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3022, - "src": "33254:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3028, - "name": "getKYCApproval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "33233:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33233:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e7420646f6573206e6f742068617665204b594320617070726f76616c2e", - "id": 3032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33270:44:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", - "typeString": "literal_string \"Error: Account does not have KYC approval.\"" - }, - "value": "Error: Account does not have KYC approval." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", - "typeString": "literal_string \"Error: Account does not have KYC approval.\"" - } - ], - "id": 3027, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "33218:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33218:102:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3034, - "nodeType": "ExpressionStatement", - "src": "33218:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3037, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3020, - "src": "33358:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3038, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3022, - "src": "33364:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3036, - "name": "getAccountStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2340, - "src": "33341:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33341:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e7420737461747573206973206066616c7365602e204163636f756e7420737461747573206d757374206265206074727565602e", - "id": 3040, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33380:66:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", - "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" - }, - "value": "Error: Account status is `false`. Account status must be `true`." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", - "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" - } - ], - "id": 3035, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "33326:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3041, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33326:126:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3042, - "nodeType": "ExpressionStatement", - "src": "33326:126:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3043, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33465:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3026, - "id": 3044, - "nodeType": "Return", - "src": "33458:11:8" - } - ] - }, - "documentation": "@notice Verified KYC and global status for a single account and return true or throw if account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder to verify\n@return { \"verified\" : \"Returns true if account is successfully verified\" }", - "id": 3046, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3023, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3020, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3046, - "src": "33138:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3019, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "33138:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3022, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3046, - "src": "33157:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3021, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "33157:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33137:36:8" - }, - "payable": false, - "returnParameters": { - "id": 3026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3025, - "name": "verified", - "nodeType": "VariableDeclaration", - "scope": 3046, - "src": "33197:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3024, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "33197:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33196:15:8" - }, - "scope": 4606, - "src": "33115:359:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3139, - "nodeType": "Block", - "src": "34344:799:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3063, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3052, - "src": "34366:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3062, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "34358:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34358:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34373:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "34358:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f6020616464726573732063616e6e6f74206265206e756c6c2e", - "id": 3067, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34378:37:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", - "typeString": "literal_string \"Error: `to` address cannot be null.\"" - }, - "value": "Error: `to` address cannot be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", - "typeString": "literal_string \"Error: `to` address cannot be null.\"" - } - ], - "id": 3061, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34350:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34350:67:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3069, - "nodeType": "ExpressionStatement", - "src": "34350:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3071, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3054, - "src": "34431:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3072, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34440:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "34431:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060616d6f756e7460206d7573742062652067726561746572207468616e207a65726f", - "id": 3074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34443:43:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", - "typeString": "literal_string \"Error: `amount` must be greater than zero\"" - }, - "value": "Error: `amount` must be greater than zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", - "typeString": "literal_string \"Error: `amount` must be greater than zero\"" - } - ], - "id": 3070, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34423:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34423:64:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3076, - "nodeType": "ExpressionStatement", - "src": "34423:64:8" - }, - { - "assignments": [ - 3078 - ], - "declarations": [ - { - "constant": false, - "id": 3078, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34494:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3077, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "34494:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3085, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3080, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34531:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3082, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "34545:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 3081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "34537:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34537:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3079, - "name": "getFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2720, - "src": "34516:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34516:35:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34494:57:8" - }, - { - "assignments": [ - 3087 - ], - "declarations": [ - { - "constant": false, - "id": 3087, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34557:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3086, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "34557:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3093, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3089, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34583:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3090, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3078, - "src": "34589:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3091, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3054, - "src": "34602:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3088, - "name": "calculateFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2988, - "src": "34569:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" - } - }, - "id": 3092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34569:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34557:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3096, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34656:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3097, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "34662:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34662:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3100, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34689:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3101, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3050, - "src": "34695:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3102, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3054, - "src": "34705:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3099, - "name": "getFxUSDAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4605, - "src": "34674:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" - } - }, - "id": 3103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34674:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3095, - "name": "setAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4384, - "src": "34631:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 3104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34631:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d6f756e7420666f72206163636f756e742e", - "id": 3105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34721:51:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", - "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" - }, - "value": "Error: Unable to set spending amount for account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", - "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" - } - ], - "id": 3094, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34616:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34616:157:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3107, - "nodeType": "ExpressionStatement", - "src": "34616:157:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3110, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34809:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3111, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3050, - "src": "34815:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3112, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "34825:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34825:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3114, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3052, - "src": "34837:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3115, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3054, - "src": "34841:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3116, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3056, - "src": "34849:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3109, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "34795:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34795:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 3118, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34862:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 3108, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34780:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34780:128:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3120, - "nodeType": "ExpressionStatement", - "src": "34780:128:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3123, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34986:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3124, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3050, - "src": "34992:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3125, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "35002:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "35002:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3127, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3078, - "src": "35014:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3128, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3087, - "src": "35027:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3130, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "35043:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3131, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3078, - "src": "35049:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3129, - "name": "getFeeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2626, - "src": "35033:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" - } - }, - "id": 3132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "35033:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3122, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "34972:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34972:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", - "id": 3134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "35070:49:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - }, - "value": "Error: Unable to transfer fees to fee contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - } - ], - "id": 3121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34957:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34957:163:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3136, - "nodeType": "ExpressionStatement", - "src": "34957:163:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "35134:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3060, - "id": 3138, - "nodeType": "Return", - "src": "35127:11:8" - } - ] - }, - "documentation": "@notice Transfer an amount of currency token from msg.sender account to another specified account\n@dev This function is called by an interface that is accessible directly to the account holder\n@dev | This method has an `internal` view\n@dev | This method uses `forceTransfer()` low-level api\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3140, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3057, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3048, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34239:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3047, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "34239:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3050, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34258:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3049, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "34258:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3052, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34275:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3051, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "34275:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3054, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34287:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3053, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "34287:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3056, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34300:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3055, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "34300:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "34238:73:8" - }, - "payable": false, - "returnParameters": { - "id": 3060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3059, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34330:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3058, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "34330:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "34329:14:8" - }, - "scope": 4606, - "src": "34221:922:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3235, - "nodeType": "Block", - "src": "36400:1060:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3159, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "36429:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3158, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "36421:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36421:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36436:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "36421:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", - "id": 3163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36447:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - }, - "value": "Error: `to` address must not be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - } - ], - "id": 3157, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "36406:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36406:86:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3165, - "nodeType": "ExpressionStatement", - "src": "36406:86:8" - }, - { - "assignments": [ - 3167 - ], - "declarations": [ - { - "constant": false, - "id": 3167, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36499:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36499:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3174, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3169, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36536:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3171, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "36550:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 3170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "36542:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36542:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3168, - "name": "getFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2720, - "src": "36521:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36521:35:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "36499:57:8" - }, - { - "assignments": [ - 3176 - ], - "declarations": [ - { - "constant": false, - "id": 3176, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36562:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3175, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "36562:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3182, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3178, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36588:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3179, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3167, - "src": "36594:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3180, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "36607:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3177, - "name": "calculateFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2988, - "src": "36574:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" - } - }, - "id": 3181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36574:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "36562:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3185, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36754:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3186, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3146, - "src": "36760:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3188, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36781:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3189, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3144, - "src": "36787:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3190, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "36797:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3187, - "name": "getFxUSDAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4605, - "src": "36766:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" - } - }, - "id": 3191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36766:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3184, - "name": "setAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4384, - "src": "36729:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 3192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36729:76:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", - "id": 3193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36813:47:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", - "typeString": "literal_string \"Error: Unable to set account spending amount.\"" - }, - "value": "Error: Unable to set account spending amount." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", - "typeString": "literal_string \"Error: Unable to set account spending amount.\"" - } - ], - "id": 3183, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "36714:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36714:152:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3195, - "nodeType": "ExpressionStatement", - "src": "36714:152:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3198, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36946:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3199, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3144, - "src": "36952:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3200, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3146, - "src": "36962:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3201, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "36968:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3202, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "36972:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3203, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3152, - "src": "36980:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3197, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "36932:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36932:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 3205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36993:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 3196, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "36917:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36917:127:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3207, - "nodeType": "ExpressionStatement", - "src": "36917:127:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3210, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "37122:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3211, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3144, - "src": "37128:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3212, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3146, - "src": "37138:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3213, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3167, - "src": "37144:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3214, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3176, - "src": "37157:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3216, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "37173:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3217, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3167, - "src": "37179:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3215, - "name": "getFeeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2626, - "src": "37163:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" - } - }, - "id": 3218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37163:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3209, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "37108:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37108:84:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", - "id": 3220, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37200:49:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - }, - "value": "Error: Unable to transfer fees to fee contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - } - ], - "id": 3208, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "37093:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37093:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3222, - "nodeType": "ExpressionStatement", - "src": "37093:162:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3225, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "37346:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3226, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3144, - "src": "37352:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3227, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3146, - "src": "37362:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3228, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "37368:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3224, - "name": "updateAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3387, - "src": "37330:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256) returns (bool)" - } - }, - "id": 3229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37330:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e636520666f72207370656e6465722e", - "id": 3230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37383:48:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", - "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" - }, - "value": "Error: Unable to update allowance for spender." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", - "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" - } - ], - "id": 3223, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "37315:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37315:122:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3232, - "nodeType": "ExpressionStatement", - "src": "37315:122:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37451:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3156, - "id": 3234, - "nodeType": "Return", - "src": "37444:11:8" - } - ] - }, - "documentation": "@notice Transfer an amount of currency token from account to another specified account via an approved spender account\n@dev This function is called by an interface that is accessible directly to the account spender\n@dev | This method has an `internal` view\n@dev | Transactions will fail if the spending amount exceeds the daily limit\n@dev | This method uses `forceTransfer()` low-level api\n@dev | This method implements ERC20 transferFrom() method with approved spender behavior\n@dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3236, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3142, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36281:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3141, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "36281:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3144, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36300:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3143, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "36300:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3146, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36317:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36317:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3148, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36331:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3147, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36331:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3150, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36343:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3149, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "36343:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3152, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36356:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3151, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "36356:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "36280:87:8" - }, - "payable": false, - "returnParameters": { - "id": 3156, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3155, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36386:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3154, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "36386:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "36385:14:8" - }, - "scope": 4606, - "src": "36259:1201:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3334, - "nodeType": "Block", - "src": "38349:801:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3255, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "38378:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3254, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "38370:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38370:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38385:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "38370:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", - "id": 3259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38396:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - }, - "value": "Error: `to` address must not be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - } - ], - "id": 3253, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "38355:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38355:86:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3261, - "nodeType": "ExpressionStatement", - "src": "38355:86:8" - }, - { - "assignments": [ - 3263 - ], - "declarations": [ - { - "constant": false, - "id": 3263, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38448:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3262, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "38448:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3275, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38490:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3268, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3240, - "src": "38507:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3270, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38537:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3271, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3242, - "src": "38543:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3269, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "38517:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38517:31:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3265, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "38473:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "38473:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38473:76:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3264, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "38463:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38463:87:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "38448:102:8" - }, - { - "assignments": [ - 3277 - ], - "declarations": [ - { - "constant": false, - "id": 3277, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38556:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3276, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "38556:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3289, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38598:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3282, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3240, - "src": "38615:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3284, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38645:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3285, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "38651:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3283, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "38625:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38625:29:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3279, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "38581:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3280, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "38581:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38581:74:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3278, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "38571:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38571:85:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "38556:100:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3294, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3263, - "src": "38699:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3301, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3246, - "src": "38736:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3298, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3263, - "src": "38726:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3295, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38705:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3296, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "38705:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "38705:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38705:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "38705:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38705:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3291, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38678:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3292, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "38678:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "38678:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38678:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38752:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3290, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "38663:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38663:202:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3306, - "nodeType": "ExpressionStatement", - "src": "38663:202:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3311, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3277, - "src": "38907:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3318, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3246, - "src": "38944:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3315, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3277, - "src": "38934:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3312, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38913:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3313, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "38913:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "38913:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38913:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "38913:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38913:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3308, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38886:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3309, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "38886:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "38886:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38886:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38960:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3307, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "38871:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38871:202:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3323, - "nodeType": "ExpressionStatement", - "src": "38871:202:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3325, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3240, - "src": "39094:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3326, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3242, - "src": "39104:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3327, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "39110:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3328, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3246, - "src": "39114:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3329, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3248, - "src": "39122:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3324, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1670, - "src": "39085:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,address,uint256,bytes memory)" - } - }, - "id": 3330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39085:42:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3331, - "nodeType": "EmitStatement", - "src": "39080:47:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "39141:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3252, - "id": 3333, - "nodeType": "Return", - "src": "39134:11:8" - } - ] - }, - "documentation": "@notice Low-level transfer method\n@dev | This method has an `internal` view\n@dev | This method does not include fees or approved allowances.\n@dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3335, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "forceTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3249, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3238, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38230:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3237, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "38230:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3240, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38249:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3239, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "38249:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3242, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38266:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "38266:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3244, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38280:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3243, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "38280:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3246, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38292:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3245, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "38292:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3248, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38305:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3247, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "38305:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "38229:87:8" - }, - "payable": false, - "returnParameters": { - "id": 3252, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3251, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38335:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3250, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "38335:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "38334:14:8" - }, - "scope": 4606, - "src": "38207:943:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3386, - "nodeType": "Block", - "src": "39827:376:8", - "statements": [ - { - "assignments": [ - 3349 - ], - "declarations": [ - { - "constant": false, - "id": 3349, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39833:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3348, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "39833:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3366, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 3353, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "39873:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 3354, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3339, - "src": "39892:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3356, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3337, - "src": "39922:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3357, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3341, - "src": "39928:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3355, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "39902:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39902:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3360, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3337, - "src": "39958:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3361, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "39964:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "39964:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3359, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "39938:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39938:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3351, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "39856:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3352, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "39856:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39856:120:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3350, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "39846:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39846:131:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "39833:144:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3371, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3349, - "src": "40019:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3378, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3343, - "src": "40052:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3375, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3349, - "src": "40044:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3372, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3337, - "src": "40023:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3373, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "40023:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "40023:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40023:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "40023:28:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40023:36:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3368, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3337, - "src": "39998:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3369, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "39998:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "39998:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39998:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3381, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40068:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3367, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "39983:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39983:198:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3383, - "nodeType": "ExpressionStatement", - "src": "39983:198:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3384, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40194:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3347, - "id": 3385, - "nodeType": "Return", - "src": "40187:11:8" - } - ] - }, - "documentation": "@notice Low-level method to update spender allowance for account\n@dev | This method is called inside the `transferFrom()` method\n@dev | msg.sender == spender address\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Value to reduce allowance by (i.e. the amount spent)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3387, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "updateAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3344, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3337, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39729:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3336, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "39729:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3339, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39748:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3338, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "39748:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3341, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39765:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3340, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "39765:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3343, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39782:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3342, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "39782:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "39728:66:8" - }, - "payable": false, - "returnParameters": { - "id": 3347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3346, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39813:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3345, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "39813:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "39812:14:8" - }, - "scope": 4606, - "src": "39704:499:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3507, - "nodeType": "Block", - "src": "40767:1110:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3399, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3391, - "src": "40781:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40792:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "40781:14:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20607370656e6465726020616464726573732063616e6e6f74206265206e756c6c2e", - "id": 3402, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40805:42:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", - "typeString": "literal_string \"Error: `spender` address cannot be null.\"" - }, - "value": "Error: `spender` address cannot be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", - "typeString": "literal_string \"Error: `spender` address cannot be null.\"" - } - ], - "id": 3398, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "40773:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40773:75:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3404, - "nodeType": "ExpressionStatement", - "src": "40773:75:8" - }, - { - "assignments": [ - 3406 - ], - "declarations": [ - { - "constant": false, - "id": 3406, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40855:22:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3405, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "40855:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3413, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3408, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "40895:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3410, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "40909:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 3409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "40901:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40901:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3407, - "name": "getTokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2418, - "src": "40880:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" - } - }, - "id": 3412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40880:35:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "40855:60:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3416, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "40959:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3417, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3406, - "src": "40965:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3419, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "40995:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3420, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3391, - "src": "41001:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3418, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "40975:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40975:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3415, - "name": "getTokenFrozenBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2848, - "src": "40937:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" - } - }, - "id": 3422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40937:73:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3423, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41014:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "40937:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205370656e646572206d757374206e6f74206861766520612066726f7a656e2062616c616e6365206469726563746c79", - "id": 3425, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41023:56:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", - "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" - }, - "value": "Error: Spender must not have a frozen balance directly" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", - "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" - } - ], - "id": 3414, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "40922:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40922:158:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3427, - "nodeType": "ExpressionStatement", - "src": "40922:158:8" - }, - { - "assignments": [ - 3429 - ], - "declarations": [ - { - "constant": false, - "id": 3429, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "41087:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3428, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "41087:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3446, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 3433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41129:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 3434, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3406, - "src": "41148:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3436, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41178:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3437, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "41184:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41184:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3435, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "41158:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41158:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3441, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41217:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3442, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3391, - "src": "41223:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3440, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "41197:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41197:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3431, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "41112:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3432, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41112:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41112:120:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3430, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "41102:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41102:131:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "41087:146:8" - }, - { - "assignments": [ - 3448 - ], - "declarations": [ - { - "constant": false, - "id": 3448, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "41239:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3447, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "41239:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3461, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3452, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41281:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3453, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3406, - "src": "41298:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3455, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41328:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3456, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "41334:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41334:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3454, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "41308:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41308:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3450, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "41264:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3451, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41264:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41264:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3449, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "41254:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41254:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "41239:108:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3466, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3429, - "src": "41390:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3463, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41369:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3464, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "41369:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "41369:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41369:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3468, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41399:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "41369:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3472, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3470, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "41404:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41414:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "41404:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "41369:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283029206265666f72652073657474696e6720616e207570646174656420616c6c6f77616e636520666f72207370656e6465722e", - "id": 3474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41423:84:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", - "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" - }, - "value": "Error: Allowance must be zero (0) before setting an updated allowance for spender." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", - "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" - } - ], - "id": 3462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "41354:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41354:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3476, - "nodeType": "ExpressionStatement", - "src": "41354:154:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3481, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "41551:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3478, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41530:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3479, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "41530:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "41530:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41530:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3483, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "41560:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "41530:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d73672e73656e64657220746f6b656e2062616c616e63652e", - "id": 3485, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41574:58:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", - "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" - }, - "value": "Error: Allowance cannot exceed msg.sender token balance." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", - "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" - } - ], - "id": 3477, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "41515:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41515:118:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3487, - "nodeType": "ExpressionStatement", - "src": "41515:118:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3492, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3429, - "src": "41676:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3493, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "41682:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3489, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41655:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3490, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "41655:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "41655:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41655:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3495, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41697:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3488, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "41640:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41640:165:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3497, - "nodeType": "ExpressionStatement", - "src": "41640:165:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3499, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "41826:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41826:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3501, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3391, - "src": "41838:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3502, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "41847:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3498, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1638, - "src": "41817:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41817:37:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3504, - "nodeType": "EmitStatement", - "src": "41812:42:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3505, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41868:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3397, - "id": 3506, - "nodeType": "Return", - "src": "41861:11:8" - } - ] - }, - "documentation": "@notice Low-level method to set the allowance for a spender\n@dev | This method is called inside the `approve()` ERC20 method\n@dev | msg.sender == account holder\n@param self Internal storage proxying TokenIOStorage contract\n@param spender Ethereum address of account spender\n@param amount Value to set for spender allowance\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3508, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approveAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3394, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3389, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40686:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3388, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "40686:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3391, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40705:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3390, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "40705:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3393, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40722:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3392, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "40722:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "40685:49:8" - }, - "payable": false, - "returnParameters": { - "id": 3397, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3396, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40753:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3395, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "40753:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "40752:14:8" - }, - "scope": 4606, - "src": "40660:1217:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3618, - "nodeType": "Block", - "src": "42704:943:8", - "statements": [ - { - "assignments": [ - 3524 - ], - "declarations": [ - { - "constant": false, - "id": 3524, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42710:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3523, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42710:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3536, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3528, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42752:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3529, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3512, - "src": "42769:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3531, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "42799:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3532, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3514, - "src": "42805:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3530, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "42779:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42779:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3526, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "42735:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42735:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42735:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3525, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "42725:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42725:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42710:105:8" - }, - { - "assignments": [ - 3538 - ], - "declarations": [ - { - "constant": false, - "id": 3538, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42821:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3537, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42821:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3547, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e697373756564", - "id": 3542, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42863:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - "value": "token.issued" - }, - { - "argumentTypes": null, - "id": 3543, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3512, - "src": "42879:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3544, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "42889:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3540, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "42846:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42846:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42846:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3539, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "42836:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42836:65:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42821:80:8" - }, - { - "assignments": [ - 3549 - ], - "declarations": [ - { - "constant": false, - "id": 3549, - "name": "id_c", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42907:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3548, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42907:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3557, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 3553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42949:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 3554, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3512, - "src": "42965:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3551, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "42932:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42932:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42932:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3550, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "42922:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42922:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42907:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3562, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3524, - "src": "43012:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3569, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3516, - "src": "43049:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3566, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3524, - "src": "43039:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3563, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43018:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3564, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43018:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "43018:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43018:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43018:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43018:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3559, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "42991:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3560, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "42991:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "42991:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42991:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3572, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43065:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3558, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "42983:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42983:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3574, - "nodeType": "ExpressionStatement", - "src": "42983:190:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3579, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3538, - "src": "43208:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3586, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3516, - "src": "43245:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3583, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3538, - "src": "43235:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3580, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43214:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3581, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43214:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "43214:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43214:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43214:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43214:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3576, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43187:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3577, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43187:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "43187:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43187:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3589, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43261:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3575, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "43179:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43179:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3591, - "nodeType": "ExpressionStatement", - "src": "43179:190:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3596, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3549, - "src": "43404:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3603, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3516, - "src": "43441:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3600, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3549, - "src": "43431:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3597, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43410:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3598, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43410:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "43410:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43410:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43410:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43410:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3593, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43383:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43383:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "43383:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43383:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43457:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3592, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "43375:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43375:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3608, - "nodeType": "ExpressionStatement", - "src": "43375:190:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3610, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3512, - "src": "43585:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3611, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3514, - "src": "43595:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3612, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3516, - "src": "43604:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3613, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "43612:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3609, - "name": "Deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "43577:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,uint256,string memory)" - } - }, - "id": 3614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43577:46:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3615, - "nodeType": "EmitStatement", - "src": "43572:51:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43637:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3522, - "id": 3617, - "nodeType": "Return", - "src": "43630:11:8" - } - ] - }, - "documentation": "@notice Deposit an amount of currency into the Ethereum account holder\n@dev | The total supply of the token increases only when new funds are deposited 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to deposit for account\n@param issuerFirm Name of the issuing firm authorizing the deposit\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3619, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3519, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3510, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42587:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3509, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "42587:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3512, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42606:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3511, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "42606:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3514, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42623:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3513, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "42623:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3516, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42640:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3515, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "42640:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3518, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42653:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3517, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "42653:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "42586:85:8" - }, - "payable": false, - "returnParameters": { - "id": 3522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3521, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42690:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3520, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "42690:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "42689:14:8" - }, - "scope": 4606, - "src": "42570:1077:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3729, - "nodeType": "Block", - "src": "44478:1002:8", - "statements": [ - { - "assignments": [ - 3635 - ], - "declarations": [ - { - "constant": false, - "id": 3635, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44484:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3634, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44484:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3647, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3639, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44526:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3640, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "44543:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3642, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "44573:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3643, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3625, - "src": "44579:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3641, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "44553:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44553:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3637, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "44509:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3638, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44509:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44509:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3636, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "44499:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44499:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44484:105:8" - }, - { - "assignments": [ - 3649 - ], - "declarations": [ - { - "constant": false, - "id": 3649, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44595:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3648, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44595:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3658, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e697373756564", - "id": 3653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44637:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - "value": "token.issued" - }, - { - "argumentTypes": null, - "id": 3654, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "44653:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3655, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "44663:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3651, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "44620:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3652, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44620:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44620:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3650, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "44610:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44610:65:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44595:80:8" - }, - { - "assignments": [ - 3660 - ], - "declarations": [ - { - "constant": false, - "id": 3660, - "name": "id_c", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44719:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3659, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44719:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3668, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 3664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44761:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 3665, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "44777:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3662, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "44744:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44744:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44744:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3661, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "44734:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44734:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44719:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3673, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3635, - "src": "44830:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3680, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "44867:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3677, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3635, - "src": "44857:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3674, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "44836:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3675, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "44836:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "44836:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44836:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "44836:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44836:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3670, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "44809:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3671, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "44809:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "44809:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44809:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44883:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3669, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "44794:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3684, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44794:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3685, - "nodeType": "ExpressionStatement", - "src": "44794:197:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3690, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "45033:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3697, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "45070:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3694, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "45060:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3691, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "45039:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3692, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "45039:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "45039:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45039:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "45039:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45039:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3687, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "45012:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3688, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "45012:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "45012:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45012:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3700, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45086:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3686, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "44997:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44997:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3702, - "nodeType": "ExpressionStatement", - "src": "44997:197:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3707, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3660, - "src": "45236:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3714, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "45273:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3711, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3660, - "src": "45263:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3708, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "45242:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3709, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "45242:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "45242:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45242:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "45242:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45242:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3704, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "45215:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3705, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "45215:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "45215:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45215:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3717, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45289:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3703, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "45200:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45200:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3719, - "nodeType": "ExpressionStatement", - "src": "45200:197:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3721, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "45418:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3722, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3625, - "src": "45428:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3723, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "45437:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3724, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "45445:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3720, - "name": "Withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1658, - "src": "45409:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,uint256,string memory)" - } - }, - "id": 3725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45409:47:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3726, - "nodeType": "EmitStatement", - "src": "45404:52:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45470:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3633, - "id": 3728, - "nodeType": "Return", - "src": "45463:11:8" - } - ] - }, - "documentation": "@notice Withdraw an amount of currency from the Ethereum account holder\n@dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to withdraw for account\n@param issuerFirm Name of the issuing firm authorizing the withdraw\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3730, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3630, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3621, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44361:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3620, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "44361:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3623, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44380:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3622, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "44380:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3625, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44397:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3624, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "44397:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3627, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44414:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3626, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "44414:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3629, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44427:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3628, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "44427:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "44360:85:8" - }, - "payable": false, - "returnParameters": { - "id": 3633, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3632, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44464:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3631, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "44464:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "44463:14:8" - }, - "scope": 4606, - "src": "44343:1137:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3763, - "nodeType": "Block", - "src": "46213:275:8", - "statements": [ - { - "assignments": [ - 3742 - ], - "declarations": [ - { - "constant": false, - "id": 3742, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46219:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3741, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "46219:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3750, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e6669726d", - "id": 3746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46259:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - "value": "registered.firm" - }, - { - "argumentTypes": null, - "id": 3747, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3734, - "src": "46278:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3744, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "46242:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3745, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "46242:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46242:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3743, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "46232:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46232:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "46219:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3755, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3742, - "src": "46332:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3756, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3736, - "src": "46336:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3752, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3732, - "src": "46311:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "46311:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "46311:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 3757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46311:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3758, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46353:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3751, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "46296:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46296:170:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3760, - "nodeType": "ExpressionStatement", - "src": "46296:170:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3761, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46479:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3740, - "id": 3762, - "nodeType": "Return", - "src": "46472:11:8" - } - ] - }, - "documentation": "@notice Method for setting a registered issuer firm\n@dev | Only Token, Inc. and other authorized institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered\n@param approved Approval status to set for the firm (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3764, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setRegisteredFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3732, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46128:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3731, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "46128:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3734, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46147:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3733, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "46147:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3736, - "name": "approved", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46166:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3735, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "46166:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "46127:53:8" - }, - "payable": false, - "returnParameters": { - "id": 3740, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3739, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46199:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3738, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "46199:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "46198:14:8" - }, - "scope": 4606, - "src": "46101:387:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3828, - "nodeType": "Block", - "src": "47321:679:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3779, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3766, - "src": "47359:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3780, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3768, - "src": "47365:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3778, - "name": "isRegisteredFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3884, - "src": "47342:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" - } - }, - "id": 3781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47342:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20606973737565724669726d60206d75737420626520726567697374657265642e", - "id": 3782, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47384:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", - "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" - }, - "value": "Error: `issuerFirm` must be registered." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", - "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" - } - ], - "id": 3777, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "47327:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3783, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47327:99:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3784, - "nodeType": "ExpressionStatement", - "src": "47327:99:8" - }, - { - "assignments": [ - 3786 - ], - "declarations": [ - { - "constant": false, - "id": 3786, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47433:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3785, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "47433:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3795, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47475:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "id": 3791, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3768, - "src": "47499:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3792, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3770, - "src": "47511:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3788, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "47458:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "47458:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3793, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47458:70:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3787, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "47448:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47448:81:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "47433:96:8" - }, - { - "assignments": [ - 3797 - ], - "declarations": [ - { - "constant": false, - "id": 3797, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47535:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3796, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "47535:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3805, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f726974792e6669726d", - "id": 3801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47577:27:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - "value": "registered.authority.firm" - }, - { - "argumentTypes": null, - "id": 3802, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3770, - "src": "47606:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3799, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "47560:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "47560:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47560:63:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3798, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "47550:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47550:74:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "47535:89:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3810, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3786, - "src": "47667:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3811, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3772, - "src": "47673:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3807, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3766, - "src": "47646:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3808, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "47646:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "47646:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 3812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47646:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47690:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3806, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "47631:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47631:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3815, - "nodeType": "ExpressionStatement", - "src": "47631:167:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3820, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3797, - "src": "47843:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3821, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3768, - "src": "47849:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3817, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3766, - "src": "47820:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3818, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "47820:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "47820:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 3822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47820:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3823, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47868:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3816, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "47805:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47805:171:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3825, - "nodeType": "ExpressionStatement", - "src": "47805:171:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47991:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3776, - "id": 3827, - "nodeType": "Return", - "src": "47984:11:8" - } - ] - }, - "documentation": "@notice Method for setting a registered issuer firm authority\n@dev | Only Token, Inc. and other approved institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | Authority can only be set for a registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered to authority\n@param authorityAddress Ethereum address of the firm authority to be approved\n@param approved Approval status to set for the firm authority (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3829, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setRegisteredAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3773, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3766, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47210:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3765, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "47210:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3768, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47229:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3767, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "47229:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3770, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47248:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3769, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "47248:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3772, - "name": "approved", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47274:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3771, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "47274:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "47209:79:8" - }, - "payable": false, - "returnParameters": { - "id": 3776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3775, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47307:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3774, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "47307:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "47306:14:8" - }, - "scope": 4606, - "src": "47178:822:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3857, - "nodeType": "Block", - "src": "48488:164:8", - "statements": [ - { - "assignments": [ - 3839 - ], - "declarations": [ - { - "constant": false, - "id": 3839, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3858, - "src": "48494:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3838, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "48494:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3850, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f726974792e6669726d", - "id": 3843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "48534:27:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - "value": "registered.authority.firm" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3845, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3831, - "src": "48583:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3846, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3833, - "src": "48589:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3844, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "48563:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48563:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3841, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "48517:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "48517:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48517:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3840, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "48507:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48507:101:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "48494:114:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3854, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3839, - "src": "48644:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3851, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3831, - "src": "48621:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "48621:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "48621:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 3855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48621:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 3837, - "id": 3856, - "nodeType": "Return", - "src": "48614:33:8" - } - ] - }, - "documentation": "@notice Get the issuer firm registered to the authority Ethereum address\n@dev | Only one firm can be registered per authority\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"issuerFirm\" : \"Name of the firm registered to authority\" }", - "id": 3858, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFirmFromAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3834, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3831, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3858, - "src": "48401:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3830, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "48401:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3833, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3858, - "src": "48420:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "48420:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48400:45:8" - }, - "payable": false, - "returnParameters": { - "id": 3837, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3836, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3858, - "src": "48469:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3835, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "48469:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48468:19:8" - }, - "scope": 4606, - "src": "48371:281:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3883, - "nodeType": "Block", - "src": "49050:119:8", - "statements": [ - { - "assignments": [ - 3868 - ], - "declarations": [ - { - "constant": false, - "id": 3868, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3884, - "src": "49056:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3867, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "49056:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3876, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e6669726d", - "id": 3872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "49096:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - "value": "registered.firm" - }, - { - "argumentTypes": null, - "id": 3873, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3862, - "src": "49115:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3870, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "49079:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3871, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "49079:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49079:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3869, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "49069:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49069:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "49056:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3880, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3868, - "src": "49161:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3877, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3860, - "src": "49140:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3878, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "49140:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "49140:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49140:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3866, - "id": 3882, - "nodeType": "Return", - "src": "49133:31:8" - } - ] - }, - "documentation": "@notice Return the boolean (true/false) registration status for an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@return { \"registered\" : \"Return if the issuer firm has been registered\" }", - "id": 3884, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3860, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3884, - "src": "48972:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3859, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "48972:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3862, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3884, - "src": "48991:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3861, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "48991:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48971:38:8" - }, - "payable": false, - "returnParameters": { - "id": 3866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3865, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3884, - "src": "49033:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3864, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "49033:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49032:17:8" - }, - "scope": 4606, - "src": "48946:223:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3915, - "nodeType": "Block", - "src": "49701:169:8", - "statements": [ - { - "assignments": [ - 3896 - ], - "declarations": [ - { - "constant": false, - "id": 3896, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49707:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3895, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "49707:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3908, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3900, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "49747:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "id": 3901, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3888, - "src": "49771:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3903, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3886, - "src": "49803:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3904, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3890, - "src": "49809:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3902, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "49783:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49783:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3898, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "49730:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "49730:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49730:97:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3897, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "49720:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49720:108:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "49707:121:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3912, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3896, - "src": "49862:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3909, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3886, - "src": "49841:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3910, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "49841:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "49841:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49841:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3894, - "id": 3914, - "nodeType": "Return", - "src": "49834:31:8" - } - ] - }, - "documentation": "@notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }", - "id": 3916, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredToFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3891, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3886, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49597:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3885, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "49597:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3888, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49616:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3887, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "49616:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3890, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49635:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3889, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "49635:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49596:64:8" - }, - "payable": false, - "returnParameters": { - "id": 3894, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3893, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49684:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3892, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "49684:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49683:17:8" - }, - "scope": 4606, - "src": "49569:301:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3951, - "nodeType": "Block", - "src": "50346:230:8", - "statements": [ - { - "assignments": [ - 3926 - ], - "declarations": [ - { - "constant": false, - "id": 3926, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3952, - "src": "50352:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "50352:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3944, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "50392:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3932, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3918, - "src": "50437:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3934, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3918, - "src": "50463:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3935, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3920, - "src": "50469:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3933, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "50443:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50443:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3931, - "name": "getFirmFromAuthority", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "50416:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" - } - }, - "id": 3937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50416:71:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3939, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3918, - "src": "50509:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3940, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3920, - "src": "50515:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3938, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "50489:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50489:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3928, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "50375:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "50375:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50375:158:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3927, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "50365:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50365:169:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "50352:182:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3948, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3926, - "src": "50568:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3945, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3918, - "src": "50547:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3946, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "50547:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "50547:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50547:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3924, - "id": 3950, - "nodeType": "Return", - "src": "50540:31:8" - } - ] - }, - "documentation": "@notice Return if an authority address is registered\n@dev | This also checks the status of the registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered\" }", - "id": 3952, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3921, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3918, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3952, - "src": "50261:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3917, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "50261:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3920, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3952, - "src": "50280:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3919, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "50280:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50260:45:8" - }, - "payable": false, - "returnParameters": { - "id": 3924, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3923, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3952, - "src": "50329:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3922, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "50329:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50328:17:8" - }, - "scope": 4606, - "src": "50230:346:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3977, - "nodeType": "Block", - "src": "51021:109:8", - "statements": [ - { - "assignments": [ - 3962 - ], - "declarations": [ - { - "constant": false, - "id": 3962, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3978, - "src": "51027:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3961, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51027:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3970, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74782e737461747573", - "id": 3966, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51067:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - "value": "tx.status" - }, - { - "argumentTypes": null, - "id": 3967, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3956, - "src": "51080:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 3964, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "51050:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "51050:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51050:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3963, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "51040:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51040:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "51027:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3974, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3962, - "src": "51122:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3971, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3954, - "src": "51101:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3972, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "51101:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "51101:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51101:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3960, - "id": 3976, - "nodeType": "Return", - "src": "51094:31:8" - } - ] - }, - "documentation": "@notice Return boolean transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}", - "id": 3978, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTxStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3957, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3954, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3978, - "src": "50948:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3953, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "50948:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3956, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 3978, - "src": "50967:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3955, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "50967:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50947:35:8" - }, - "payable": false, - "returnParameters": { - "id": 3960, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3959, - "name": "txStatus", - "nodeType": "VariableDeclaration", - "scope": 3978, - "src": "51006:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3958, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "51006:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51005:15:8" - }, - "scope": 4606, - "src": "50927:203:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4018, - "nodeType": "Block", - "src": "51539:486:8", - "statements": [ - { - "assignments": [ - 3988 - ], - "declarations": [ - { - "constant": false, - "id": 3988, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4019, - "src": "51545:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3987, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51545:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3996, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74782e737461747573", - "id": 3992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51585:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - "value": "tx.status" - }, - { - "argumentTypes": null, - "id": 3993, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3982, - "src": "51598:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 3990, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "51568:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3991, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "51568:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51568:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3989, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "51558:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51558:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "51545:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "51675:26:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3999, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3980, - "src": "51688:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4000, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3982, - "src": "51694:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 3998, - "name": "getTxStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3978, - "src": "51676:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) view returns (bool)" - } - }, - "id": 4001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51676:25:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205472616e73616374696f6e20737461747573206d7573742062652066616c7365206265666f72652073657474696e6720746865207472616e73616374696f6e207374617475732e", - "id": 4003, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51709:80:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", - "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" - }, - "value": "Error: Transaction status must be false before setting the transaction status." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", - "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" - } - ], - "id": 3997, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "51667:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51667:123:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4005, - "nodeType": "ExpressionStatement", - "src": "51667:123:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4010, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3988, - "src": "51877:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51881:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4007, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3980, - "src": "51856:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4008, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "51856:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "51856:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 4012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51856:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 4013, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51894:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 4006, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "51848:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4014, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51848:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4015, - "nodeType": "ExpressionStatement", - "src": "51848:154:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4016, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "52016:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3986, - "id": 4017, - "nodeType": "Return", - "src": "52009:11:8" - } - ] - }, - "documentation": "@notice Set transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 4019, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTxStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3983, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3980, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4019, - "src": "51472:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3979, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "51472:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3982, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 4019, - "src": "51491:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3981, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51491:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51471:35:8" - }, - "payable": false, - "returnParameters": { - "id": 3986, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3985, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4019, - "src": "51525:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3984, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "51525:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51524:14:8" - }, - "scope": 4606, - "src": "51451:574:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4132, - "nodeType": "Block", - "src": "53345:1436:8", - "statements": [ - { - "assignments": [ - 4045 - ], - "declarations": [ - { - "constant": false, - "id": 4045, - "name": "fxTxHash", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53352:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4044, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53352:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4057, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4049, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "53398:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4050, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4025, - "src": "53409:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4051, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4027, - "src": "53418:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4052, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4029, - "src": "53427:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4053, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4031, - "src": "53435:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4054, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "53443:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4047, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "53381:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "53381:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53381:73:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4046, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "53371:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4056, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53371:84:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "53352:103:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4060, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4021, - "src": "53628:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4061, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "53634:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "53634:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4063, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "53646:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4059, - "name": "verifyAccounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3018, - "src": "53613:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) view returns (bool)" - } - }, - "id": 4064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53613:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204f6e6c79207665726966696564206163636f756e74732063616e20706572666f726d2063757272656e63792073776170732e", - "id": 4065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "53664:59:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", - "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" - }, - "value": "Error: Only verified accounts can perform currency swaps." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", - "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" - } - ], - "id": 4058, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "53598:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53598:126:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4067, - "nodeType": "ExpressionStatement", - "src": "53598:126:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4070, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4021, - "src": "53848:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4071, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "53854:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4069, - "name": "setTxStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4019, - "src": "53836:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) returns (bool)" - } - }, - "id": 4072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53836:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204661696c656420746f20736574207472616e73616374696f6e2073746174757320746f2066756c66696c6c65642e", - "id": 4073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "53871:55:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", - "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" - }, - "value": "Error: Failed to set transaction status to fulfilled." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", - "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" - } - ], - "id": 4068, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "53821:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53821:106:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4075, - "nodeType": "ExpressionStatement", - "src": "53821:106:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4077, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "53992:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4078, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5242, - "src": "54006:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "53992:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205472616e73616374696f6e20686173206578706972656421", - "id": 4080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54011:33:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", - "typeString": "literal_string \"Error: Transaction has expired!\"" - }, - "value": "Error: Transaction has expired!" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", - "typeString": "literal_string \"Error: Transaction has expired!\"" - } - ], - "id": 4076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "53984:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53984:61:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4082, - "nodeType": "ExpressionStatement", - "src": "53984:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4085, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "54205:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4086, - "name": "sigV", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4033, - "src": "54215:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 4087, - "name": "sigR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4035, - "src": "54221:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4088, - "name": "sigS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "54227:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4084, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5232, - "src": "54195:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 4089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54195:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4090, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "54236:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "54195:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204164647265737320646572697665642066726f6d207472616e73616374696f6e207369676e617475726520646f6573206e6f74206d6174636820746865207265717565737465722061646472657373", - "id": 4092, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54253:88:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", - "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" - }, - "value": "Error: Address derived from transaction signature does not match the requester address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", - "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" - } - ], - "id": 4083, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "54180:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54180:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4094, - "nodeType": "ExpressionStatement", - "src": "54180:162:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4097, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4021, - "src": "54436:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4098, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4025, - "src": "54442:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4099, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "54451:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "54451:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4101, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "54463:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4102, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4029, - "src": "54474:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 4103, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54482:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - } - ], - "id": 4096, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "54422:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 4104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54422:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 4105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54496:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 4095, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "54407:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54407:135:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4107, - "nodeType": "ExpressionStatement", - "src": "54407:135:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4110, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4021, - "src": "54578:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4111, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4027, - "src": "54584:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4112, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "54593:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4113, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "54604:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "54604:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4115, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4031, - "src": "54616:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 4116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54624:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - } - ], - "id": 4109, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "54564:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 4117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54564:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 4118, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54638:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 4108, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "54549:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54549:135:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4120, - "nodeType": "ExpressionStatement", - "src": "54549:135:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4122, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4025, - "src": "54703:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4123, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4027, - "src": "54712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4124, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4029, - "src": "54721:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4125, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4031, - "src": "54729:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4126, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "54737:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4127, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "54749:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4121, - "name": "FxSwap", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1700, - "src": "54696:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", - "typeString": "function (string memory,string memory,uint256,uint256,uint256,bytes32)" - } - }, - "id": 4128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54696:62:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4129, - "nodeType": "EmitStatement", - "src": "54691:67:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4130, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54772:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4043, - "id": 4131, - "nodeType": "Return", - "src": "54765:11:8" - } - ] - }, - "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev | This method can be called directly between peers\n@dev | This method does not take transaction fees from the swap\n@param self Internal storage proxying TokenIOStorage contract\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", - "id": 4133, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "execSwap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4021, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53121:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4020, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "53121:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4023, - "name": "requester", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53144:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4022, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "53144:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4025, - "name": "symbolA", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53167:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4024, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "53167:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4027, - "name": "symbolB", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53187:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4026, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "53187:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4029, - "name": "valueA", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53207:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4028, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53207:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4031, - "name": "valueB", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53224:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4030, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53224:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4033, - "name": "sigV", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53241:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4032, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "53241:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4035, - "name": "sigR", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53257:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4034, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53257:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4037, - "name": "sigS", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53275:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4036, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53275:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4039, - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53293:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4038, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53293:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "53115:197:8" - }, - "payable": false, - "returnParameters": { - "id": 4043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4042, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53331:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4041, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "53331:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "53330:14:8" - }, - "scope": 4606, - "src": "53098:1683:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4171, - "nodeType": "Block", - "src": "55334:350:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4143, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4137, - "src": "55348:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 4144, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55367:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "55348:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2063616e6e6f74206465707265636174652061206e756c6c20616464726573732e", - "id": 4146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55380:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", - "typeString": "literal_string \"Error: cannot deprecate a null address.\"" - }, - "value": "Error: cannot deprecate a null address." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", - "typeString": "literal_string \"Error: cannot deprecate a null address.\"" - } - ], - "id": 4142, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "55340:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55340:82:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4148, - "nodeType": "ExpressionStatement", - "src": "55340:82:8" - }, - { - "assignments": [ - 4150 - ], - "declarations": [ - { - "constant": false, - "id": 4150, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4172, - "src": "55429:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4149, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "55429:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4158, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6465706372656361746564", - "id": 4154, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55469:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - "value": "depcrecated" - }, - { - "argumentTypes": null, - "id": 4155, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4137, - "src": "55484:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "55452:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "55452:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55452:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4151, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "55442:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55442:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "55429:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4163, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4150, - "src": "55537:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55541:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4160, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4135, - "src": "55516:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4161, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "55516:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "55516:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 4165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55516:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55554:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4159, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "55508:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55508:153:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4168, - "nodeType": "ExpressionStatement", - "src": "55508:153:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55675:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4141, - "id": 4170, - "nodeType": "Return", - "src": "55668:11:8" - } - ] - }, - "documentation": "@notice Deprecate a contract interface\n@dev | This is a low-level method to deprecate a contract interface.\n@dev | This is useful if the interface needs to be updated or becomes out of date\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", - "id": 4172, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setDeprecatedContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4138, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4135, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4172, - "src": "55258:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4134, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "55258:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4137, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 4172, - "src": "55277:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4136, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "55277:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "55257:44:8" - }, - "payable": false, - "returnParameters": { - "id": 4141, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4140, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4172, - "src": "55320:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4139, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "55320:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "55319:14:8" - }, - "scope": 4606, - "src": "55227:457:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4197, - "nodeType": "Block", - "src": "56098:120:8", - "statements": [ - { - "assignments": [ - 4182 - ], - "declarations": [ - { - "constant": false, - "id": 4182, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4198, - "src": "56104:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4181, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "56104:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4190, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6465706372656361746564", - "id": 4186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56144:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - "value": "depcrecated" - }, - { - "argumentTypes": null, - "id": 4187, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4176, - "src": "56159:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4184, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "56127:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4185, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "56127:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56127:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4183, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "56117:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56117:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "56104:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4194, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4182, - "src": "56210:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4191, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4174, - "src": "56189:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4192, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "56189:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "56189:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 4195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56189:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 4180, - "id": 4196, - "nodeType": "Return", - "src": "56182:31:8" - } - ] - }, - "documentation": "@notice Return the deprecation status of a contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}", - "id": 4198, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isContractDeprecated", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4177, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4174, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4198, - "src": "56018:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4173, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "56018:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4176, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 4198, - "src": "56037:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4175, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "56037:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56017:44:8" - }, - "payable": false, - "returnParameters": { - "id": 4180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4179, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 4198, - "src": "56085:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4178, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "56085:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56084:13:8" - }, - "scope": 4606, - "src": "55988:230:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4231, - "nodeType": "Block", - "src": "56741:264:8", - "statements": [ - { - "assignments": [ - 4210 - ], - "declarations": [ - { - "constant": false, - "id": 4210, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56747:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4209, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "56747:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4218, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6c696d69742e7370656e64696e672e706572696f64", - "id": 4214, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56787:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - "value": "limit.spending.period" - }, - { - "argumentTypes": null, - "id": 4215, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4202, - "src": "56812:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4212, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "56770:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4213, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "56770:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56770:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4211, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "56760:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56760:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "56747:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4223, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4210, - "src": "56856:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4224, - "name": "period", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4204, - "src": "56860:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4220, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4200, - "src": "56835:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4221, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "56835:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "56835:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56835:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56875:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4219, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "56827:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56827:155:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4228, - "nodeType": "ExpressionStatement", - "src": "56827:155:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56996:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4208, - "id": 4230, - "nodeType": "Return", - "src": "56989:11:8" - } - ] - }, - "documentation": "@notice Set the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param period Unix timestamp of the spending period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4232, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4205, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4200, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56660:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4199, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "56660:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4202, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56679:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4201, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "56679:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4204, - "name": "period", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56696:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4203, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "56696:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56659:49:8" - }, - "payable": false, - "returnParameters": { - "id": 4208, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4207, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56727:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4206, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "56727:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56726:14:8" - }, - "scope": 4606, - "src": "56626:379:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4257, - "nodeType": "Block", - "src": "57590:122:8", - "statements": [ - { - "assignments": [ - 4242 - ], - "declarations": [ - { - "constant": false, - "id": 4242, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4258, - "src": "57596:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4241, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "57596:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4250, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6c696d69742e7370656e64696e672e706572696f64", - "id": 4246, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "57636:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - "value": "limit.spending.period" - }, - { - "argumentTypes": null, - "id": 4247, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4236, - "src": "57661:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4244, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "57619:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4245, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "57619:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57619:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4243, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "57609:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57609:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "57596:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4254, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4242, - "src": "57704:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4251, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4234, - "src": "57683:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4252, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "57683:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "57683:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57683:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4240, - "id": 4256, - "nodeType": "Return", - "src": "57676:31:8" - } - ] - }, - "documentation": "@notice Get the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@dev | If the current spending period has expired, it will be set upon next `transfer()`\nor `transferFrom()` request\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"period\" : \"Returns Unix timestamp of the current spending period\"}", - "id": 4258, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4234, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4258, - "src": "57518:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4233, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "57518:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4236, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4258, - "src": "57537:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4235, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "57537:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "57517:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4240, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4239, - "name": "period", - "nodeType": "VariableDeclaration", - "scope": 4258, - "src": "57577:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4238, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "57577:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "57576:13:8" - }, - "scope": 4606, - "src": "57484:228:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4291, - "nodeType": "Block", - "src": "58198:264:8", - "statements": [ - { - "assignments": [ - 4270 - ], - "declarations": [ - { - "constant": false, - "id": 4270, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58204:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4269, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "58204:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4278, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", - "id": 4274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58244:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - "value": "account.spending.limit" - }, - { - "argumentTypes": null, - "id": 4275, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4262, - "src": "58270:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4272, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "58227:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "58227:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58227:51:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4271, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "58217:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58217:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "58204:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4283, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4270, - "src": "58314:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4284, - "name": "limit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4264, - "src": "58318:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4280, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4260, - "src": "58293:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4281, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "58293:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "58293:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58293:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4286, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58332:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4279, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "58285:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58285:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4288, - "nodeType": "ExpressionStatement", - "src": "58285:154:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58453:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4268, - "id": 4290, - "nodeType": "Return", - "src": "58446:11:8" - } - ] - }, - "documentation": "@notice Set the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param limit Spending limit amount\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4292, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingLimit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4265, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4260, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58118:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4259, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "58118:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4262, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58137:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4261, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "58137:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4264, - "name": "limit", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58154:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4263, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "58154:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58117:48:8" - }, - "payable": false, - "returnParameters": { - "id": 4268, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4267, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58184:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4266, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "58184:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58183:14:8" - }, - "scope": 4606, - "src": "58085:377:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4317, - "nodeType": "Block", - "src": "58887:123:8", - "statements": [ - { - "assignments": [ - 4302 - ], - "declarations": [ - { - "constant": false, - "id": 4302, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4318, - "src": "58893:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4301, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "58893:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4310, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", - "id": 4306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58933:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - "value": "account.spending.limit" - }, - { - "argumentTypes": null, - "id": 4307, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4296, - "src": "58959:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4304, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "58916:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "58916:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58916:51:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4303, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "58906:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58906:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "58893:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4314, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4302, - "src": "59002:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4311, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294, - "src": "58981:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4312, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "58981:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "58981:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58981:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4300, - "id": 4316, - "nodeType": "Return", - "src": "58974:31:8" - } - ] - }, - "documentation": "@notice Get the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"limit\" : \"Returns the account spending limit amount\"}", - "id": 4318, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingLimit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4294, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4318, - "src": "58816:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4293, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "58816:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4296, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4318, - "src": "58835:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4295, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "58835:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58815:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4300, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4299, - "name": "limit", - "nodeType": "VariableDeclaration", - "scope": 4318, - "src": "58875:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4298, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "58875:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58874:12:8" - }, - "scope": 4606, - "src": "58783:227:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4383, - "nodeType": "Block", - "src": "59710:887:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4331, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "59844:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4332, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "59850:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4330, - "name": "updateAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4441, - "src": "59816:27:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" - } - }, - "id": 4333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59816:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4334, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "59866:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4329, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "59808:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59808:109:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4336, - "nodeType": "ExpressionStatement", - "src": "59808:109:8" - }, - { - "assignments": [ - 4338 - ], - "declarations": [ - { - "constant": false, - "id": 4338, - "name": "updatedAmount", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59924:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4337, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "59924:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4346, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4344, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4324, - "src": "59989:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4340, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "59970:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4341, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "59976:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4339, - "name": "getAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4471, - "src": "59945:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59945:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "59945:43:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59945:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "59924:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4349, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "60126:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4350, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "60132:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4348, - "name": "getAccountSpendingLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4318, - "src": "60102:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60102:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4352, - "name": "updatedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60144:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "60102:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e742063616e6e6f742065786365656420697473206461696c79207370656e64206c696d69742e", - "id": 4354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60165:53:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", - "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" - }, - "value": "Error: Account cannot exceed its daily spend limit." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", - "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" - } - ], - "id": 4347, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "60087:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60087:132:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4356, - "nodeType": "ExpressionStatement", - "src": "60087:132:8" - }, - { - "assignments": [ - 4358 - ], - "declarations": [ - { - "constant": false, - "id": 4358, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "60289:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4357, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "60289:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4370, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", - "id": 4362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60329:25:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - "value": "account.spending.amount" - }, - { - "argumentTypes": null, - "id": 4363, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "60356:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4365, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "60390:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4366, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "60396:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4364, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4258, - "src": "60365:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60365:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4360, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "60312:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "60312:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60312:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4359, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "60302:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60302:104:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "60289:117:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4375, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4358, - "src": "60441:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4376, - "name": "updatedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60445:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4372, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "60420:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4373, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "60420:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "60420:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60420:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60467:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4371, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "60412:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60412:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4380, - "nodeType": "ExpressionStatement", - "src": "60412:162:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4381, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60588:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4328, - "id": 4382, - "nodeType": "Return", - "src": "60581:11:8" - } - ] - }, - "documentation": "@notice Set the account spending amount for the daily period\n@dev | Each account has it's own daily spending limit\n@dev | This transaction will throw if the new spending amount is greater than the limit\n@dev | This method is called in the `transfer()` and `transferFrom()` methods\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param amount Set the amount spent for the daily period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4384, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4325, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4320, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59629:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4319, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "59629:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4322, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59648:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4321, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "59648:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4324, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59665:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4323, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "59665:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59628:49:8" - }, - "payable": false, - "returnParameters": { - "id": 4328, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4327, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59696:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4326, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "59696:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59695:14:8" - }, - "scope": 4606, - "src": "59595:1002:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4440, - "nodeType": "Block", - "src": "61157:398:8", - "statements": [ - { - "assignments": [ - 4394 - ], - "declarations": [ - { - "constant": false, - "id": 4394, - "name": "begDate", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61163:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4393, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "61163:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4399, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4396, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4386, - "src": "61203:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4397, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4388, - "src": "61209:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4395, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4258, - "src": "61178:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61178:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "61163:54:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4400, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4394, - "src": "61227:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 4401, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5242, - "src": "61237:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "61227:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 4438, - "nodeType": "Block", - "src": "61274:277:8", - "statements": [ - { - "assignments": [ - 4407 - ], - "declarations": [ - { - "constant": false, - "id": 4407, - "name": "duration", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61282:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4406, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "61282:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4409, - "initialValue": { - "argumentTypes": null, - "hexValue": "3836343030", - "id": 4408, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61298:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "86400" - }, - "nodeType": "VariableDeclarationStatement", - "src": "61282:21:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4412, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4386, - "src": "61379:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4413, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4388, - "src": "61385:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4429, - "name": "duration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4407, - "src": "61452:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 4425, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61444:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4422, - "name": "duration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4407, - "src": "61430:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4418, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4394, - "src": "61416:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4416, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5242, - "src": "61408:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "61408:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61408:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4420, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "61407:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "61407:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61407:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "61407:36:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61407:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4427, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "61406:41:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "61406:45:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61406:55:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4414, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4394, - "src": "61394:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "61394:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61394:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 4411, - "name": "setAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4232, - "src": "61354:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 4432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61354:109:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61473:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4410, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "61337:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61337:187:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4435, - "nodeType": "ExpressionStatement", - "src": "61337:187:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4436, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61540:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4392, - "id": 4437, - "nodeType": "Return", - "src": "61533:11:8" - } - ] - }, - "id": 4439, - "nodeType": "IfStatement", - "src": "61223:328:8", - "trueBody": { - "id": 4405, - "nodeType": "Block", - "src": "61242:26:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4403, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61257:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4392, - "id": 4404, - "nodeType": "Return", - "src": "61250:11:8" - } - ] - } - } - ] - }, - "documentation": "@notice Low-level API to ensure the account spending period is always current\n@dev | This method is internally called by `setAccountSpendingAmount()` to ensure\nspending period is always the most current daily period.\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4441, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "updateAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4389, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4386, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61089:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4385, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "61089:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4388, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61108:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61108:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61088:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4392, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4391, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61143:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4390, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "61143:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61142:14:8" - }, - "scope": 4606, - "src": "61052:503:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4470, - "nodeType": "Block", - "src": "62019:165:8", - "statements": [ - { - "assignments": [ - 4451 - ], - "declarations": [ - { - "constant": false, - "id": 4451, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4471, - "src": "62025:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4450, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "62025:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4463, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", - "id": 4455, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "62065:25:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - "value": "account.spending.amount" - }, - { - "argumentTypes": null, - "id": 4456, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4445, - "src": "62092:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4458, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4443, - "src": "62126:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4459, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4445, - "src": "62132:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4457, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4258, - "src": "62101:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62101:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4453, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "62048:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4454, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "62048:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62048:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4452, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "62038:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62038:104:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "62025:117:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4467, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4451, - "src": "62176:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4464, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4443, - "src": "62155:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4465, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "62155:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "62155:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62155:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4449, - "id": 4469, - "nodeType": "Return", - "src": "62148:31:8" - } - ] - }, - "documentation": "@notice Return the amount spent during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount spent by the account during the current period\"}", - "id": 4471, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4446, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4443, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4471, - "src": "61947:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4442, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "61947:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4445, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4471, - "src": "61966:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4444, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61966:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61946:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4449, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4448, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4471, - "src": "62006:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4447, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "62006:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62005:13:8" - }, - "scope": 4606, - "src": "61913:271:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4491, - "nodeType": "Block", - "src": "62667:101:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4486, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4473, - "src": "62748:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4487, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4475, - "src": "62754:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4485, - "name": "getAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4471, - "src": "62723:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62723:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4481, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4473, - "src": "62704:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4482, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4475, - "src": "62710:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4480, - "name": "getAccountSpendingLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4318, - "src": "62680:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62680:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "62680:42:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62680:83:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4479, - "id": 4490, - "nodeType": "Return", - "src": "62673:90:8" - } - ] - }, - "documentation": "@notice Return the amount remaining during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}", - "id": 4492, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingRemaining", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4476, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4473, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4492, - "src": "62587:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4472, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "62587:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4475, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4492, - "src": "62606:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4474, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "62606:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62586:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4479, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4478, - "name": "remainingLimit", - "nodeType": "VariableDeclaration", - "scope": 4492, - "src": "62646:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4477, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "62646:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62645:21:8" - }, - "scope": 4606, - "src": "62550:218:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4525, - "nodeType": "Block", - "src": "63361:207:8", - "statements": [ - { - "assignments": [ - 4504 - ], - "declarations": [ - { - "constant": false, - "id": 4504, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63367:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4503, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "63367:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4512, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66782e7573642e72617465", - "id": 4508, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63407:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - "value": "fx.usd.rate" - }, - { - "argumentTypes": null, - "id": 4509, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4496, - "src": "63422:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4506, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "63390:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4507, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "63390:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63390:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4505, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "63380:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63380:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "63367:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4517, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4504, - "src": "63474:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4518, - "name": "bpsRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4498, - "src": "63478:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4514, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4494, - "src": "63453:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4515, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "63453:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "63453:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63453:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4520, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63494:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4513, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "63438:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63438:107:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4522, - "nodeType": "ExpressionStatement", - "src": "63438:107:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4523, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63559:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4502, - "id": 4524, - "nodeType": "Return", - "src": "63552:11:8" - } - ] - }, - "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@return { \"success\": \"Returns true if successfully called from another contract\"}", - "id": 4526, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFxUSDBPSRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4499, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4494, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63279:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4493, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "63279:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4496, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63298:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4495, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "63298:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4498, - "name": "bpsRate", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63315:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4497, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "63315:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63278:50:8" - }, - "payable": false, - "returnParameters": { - "id": 4502, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4501, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63347:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4500, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "63347:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63346:14:8" - }, - "scope": 4606, - "src": "63254:314:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4551, - "nodeType": "Block", - "src": "63974:113:8", - "statements": [ - { - "assignments": [ - 4536 - ], - "declarations": [ - { - "constant": false, - "id": 4536, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4552, - "src": "63980:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4535, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "63980:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4544, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66782e7573642e72617465", - "id": 4540, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64020:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - "value": "fx.usd.rate" - }, - { - "argumentTypes": null, - "id": 4541, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4530, - "src": "64035:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4538, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "64003:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "64003:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64003:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4537, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "63993:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63993:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "63980:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4548, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4536, - "src": "64079:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4545, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4528, - "src": "64058:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4546, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "64058:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "64058:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64058:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4534, - "id": 4550, - "nodeType": "Return", - "src": "64051:31:8" - } - ] - }, - "documentation": "@notice Return the foreign currency USD exchanged amount in basis points\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", - "id": 4552, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFxUSDBPSRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4531, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4528, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4552, - "src": "63901:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4527, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "63901:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4530, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4552, - "src": "63920:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4529, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "63920:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63900:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4534, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4533, - "name": "bpsRate", - "nodeType": "VariableDeclaration", - "scope": 4552, - "src": "63960:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4532, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "63960:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63959:14:8" - }, - "scope": 4606, - "src": "63876:211:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4604, - "nodeType": "Block", - "src": "64556:330:8", - "statements": [ - { - "assignments": [ - 4564 - ], - "declarations": [ - { - "constant": false, - "id": 4564, - "name": "usdDecimals", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64562:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4563, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64562:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4569, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4566, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4554, - "src": "64598:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "hexValue": "55534478", - "id": 4567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64604:6:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", - "typeString": "literal_string \"USDx\"" - }, - "value": "USDx" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", - "typeString": "literal_string \"USDx\"" - } - ], - "id": 4565, - "name": "getTokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2496, - "src": "64581:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64581:30:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64562:49:8" - }, - { - "assignments": [ - 4571 - ], - "declarations": [ - { - "constant": false, - "id": 4571, - "name": "fxDecimals", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64617:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4570, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64617:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4576, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4573, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4554, - "src": "64652:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4574, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4556, - "src": "64658:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4572, - "name": "getTokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2496, - "src": "64635:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64635:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64617:50:8" - }, - { - "assignments": [ - 4578 - ], - "declarations": [ - { - "constant": false, - "id": 4578, - "name": "usdAmount", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64741:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4577, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64741:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4601, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 4597, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64844:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "id": 4598, - "name": "fxDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4571, - "src": "64848:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "64844:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 4591, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64822:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "id": 4592, - "name": "usdDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4564, - "src": "64826:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "64822:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3130303030", - "id": 4587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64810:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - }, - "value": "10000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4582, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4554, - "src": "64789:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4583, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4556, - "src": "64795:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4581, - "name": "getFxUSDBPSRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4552, - "src": "64773:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64773:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4579, - "name": "fxAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4558, - "src": "64760:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "64760:12:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64760:45:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "64760:49:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64760:56:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4589, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "64759:58:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "64759:62:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64759:79:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4595, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "64758:81:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "64758:85:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64758:101:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64741:118:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 4602, - "name": "usdAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4578, - "src": "64872:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4562, - "id": 4603, - "nodeType": "Return", - "src": "64865:16:8" - } - ] - }, - "documentation": "@notice Return the foreign currency USD exchanged amount\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"amount\" : \"Returns the foreign currency amount in USD\"}", - "id": 4605, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFxUSDAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4559, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4554, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64469:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4553, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "64469:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4556, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64488:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4555, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "64488:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4558, - "name": "fxAmount", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64505:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4557, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64505:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "64468:51:8" - }, - "payable": false, - "returnParameters": { - "id": 4562, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4561, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64543:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4560, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64543:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "64542:13:8" - }, - "scope": 4606, - "src": "64445:441:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4607, - "src": "898:63992:8" - } - ], - "src": "0:64891:8" - }, - "legacyAST": { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOLib.sol", - "exportedSymbols": { - "TokenIOLib": [ - 4606 - ] - }, - "id": 4607, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1622, - "literals": [ - "solidity", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:23:8" - }, - { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/SafeMath.sol", - "file": "./SafeMath.sol", - "id": 1623, - "nodeType": "ImportDirective", - "scope": 4607, - "sourceUnit": 286, - "src": "25:24:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/ryan/Projects/TokenInc/tokeninc-smart-contracts/contracts/TokenIOStorage.sol", - "file": "./TokenIOStorage.sol", - "id": 1624, - "nodeType": "ImportDirective", - "scope": 4607, - "sourceUnit": 5226, - "src": "50:30:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "COPYRIGHT 2018 Token, Inc.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n@title TokenIOLib\n@author Ryan Tate , Sean Pollock \n@notice This library proxies the TokenIOStorage contract for the interface contract,\nallowing the library and the interfaces to remain stateless, and share a universally\navailable storage contract between interfaces.", - "fullyImplemented": true, - "id": 4606, - "linearizedBaseContracts": [ - 4606 - ], - "name": "TokenIOLib", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 1627, - "libraryName": { - "contractScope": null, - "id": 1625, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 285, - "src": "1018:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$285", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "1012:24:8", - "typeName": { - "id": 1626, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1031:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "canonicalName": "TokenIOLib.Data", - "id": 1630, - "members": [ - { - "constant": false, - "id": 1629, - "name": "Storage", - "nodeType": "VariableDeclaration", - "scope": 1630, - "src": "1132:22:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - }, - "typeName": { - "contractScope": null, - "id": 1628, - "name": "TokenIOStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5225, - "src": "1132:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Data", - "nodeType": "StructDefinition", - "scope": 4606, - "src": "1114:45:8", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice Not using `Log` prefix for events to be consistent with ERC20 named events;", - "id": 1638, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1637, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1632, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1638, - "src": "1268:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1631, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1268:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1634, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1638, - "src": "1291:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1633, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1291:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1636, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1638, - "src": "1316:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1635, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1316:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1267:61:8" - }, - "src": "1253:76:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1648, - "name": "Deposit", - "nodeType": "EventDefinition", - "parameters": { - "id": 1647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1640, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1648, - "src": "1346:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1639, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1346:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1642, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1648, - "src": "1363:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1641, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1363:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1644, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1648, - "src": "1388:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1643, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1388:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1646, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1648, - "src": "1401:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1645, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1401:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1345:74:8" - }, - "src": "1332:88:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1658, - "name": "Withdraw", - "nodeType": "EventDefinition", - "parameters": { - "id": 1657, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1650, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1658, - "src": "1438:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1649, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1438:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1652, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1658, - "src": "1455:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1651, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1455:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1654, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1658, - "src": "1480:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1653, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1480:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1656, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1658, - "src": "1493:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1655, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1493:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1437:74:8" - }, - "src": "1423:89:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1670, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 1669, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1660, - "indexed": false, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1530:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1659, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1530:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1662, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1547:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1661, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1547:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1664, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1569:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1663, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1569:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1666, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1589:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1665, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1589:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1668, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 1670, - "src": "1602:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1667, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1602:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1529:84:8" - }, - "src": "1515:99:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1678, - "name": "KYCApproval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1677, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1672, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1678, - "src": "1635:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1671, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1635:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1674, - "indexed": false, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1678, - "src": "1660:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1673, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1660:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1676, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1678, - "src": "1673:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1675, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1673:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1634:57:8" - }, - "src": "1617:75:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1686, - "name": "AccountStatus", - "nodeType": "EventDefinition", - "parameters": { - "id": 1685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1680, - "indexed": true, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1715:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1679, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1715:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1682, - "indexed": false, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1740:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1681, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1740:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1684, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1686, - "src": "1753:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1683, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1753:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1714:57:8" - }, - "src": "1695:77:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1700, - "name": "FxSwap", - "nodeType": "EventDefinition", - "parameters": { - "id": 1699, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1688, - "indexed": false, - "name": "tokenASymbol", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1788:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1687, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1788:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1690, - "indexed": false, - "name": "tokenBSymbol", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1808:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1689, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1808:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1692, - "indexed": false, - "name": "tokenAValue", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1828:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1691, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1828:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1694, - "indexed": false, - "name": "tokenBValue", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1845:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1693, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1845:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1696, - "indexed": false, - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1863:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1695, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1863:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1698, - "indexed": false, - "name": "transactionHash", - "nodeType": "VariableDeclaration", - "scope": 1700, - "src": "1880:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1697, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1880:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1787:117:8" - }, - "src": "1775:130:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1706, - "name": "AccountForward", - "nodeType": "EventDefinition", - "parameters": { - "id": 1705, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1702, - "indexed": true, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 1706, - "src": "1929:31:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1929:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1704, - "indexed": true, - "name": "forwardedAccount", - "nodeType": "VariableDeclaration", - "scope": 1706, - "src": "1962:32:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1703, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1962:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1928:67:8" - }, - "src": "1908:88:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 1712, - "name": "NewAuthority", - "nodeType": "EventDefinition", - "parameters": { - "id": 1711, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1708, - "indexed": true, - "name": "authority", - "nodeType": "VariableDeclaration", - "scope": 1712, - "src": "2018:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1707, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2018:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1710, - "indexed": false, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 1712, - "src": "2045:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1709, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2045:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2017:46:8" - }, - "src": "1999:65:8" - }, - { - "body": { - "id": 1745, - "nodeType": "Block", - "src": "2554:275:8", - "statements": [ - { - "assignments": [ - 1722 - ], - "declarations": [ - { - "constant": false, - "id": 1722, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1746, - "src": "2560:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1721, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2560:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1732, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d65", - "id": 1726, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2600:12:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - "value": "token.name" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1728, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "2622:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2614:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2614:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1724, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "2583:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1725, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2583:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2583:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1723, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "2573:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2573:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2560:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1737, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1722, - "src": "2673:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1738, - "name": "tokenName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1716, - "src": "2677:9:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1734, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1714, - "src": "2650:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1735, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "2650:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "2650:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2650:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1740, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2695:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1733, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "2635:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2635:172:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1742, - "nodeType": "ExpressionStatement", - "src": "2635:172:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2820:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1720, - "id": 1744, - "nodeType": "Return", - "src": "2813:11:8" - } - ] - }, - "documentation": "@notice Set the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenName Name of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1746, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1717, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1714, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1746, - "src": "2485:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1713, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "2485:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1716, - "name": "tokenName", - "nodeType": "VariableDeclaration", - "scope": 1746, - "src": "2504:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1715, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2504:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2484:37:8" - }, - "payable": false, - "returnParameters": { - "id": 1720, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1719, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1746, - "src": "2540:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1718, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2540:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2539:14:8" - }, - "scope": 4606, - "src": "2463:366:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1779, - "nodeType": "Block", - "src": "3329:279:8", - "statements": [ - { - "assignments": [ - 1756 - ], - "declarations": [ - { - "constant": false, - "id": 1756, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1780, - "src": "3335:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1755, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3335:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1766, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e73796d626f6c", - "id": 1760, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3375:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - "value": "token.symbol" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1762, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "3399:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1761, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3391:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3391:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1758, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "3358:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1759, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3358:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3358:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1757, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "3348:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3348:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3335:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1771, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1756, - "src": "3450:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1772, - "name": "tokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1750, - "src": "3454:11:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1768, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1748, - "src": "3427:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1769, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "3427:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "3427:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3427:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1774, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3474:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1767, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "3412:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3412:174:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1776, - "nodeType": "ExpressionStatement", - "src": "3412:174:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3599:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1754, - "id": 1778, - "nodeType": "Return", - "src": "3592:11:8" - } - ] - }, - "documentation": "@notice Set the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenSymbol Symbol of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1780, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenSymbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1751, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1748, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1780, - "src": "3258:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1747, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "3258:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1750, - "name": "tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 1780, - "src": "3277:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1749, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3277:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3257:39:8" - }, - "payable": false, - "returnParameters": { - "id": 1754, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1753, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1780, - "src": "3315:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1752, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3315:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3314:14:8" - }, - "scope": 4606, - "src": "3234:374:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1813, - "nodeType": "Block", - "src": "4120:273:8", - "statements": [ - { - "assignments": [ - 1790 - ], - "declarations": [ - { - "constant": false, - "id": 1790, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1814, - "src": "4126:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1789, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4126:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1800, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e746c61", - "id": 1794, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4166:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - "value": "token.tla" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1796, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "4187:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4179:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4179:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1792, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "4149:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1793, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4149:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4149:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1791, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "4139:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4139:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4126:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1805, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1790, - "src": "4238:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1806, - "name": "tokenTLA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1784, - "src": "4242:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1802, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1782, - "src": "4215:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1803, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "4215:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "4215:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4215:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4259:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1801, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "4200:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4200:171:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1810, - "nodeType": "ExpressionStatement", - "src": "4200:171:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1811, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4384:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1788, - "id": 1812, - "nodeType": "Return", - "src": "4377:11:8" - } - ] - }, - "documentation": "@notice Set the token three letter abreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenTLA TLA of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1814, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenTLA", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1785, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1782, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1814, - "src": "4052:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1781, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "4052:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1784, - "name": "tokenTLA", - "nodeType": "VariableDeclaration", - "scope": 1814, - "src": "4071:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1783, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4071:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4051:36:8" - }, - "payable": false, - "returnParameters": { - "id": 1788, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1787, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1814, - "src": "4106:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1786, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4106:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4105:14:8" - }, - "scope": 4606, - "src": "4031:362:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1847, - "nodeType": "Block", - "src": "4942:281:8", - "statements": [ - { - "assignments": [ - 1824 - ], - "declarations": [ - { - "constant": false, - "id": 1824, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1848, - "src": "4948:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1823, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4948:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1834, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e76657273696f6e", - "id": 1828, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4988:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - "value": "token.version" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1830, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "5013:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5005:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5005:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1826, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "4971:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1827, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4971:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4971:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1825, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "4961:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4961:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4948:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1839, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1824, - "src": "5064:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1840, - "name": "tokenVersion", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1818, - "src": "5068:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1836, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1816, - "src": "5041:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1837, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "5041:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "5041:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 1841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5041:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5089:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1835, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "5026:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5026:175:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1844, - "nodeType": "ExpressionStatement", - "src": "5026:175:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1845, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5214:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1822, - "id": 1846, - "nodeType": "Return", - "src": "5207:11:8" - } - ] - }, - "documentation": "@notice Set the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param tokenVersion Semantic (vMAJOR.MINOR.PATCH | e.g. v0.1.0) version of the token contract\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1848, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenVersion", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1819, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1816, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1848, - "src": "4870:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1815, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "4870:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1818, - "name": "tokenVersion", - "nodeType": "VariableDeclaration", - "scope": 1848, - "src": "4889:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1817, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4889:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4869:40:8" - }, - "payable": false, - "returnParameters": { - "id": 1822, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1821, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1848, - "src": "4928:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1820, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4928:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4927:14:8" - }, - "scope": 4606, - "src": "4845:378:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1881, - "nodeType": "Block", - "src": "6051:276:8", - "statements": [ - { - "assignments": [ - 1860 - ], - "declarations": [ - { - "constant": false, - "id": 1860, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "6057:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1859, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6057:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1868, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e646563696d616c73", - "id": 1864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6097:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - "value": "token.decimals" - }, - { - "argumentTypes": null, - "id": 1865, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1852, - "src": "6115:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1862, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "6080:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6080:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1866, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6080:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1861, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "6070:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6070:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6057:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1873, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1860, - "src": "6167:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1874, - "name": "tokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1854, - "src": "6171:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1870, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1850, - "src": "6146:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1871, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "6146:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "6146:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6146:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6193:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1869, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "6131:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6131:174:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1878, - "nodeType": "ExpressionStatement", - "src": "6131:174:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6318:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1858, - "id": 1880, - "nodeType": "Return", - "src": "6311:11:8" - } - ] - }, - "documentation": "@notice Set the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@dev This method is not set to the address of the contract, rather is maped to currency\n@dev To derive decimal value, divide amount by 10^decimal representation (e.g. 10132 / 10**2 == 101.32)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param tokenDecimals Decimal representation of the token contract unit amount\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1882, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenDecimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1855, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1850, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "5963:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1849, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "5963:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1852, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "5982:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1851, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5982:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1854, - "name": "tokenDecimals", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "5999:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1853, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5999:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5962:56:8" - }, - "payable": false, - "returnParameters": { - "id": 1858, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1857, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1882, - "src": "6037:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1856, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6037:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6036:14:8" - }, - "scope": 4606, - "src": "5937:390:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1915, - "nodeType": "Block", - "src": "6887:267:8", - "statements": [ - { - "assignments": [ - 1892 - ], - "declarations": [ - { - "constant": false, - "id": 1892, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1916, - "src": "6893:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1891, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6893:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1902, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 1896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6933:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1898, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "6952:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1897, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6944:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6944:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1894, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "6916:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1895, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6916:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6916:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1893, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "6906:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6906:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6893:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1907, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1892, - "src": "7001:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1908, - "name": "feeBPS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1886, - "src": "7005:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1904, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1884, - "src": "6980:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1905, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "6980:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "6980:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6980:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1910, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7020:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1903, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "6965:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6965:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1912, - "nodeType": "ExpressionStatement", - "src": "6965:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7145:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1890, - "id": 1914, - "nodeType": "Return", - "src": "7138:11:8" - } - ] - }, - "documentation": "@notice Set basis point fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeBPS Basis points fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1916, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeBPS", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1887, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1884, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1916, - "src": "6823:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1883, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "6823:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1886, - "name": "feeBPS", - "nodeType": "VariableDeclaration", - "scope": 1916, - "src": "6842:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1885, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6842:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6822:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1889, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1916, - "src": "6873:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1888, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6873:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6872:14:8" - }, - "scope": 4606, - "src": "6804:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1949, - "nodeType": "Block", - "src": "7705:267:8", - "statements": [ - { - "assignments": [ - 1926 - ], - "declarations": [ - { - "constant": false, - "id": 1926, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1950, - "src": "7711:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7711:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1936, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 1930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7751:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1932, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "7770:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1931, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7762:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7762:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1928, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "7734:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7734:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7734:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1927, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "7724:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7724:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7711:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1941, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1926, - "src": "7819:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1942, - "name": "feeMin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1920, - "src": "7823:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1938, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1918, - "src": "7798:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1939, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "7798:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "7798:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7798:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7838:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "7783:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7783:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1946, - "nodeType": "ExpressionStatement", - "src": "7783:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1947, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7963:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1924, - "id": 1948, - "nodeType": "Return", - "src": "7956:11:8" - } - ] - }, - "documentation": "@notice Set minimum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMin Minimum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1950, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1921, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1918, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1950, - "src": "7641:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1917, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "7641:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1920, - "name": "feeMin", - "nodeType": "VariableDeclaration", - "scope": 1950, - "src": "7660:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1919, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7660:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7640:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1924, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1923, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1950, - "src": "7691:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1922, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7691:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7690:14:8" - }, - "scope": 4606, - "src": "7622:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1983, - "nodeType": "Block", - "src": "8523:267:8", - "statements": [ - { - "assignments": [ - 1960 - ], - "declarations": [ - { - "constant": false, - "id": 1960, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 1984, - "src": "8529:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1959, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8529:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1970, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 1964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8569:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1966, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "8588:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8580:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8580:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1962, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "8552:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8552:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8552:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1961, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "8542:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8542:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8529:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1975, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1960, - "src": "8637:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1976, - "name": "feeMax", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1954, - "src": "8641:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1972, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1952, - "src": "8616:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 1973, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "8616:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 1974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "8616:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 1977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8616:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 1978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8656:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 1971, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "8601:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8601:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1980, - "nodeType": "ExpressionStatement", - "src": "8601:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8781:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1958, - "id": 1982, - "nodeType": "Return", - "src": "8774:11:8" - } - ] - }, - "documentation": "@notice Set maximum fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMax Maximum fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 1984, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMax", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1952, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 1984, - "src": "8459:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1951, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "8459:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1954, - "name": "feeMax", - "nodeType": "VariableDeclaration", - "scope": 1984, - "src": "8478:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1953, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8478:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8458:32:8" - }, - "payable": false, - "returnParameters": { - "id": 1958, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1957, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1984, - "src": "8509:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1956, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8509:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8508:14:8" - }, - "scope": 4606, - "src": "8440:350:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2017, - "nodeType": "Block", - "src": "9338:269:8", - "statements": [ - { - "assignments": [ - 1994 - ], - "declarations": [ - { - "constant": false, - "id": 1994, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2018, - "src": "9344:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1993, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9344:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2004, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 1998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9384:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2000, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "9404:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 1999, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9396:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9396:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1996, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "9367:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9367:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9367:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1995, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "9357:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9357:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9344:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2009, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1994, - "src": "9453:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2010, - "name": "feeFlat", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1988, - "src": "9457:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2006, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1986, - "src": "9432:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2007, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "9432:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "9432:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 2011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9432:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9473:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2005, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "9417:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9417:168:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2014, - "nodeType": "ExpressionStatement", - "src": "9417:168:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2015, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9598:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1992, - "id": 2016, - "nodeType": "Return", - "src": "9591:11:8" - } - ] - }, - "documentation": "@notice Set flat fee for contract interface\n@dev Transaction fees can be set by the TokenIOFeeContract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeFlat Flat fee for interface contract transactions\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2018, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeFlat", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1986, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2018, - "src": "9273:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 1985, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "9273:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1988, - "name": "feeFlat", - "nodeType": "VariableDeclaration", - "scope": 2018, - "src": "9292:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1987, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9292:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9272:33:8" - }, - "payable": false, - "returnParameters": { - "id": 1992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1991, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2018, - "src": "9324:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1990, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9324:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9323:14:8" - }, - "scope": 4606, - "src": "9253:354:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2051, - "nodeType": "Block", - "src": "10188:268:8", - "statements": [ - { - "assignments": [ - 2028 - ], - "declarations": [ - { - "constant": false, - "id": 2028, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "10194:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2027, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10194:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2038, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d7367", - "id": 2032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10234:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - "value": "fee.msg" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2034, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "10253:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 2033, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10245:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10245:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2030, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "10217:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2031, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10217:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10217:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2029, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "10207:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10207:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10194:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2043, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2028, - "src": "10303:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2044, - "name": "feeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2022, - "src": "10307:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2040, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2020, - "src": "10281:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "10281:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBytes", - "nodeType": "MemberAccess", - "referencedDeclaration": 5010, - "src": "10281:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,bytes memory) external returns (bool)" - } - }, - "id": 2045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10281:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2046, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10322:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2039, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "10266:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10266:168:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2048, - "nodeType": "ExpressionStatement", - "src": "10266:168:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2049, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10447:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2026, - "id": 2050, - "nodeType": "Return", - "src": "10440:11:8" - } - ] - }, - "documentation": "@notice Set fee message for contract interface\n@dev Default fee messages can be set by the TokenIOFeeContract (e.g. \"tx_fees\")\n@dev Fee messages vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param feeMsg Fee message included in a transaction with fees\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2052, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeMsg", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2023, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2020, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "10123:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2019, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "10123:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2022, - "name": "feeMsg", - "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "10142:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2021, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10142:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10122:33:8" - }, - "payable": false, - "returnParameters": { - "id": 2026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2025, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "10174:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2024, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10174:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10173:14:8" - }, - "scope": 4606, - "src": "10104:352:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2085, - "nodeType": "Block", - "src": "11121:279:8", - "statements": [ - { - "assignments": [ - 2062 - ], - "declarations": [ - { - "constant": false, - "id": 2062, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2086, - "src": "11127:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2061, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11127:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2072, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6163636f756e74", - "id": 2066, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11167:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - "value": "fee.account" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2068, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "11190:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 2067, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11182:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11182:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2064, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "11150:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11150:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11150:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2063, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "11140:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11140:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11127:70:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2077, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2062, - "src": "11242:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2078, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2056, - "src": "11246:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2074, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2054, - "src": "11218:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2075, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "11218:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4950, - "src": "11218:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11218:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11266:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2073, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "11203:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11203:175:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2082, - "nodeType": "ExpressionStatement", - "src": "11203:175:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11391:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2060, - "id": 2084, - "nodeType": "Return", - "src": "11384:11:8" - } - ] - }, - "documentation": "@notice Set fee contract for a contract interface\n@dev feeContract must be a TokenIOFeeContract storage approved contract\n@dev Fees vary by contract interface specified `feeContract`\n@dev | This method has an `internal` view\n@dev | This must be called directly from the interface contract\n@param self Internal storage proxying TokenIOStorage contract\n@param feeContract Set the fee contract for `this` contract address interface\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2086, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2057, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2054, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2086, - "src": "11049:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2053, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "11049:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2056, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 2086, - "src": "11068:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2055, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11068:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11048:40:8" - }, - "payable": false, - "returnParameters": { - "id": 2060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2059, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2086, - "src": "11107:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2058, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11107:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11106:14:8" - }, - "scope": 4606, - "src": "11025:375:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2119, - "nodeType": "Block", - "src": "12035:280:8", - "statements": [ - { - "assignments": [ - 2096 - ], - "declarations": [ - { - "constant": false, - "id": 2096, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2120, - "src": "12041:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2095, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12041:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2104, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d657370616365", - "id": 2100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12081:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - "value": "token.namespace" - }, - { - "argumentTypes": null, - "id": 2101, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2090, - "src": "12100:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2098, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "12064:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12064:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12064:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2097, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "12054:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12054:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12041:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2109, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2096, - "src": "12155:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2111, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "12167:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 2110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12159:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12159:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2106, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2088, - "src": "12131:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2107, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "12131:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4950, - "src": "12131:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12131:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12181:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2105, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "12116:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12116:177:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2116, - "nodeType": "ExpressionStatement", - "src": "12116:177:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2117, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12306:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2094, - "id": 2118, - "nodeType": "Return", - "src": "12299:11:8" - } - ] - }, - "documentation": "@notice Set contract interface associated with a given TokenIO currency symbol (e.g. USDx)\n@dev | This should only be called once from a token interface contract;\n@dev | This method has an `internal` view\n@dev | This method is experimental and may be deprecated/refactored\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2120, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenNameSpace", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2091, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2088, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2120, - "src": "11967:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2087, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "11967:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2090, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2120, - "src": "11986:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2089, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11986:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11966:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2094, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2093, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2120, - "src": "12021:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2092, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12021:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12020:14:8" - }, - "scope": 4606, - "src": "11940:375:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2164, - "nodeType": "Block", - "src": "13113:435:8", - "statements": [ - { - "assignments": [ - 2134 - ], - "declarations": [ - { - "constant": false, - "id": 2134, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13121:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2133, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13121:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2145, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e6b7963", - "id": 2138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13161:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - "value": "account.kyc" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2140, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2122, - "src": "13196:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2141, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2124, - "src": "13202:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2139, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "13176:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13176:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2136, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "13144:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13144:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13144:67:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2135, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "13134:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13134:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13121:91:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2150, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2134, - "src": "13258:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2151, - "name": "isApproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2126, - "src": "13262:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2147, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2122, - "src": "13237:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2148, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "13237:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "13237:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 2152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13237:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13283:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2146, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "13220:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13220:177:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2155, - "nodeType": "ExpressionStatement", - "src": "13220:177:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2157, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2124, - "src": "13492:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2158, - "name": "isApproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2126, - "src": "13501:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2159, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2128, - "src": "13513:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2156, - "name": "KYCApproval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1678, - "src": "13480:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,bool,string memory)" - } - }, - "id": 2160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13480:44:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2161, - "nodeType": "EmitStatement", - "src": "13475:49:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13539:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2132, - "id": 2163, - "nodeType": "Return", - "src": "13532:11:8" - } - ] - }, - "documentation": "@notice Set the KYC approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be KYC'd to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isApproved Boolean (true/false) KYC approval status for a given account\n@param issuerFirm Firm name for issuing KYC approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2165, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setKYCApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2129, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2122, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13009:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2121, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "13009:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2124, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13028:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13028:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2126, - "name": "isApproved", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13045:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2125, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13045:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2128, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13062:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2127, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "13062:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13008:72:8" - }, - "payable": false, - "returnParameters": { - "id": 2132, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2131, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2165, - "src": "13099:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2130, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13099:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13098:14:8" - }, - "scope": 4606, - "src": "12985:563:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2209, - "nodeType": "Block", - "src": "14343:419:8", - "statements": [ - { - "assignments": [ - 2179 - ], - "declarations": [ - { - "constant": false, - "id": 2179, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14349:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2178, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14349:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2190, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e616c6c6f776564", - "id": 2183, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14389:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - "value": "account.allowed" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2185, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "14428:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2186, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2169, - "src": "14434:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2184, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "14408:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14408:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2181, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "14372:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14372:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14372:71:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2180, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "14362:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14362:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14349:95:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2195, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "14486:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2196, - "name": "isAllowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2171, - "src": "14490:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2192, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "14465:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2193, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "14465:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "14465:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 2197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14465:35:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14508:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2191, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "14450:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14450:170:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2200, - "nodeType": "ExpressionStatement", - "src": "14450:170:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2202, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2169, - "src": "14709:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2203, - "name": "isAllowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2171, - "src": "14718:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2204, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "14729:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2201, - "name": "AccountStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1686, - "src": "14695:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,bool,string memory)" - } - }, - "id": 2205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14695:45:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2206, - "nodeType": "EmitStatement", - "src": "14690:50:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14753:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2177, - "id": 2208, - "nodeType": "Return", - "src": "14746:11:8" - } - ] - }, - "documentation": "@notice Set the global approval status (true/false) for a given account\n@dev | This method has an `internal` view\n@dev | Every account must be permitted to be able to use transfer() & transferFrom() methods\n@dev | To gain approval for an account, register at https://tsm.token.io/sign-up\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param isAllowed Boolean (true/false) global status for a given account\n@param issuerFirm Firm name for issuing approval\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2210, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2167, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14240:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2166, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "14240:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2169, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14259:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2168, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14259:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2171, - "name": "isAllowed", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14276:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2170, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14276:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2173, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14292:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2172, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14292:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14239:71:8" - }, - "payable": false, - "returnParameters": { - "id": 2177, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2176, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2210, - "src": "14329:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2175, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14329:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14328:14:8" - }, - "scope": 4606, - "src": "14214:548:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2243, - "nodeType": "Block", - "src": "15647:289:8", - "statements": [ - { - "assignments": [ - 2222 - ], - "declarations": [ - { - "constant": false, - "id": 2222, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15653:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2221, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15653:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2230, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6d61737465722e6163636f756e74", - "id": 2226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15693:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - "value": "master.account" - }, - { - "argumentTypes": null, - "id": 2227, - "name": "forwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2216, - "src": "15711:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2224, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "15676:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2225, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15676:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15676:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2223, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "15666:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15666:63:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15653:76:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2235, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2222, - "src": "15774:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2236, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2214, - "src": "15778:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2232, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2212, - "src": "15750:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2233, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "15750:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4950, - "src": "15750:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15750:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15802:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2231, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "15735:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15735:179:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2240, - "nodeType": "ExpressionStatement", - "src": "15735:179:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15927:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2220, - "id": 2242, - "nodeType": "Return", - "src": "15920:11:8" - } - ] - }, - "documentation": "@notice Set a forwarded address for an account.\n@dev | This method has an `internal` view\n@dev | Forwarded accounts must be set by an authority in case of account recovery;\n@dev | Additionally, the original owner can set a forwarded account (e.g. add a new device, spouse, dependent, etc)\n@dev | All transactions will be logged under the same KYC information as the original account holder;\n@param self Internal storage proxying TokenIOStorage contract\n@param originalAccount Original registered Ethereum address of the account holder\n@param forwardedAccount Forwarded Ethereum address of the account holder\n@return {\"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2244, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setForwardedAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2217, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2212, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15545:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2211, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "15545:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2214, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15564:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2213, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15564:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2216, - "name": "forwardedAccount", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15589:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2215, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15589:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15544:70:8" - }, - "payable": false, - "returnParameters": { - "id": 2220, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2219, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2244, - "src": "15633:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2218, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15633:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15632:14:8" - }, - "scope": 4606, - "src": "15516:420:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2281, - "nodeType": "Block", - "src": "16515:242:8", - "statements": [ - { - "assignments": [ - 2254 - ], - "declarations": [ - { - "constant": false, - "id": 2254, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16521:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2253, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16521:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2262, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6d61737465722e6163636f756e74", - "id": 2258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16561:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - "value": "master.account" - }, - { - "argumentTypes": null, - "id": 2259, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2248, - "src": "16579:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8d6f4b2601892003973e4faa92196dd18c99aa60b5dd31dd693e09202ee3b1e2", - "typeString": "literal_string \"master.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2256, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "16544:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16544:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16544:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2255, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "16534:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16534:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16521:67:8" - }, - { - "assignments": [ - 2264 - ], - "declarations": [ - { - "constant": false, - "id": 2264, - "name": "originalAccount", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16594:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2263, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16594:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2270, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2268, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2254, - "src": "16644:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2265, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2246, - "src": "16620:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2266, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "16620:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5164, - "src": "16620:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16620:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16594:53:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2271, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2264, - "src": "16657:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2272, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16676:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "16657:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2279, - "nodeType": "Block", - "src": "16724:29:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2277, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2248, - "src": "16739:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2252, - "id": 2278, - "nodeType": "Return", - "src": "16732:14:8" - } - ] - }, - "id": 2280, - "nodeType": "IfStatement", - "src": "16653:100:8", - "trueBody": { - "id": 2276, - "nodeType": "Block", - "src": "16681:37:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2274, - "name": "originalAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2264, - "src": "16696:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2252, - "id": 2275, - "nodeType": "Return", - "src": "16689:22:8" - } - ] - } - } - ] - }, - "documentation": "@notice Get the original address for a forwarded account\n@dev | This method has an `internal` view\n@dev | Will return the registered account for the given forwarded account\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"registeredAccount\" : \"Will return the original account of a forwarded account or the account itself if no account found\"}", - "id": 2282, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getForwardedAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2249, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2246, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16429:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2245, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "16429:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2248, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16448:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16448:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16428:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2252, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2251, - "name": "registeredAccount", - "nodeType": "VariableDeclaration", - "scope": 2282, - "src": "16488:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2250, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16488:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16487:27:8" - }, - "scope": 4606, - "src": "16400:357:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2310, - "nodeType": "Block", - "src": "17256:143:8", - "statements": [ - { - "assignments": [ - 2292 - ], - "declarations": [ - { - "constant": false, - "id": 2292, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2311, - "src": "17264:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2291, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17264:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2303, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e6b7963", - "id": 2296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17304:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - "value": "account.kyc" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2298, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "17339:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2299, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2286, - "src": "17345:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2297, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "17319:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17319:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c97218530d18ae56646ec7f5dda91d03e4423f570f908fbaaef824eab8b6341f", - "typeString": "literal_string \"account.kyc\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2294, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "17287:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2295, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17287:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17287:67:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2293, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "17277:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17277:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17264:91:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2307, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "17391:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2304, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "17370:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2305, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "17370:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "17370:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 2308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17370:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2290, - "id": 2309, - "nodeType": "Return", - "src": "17363:31:8" - } - ] - }, - "documentation": "@notice Get KYC approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the KYC approval status for an account holder\" }", - "id": 2311, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getKYCApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2287, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2284, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2311, - "src": "17184:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2283, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "17184:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2286, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2311, - "src": "17203:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2285, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17203:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17183:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2289, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 2311, - "src": "17243:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2288, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17243:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17242:13:8" - }, - "scope": 4606, - "src": "17160:239:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2339, - "nodeType": "Block", - "src": "17906:143:8", - "statements": [ - { - "assignments": [ - 2321 - ], - "declarations": [ - { - "constant": false, - "id": 2321, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2340, - "src": "17912:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2320, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17912:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2332, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e616c6c6f776564", - "id": 2325, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17952:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - "value": "account.allowed" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2327, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2313, - "src": "17991:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2328, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2315, - "src": "17997:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2326, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "17971:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a549ce765a456b791519643c260661c45c069d936813597b53f62da9b13070a1", - "typeString": "literal_string \"account.allowed\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2323, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "17935:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2324, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17935:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17935:71:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2322, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "17925:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17925:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17912:95:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2336, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2321, - "src": "18041:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2333, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2313, - "src": "18020:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2334, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "18020:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "18020:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 2337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18020:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2319, - "id": 2338, - "nodeType": "Return", - "src": "18013:31:8" - } - ] - }, - "documentation": "@notice Get global approval status for the account holder\n@dev | This method has an `internal` view\n@dev | All forwarded accounts will use the original account's status\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@return { \"status\" : \"Returns the global approval status for an account holder\" }", - "id": 2340, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2316, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2313, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2340, - "src": "17834:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2312, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "17834:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2315, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2340, - "src": "17853:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2314, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17853:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17833:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2318, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 2340, - "src": "17893:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2317, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17893:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17892:13:8" - }, - "scope": 4606, - "src": "17808:241:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2365, - "nodeType": "Block", - "src": "18533:120:8", - "statements": [ - { - "assignments": [ - 2350 - ], - "declarations": [ - { - "constant": false, - "id": 2350, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2366, - "src": "18539:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2349, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "18539:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2358, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d657370616365", - "id": 2354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18579:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - "value": "token.namespace" - }, - { - "argumentTypes": null, - "id": 2355, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2344, - "src": "18598:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e6feee567e2c143eed1b67ee64d1232902a4f8c8aa8a0bfed37863dc2c0a6725", - "typeString": "literal_string \"token.namespace\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2352, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "18562:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2353, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18562:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18562:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2351, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "18552:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18552:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18539:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2362, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2350, - "src": "18645:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2359, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "18621:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2360, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "18621:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5164, - "src": "18621:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18621:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2348, - "id": 2364, - "nodeType": "Return", - "src": "18614:34:8" - } - ] - }, - "documentation": "@notice Get the contract interface address associated with token symbol\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"contractAddress\" : \"Returns the contract interface address for a symbol\" }", - "id": 2366, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenNameSpace", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2345, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2342, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2366, - "src": "18449:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2341, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "18449:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2344, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2366, - "src": "18468:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2343, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "18468:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18448:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2347, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2366, - "src": "18508:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2346, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18508:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18507:25:8" - }, - "scope": 4606, - "src": "18422:231:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2391, - "nodeType": "Block", - "src": "19151:121:8", - "statements": [ - { - "assignments": [ - 2376 - ], - "declarations": [ - { - "constant": false, - "id": 2376, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2392, - "src": "19157:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2375, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19157:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2384, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e6e616d65", - "id": 2380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19197:12:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - "value": "token.name" - }, - { - "argumentTypes": null, - "id": 2381, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2370, - "src": "19211:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_49f235d3d7f1d03b9855bdb1c6ce3afcf3ad0b9a06aed3248c2c6a977a8fd6f9", - "typeString": "literal_string \"token.name\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2378, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "19180:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19180:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19180:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2377, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "19170:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19170:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19157:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2388, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2376, - "src": "19264:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2385, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2368, - "src": "19241:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2386, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "19241:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "19241:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19241:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2374, - "id": 2390, - "nodeType": "Return", - "src": "19234:33:8" - } - ] - }, - "documentation": "@notice Get the token name for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenName\" : \"Name of the token contract\"}", - "id": 2392, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2371, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2368, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2392, - "src": "19066:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2367, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "19066:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2370, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2392, - "src": "19085:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2369, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19085:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19065:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2374, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2373, - "name": "tokenName", - "nodeType": "VariableDeclaration", - "scope": 2392, - "src": "19133:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2372, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "19133:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19132:18:8" - }, - "scope": 4606, - "src": "19044:228:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2417, - "nodeType": "Block", - "src": "19780:123:8", - "statements": [ - { - "assignments": [ - 2402 - ], - "declarations": [ - { - "constant": false, - "id": 2402, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2418, - "src": "19786:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2401, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19786:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2410, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e73796d626f6c", - "id": 2406, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19826:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - "value": "token.symbol" - }, - { - "argumentTypes": null, - "id": 2407, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2396, - "src": "19842:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3aaef4cf42280770797bb8c2fa849e82624efcd30f9e906d5f6dd933591b5a57", - "typeString": "literal_string \"token.symbol\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2404, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "19809:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2405, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19809:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19809:49:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2403, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "19799:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19799:60:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19786:73:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2414, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2402, - "src": "19895:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2411, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2394, - "src": "19872:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2412, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "19872:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "19872:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19872:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2400, - "id": 2416, - "nodeType": "Return", - "src": "19865:33:8" - } - ] - }, - "documentation": "@notice Get the token symbol for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenSymbol\" : \"Symbol of the token contract\"}", - "id": 2418, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenSymbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2397, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2394, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2418, - "src": "19693:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2393, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "19693:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2396, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2418, - "src": "19712:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2395, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19692:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2400, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2399, - "name": "tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 2418, - "src": "19760:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2398, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "19760:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19759:20:8" - }, - "scope": 4606, - "src": "19669:234:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2443, - "nodeType": "Block", - "src": "20424:120:8", - "statements": [ - { - "assignments": [ - 2428 - ], - "declarations": [ - { - "constant": false, - "id": 2428, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2444, - "src": "20430:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2427, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "20430:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2436, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e746c61", - "id": 2432, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20470:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - "value": "token.tla" - }, - { - "argumentTypes": null, - "id": 2433, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "20483:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b52a52b451c4f8ae055983604a22fb95e34de071dbad6ddb057133af803aed3", - "typeString": "literal_string \"token.tla\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2430, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "20453:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20453:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20453:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2429, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "20443:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20443:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20430:70:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2440, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2428, - "src": "20536:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2437, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2420, - "src": "20513:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2438, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "20513:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "20513:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20513:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2426, - "id": 2442, - "nodeType": "Return", - "src": "20506:33:8" - } - ] - }, - "documentation": "@notice Get the token Three letter abbreviation (TLA) for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenTLA\" : \"TLA of the token contract\"}", - "id": 2444, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenTLA", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2420, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2444, - "src": "20340:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2419, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "20340:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2422, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2444, - "src": "20359:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2421, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20359:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20339:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2426, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2425, - "name": "tokenTLA", - "nodeType": "VariableDeclaration", - "scope": 2444, - "src": "20407:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2424, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "20407:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20406:17:8" - }, - "scope": 4606, - "src": "20319:225:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2469, - "nodeType": "Block", - "src": "21053:124:8", - "statements": [ - { - "assignments": [ - 2454 - ], - "declarations": [ - { - "constant": false, - "id": 2454, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2470, - "src": "21059:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2453, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "21059:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2462, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e76657273696f6e", - "id": 2458, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21099:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - "value": "token.version" - }, - { - "argumentTypes": null, - "id": 2459, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2448, - "src": "21116:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1dfe4ac34114b35c1a003cee3e01c34dc645ef21e5342086d321d8b50643fba3", - "typeString": "literal_string \"token.version\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2456, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "21082:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2457, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21082:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21082:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2455, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "21072:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21072:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21059:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2466, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2454, - "src": "21169:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2463, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2446, - "src": "21146:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2464, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "21146:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "21146:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 2467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21146:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 2452, - "id": 2468, - "nodeType": "Return", - "src": "21139:33:8" - } - ] - }, - "documentation": "@notice Get the token version for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return {\"tokenVersion\" : \"Semantic version of the token contract\"}", - "id": 2470, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenVersion", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2449, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2446, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2470, - "src": "20978:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2445, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "20978:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2448, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2470, - "src": "20997:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2447, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20997:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20977:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2451, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2470, - "src": "21045:6:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2450, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "21045:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21044:8:8" - }, - "scope": 4606, - "src": "20953:224:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2495, - "nodeType": "Block", - "src": "21688:116:8", - "statements": [ - { - "assignments": [ - 2480 - ], - "declarations": [ - { - "constant": false, - "id": 2480, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2496, - "src": "21694:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2479, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "21694:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2488, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e646563696d616c73", - "id": 2484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21734:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - "value": "token.decimals" - }, - { - "argumentTypes": null, - "id": 2485, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2474, - "src": "21752:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_399fba30693a5e4e13916e0feeb384945e08c298c401127ee1b9fd706494238f", - "typeString": "literal_string \"token.decimals\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2482, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "21717:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21717:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21717:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2481, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "21707:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21707:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21694:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2492, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2480, - "src": "21796:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2489, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2472, - "src": "21775:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2490, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "21775:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "21775:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21775:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2478, - "id": 2494, - "nodeType": "Return", - "src": "21768:31:8" - } - ] - }, - "documentation": "@notice Get the token decimals for Token interfaces\n@dev This method must be set by the token interface's setParams() method\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return {\"tokenDecimals\" : \"Decimals of the token contract\"}", - "id": 2496, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenDecimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2472, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2496, - "src": "21609:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2471, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "21609:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2474, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2496, - "src": "21628:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2473, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "21628:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21608:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2477, - "name": "tokenDecimals", - "nodeType": "VariableDeclaration", - "scope": 2496, - "src": "21668:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2476, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "21668:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21667:20:8" - }, - "scope": 4606, - "src": "21583:221:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2521, - "nodeType": "Block", - "src": "22293:116:8", - "statements": [ - { - "assignments": [ - 2506 - ], - "declarations": [ - { - "constant": false, - "id": 2506, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2522, - "src": "22299:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2505, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "22299:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2514, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 2510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22339:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "id": 2511, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2500, - "src": "22350:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2508, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "22322:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2509, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22322:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22322:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2507, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "22312:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22312:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "22299:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2518, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2506, - "src": "22401:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2515, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2498, - "src": "22380:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2516, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "22380:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "22380:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22380:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2504, - "id": 2520, - "nodeType": "Return", - "src": "22373:31:8" - } - ] - }, - "documentation": "@notice Get the basis points fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeBps\" : \"Returns the basis points fees associated with the contract address\"}", - "id": 2522, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeBPS", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2501, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2498, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2522, - "src": "22213:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2497, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "22213:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2500, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2522, - "src": "22232:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2499, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22232:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22212:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2504, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2503, - "name": "feeBps", - "nodeType": "VariableDeclaration", - "scope": 2522, - "src": "22280:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2502, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "22280:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22279:13:8" - }, - "scope": 4606, - "src": "22194:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2547, - "nodeType": "Block", - "src": "22888:116:8", - "statements": [ - { - "assignments": [ - 2532 - ], - "declarations": [ - { - "constant": false, - "id": 2532, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "22894:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2531, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "22894:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2540, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 2536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22934:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "id": 2537, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2526, - "src": "22945:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2534, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "22917:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22917:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22917:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2533, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "22907:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22907:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "22894:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2544, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2532, - "src": "22996:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2541, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2524, - "src": "22975:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2542, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "22975:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "22975:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22975:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2530, - "id": 2546, - "nodeType": "Return", - "src": "22968:31:8" - } - ] - }, - "documentation": "@notice Get the minimum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMin\" : \"Returns the minimum fees associated with the contract address\"}", - "id": 2548, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2524, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "22808:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2523, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "22808:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2526, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "22827:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2525, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22827:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22807:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2529, - "name": "feeMin", - "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "22875:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2528, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "22875:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22874:13:8" - }, - "scope": 4606, - "src": "22789:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2573, - "nodeType": "Block", - "src": "23483:116:8", - "statements": [ - { - "assignments": [ - 2558 - ], - "declarations": [ - { - "constant": false, - "id": 2558, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2574, - "src": "23489:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2557, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "23489:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2566, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 2562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23529:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "id": 2563, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2552, - "src": "23540:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2560, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "23512:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23512:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23512:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2559, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "23502:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23502:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "23489:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2570, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2558, - "src": "23591:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2567, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2550, - "src": "23570:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2568, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "23570:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "23570:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23570:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2556, - "id": 2572, - "nodeType": "Return", - "src": "23563:31:8" - } - ] - }, - "documentation": "@notice Get the maximum fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMax\" : \"Returns the maximum fees associated with the contract address\"}", - "id": 2574, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMax", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2553, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2550, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2574, - "src": "23403:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2549, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "23403:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2552, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2574, - "src": "23422:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2551, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23422:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23402:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2555, - "name": "feeMax", - "nodeType": "VariableDeclaration", - "scope": 2574, - "src": "23470:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2554, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "23470:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23469:13:8" - }, - "scope": 4606, - "src": "23384:215:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2599, - "nodeType": "Block", - "src": "24075:117:8", - "statements": [ - { - "assignments": [ - 2584 - ], - "declarations": [ - { - "constant": false, - "id": 2584, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2600, - "src": "24081:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2583, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "24081:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2592, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24121:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "id": 2589, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2578, - "src": "24133:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2586, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "24104:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24104:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24104:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2585, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "24094:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24094:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24081:69:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2596, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2584, - "src": "24184:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2593, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2576, - "src": "24163:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "24163:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "24163:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24163:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2582, - "id": 2598, - "nodeType": "Return", - "src": "24156:31:8" - } - ] - }, - "documentation": "@notice Get the flat fee of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeFlat\" : \"Returns the flat fees associated with the contract address\"}", - "id": 2600, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeFlat", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2576, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2600, - "src": "23994:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2575, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "23994:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2578, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2600, - "src": "24013:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2577, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24013:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23993:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2582, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2581, - "name": "feeFlat", - "nodeType": "VariableDeclaration", - "scope": 2600, - "src": "24061:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2580, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "24061:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24060:14:8" - }, - "scope": 4606, - "src": "23974:218:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2625, - "nodeType": "Block", - "src": "24680:117:8", - "statements": [ - { - "assignments": [ - 2610 - ], - "declarations": [ - { - "constant": false, - "id": 2610, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2626, - "src": "24686:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2609, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "24686:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2618, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d7367", - "id": 2614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24726:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - "value": "fee.msg" - }, - { - "argumentTypes": null, - "id": 2615, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2604, - "src": "24737:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a899c0e4adaec0e5579fde71b2ef440019612fa084d7d17581fb2a5a38f57760", - "typeString": "literal_string \"fee.msg\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2612, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "24709:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24709:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24709:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2611, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "24699:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24699:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24686:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2622, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "24789:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2619, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2602, - "src": "24767:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2620, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "24767:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBytes", - "nodeType": "MemberAccess", - "referencedDeclaration": 5200, - "src": "24767:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes32) view external returns (bytes memory)" - } - }, - "id": 2623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24767:25:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2608, - "id": 2624, - "nodeType": "Return", - "src": "24760:32:8" - } - ] - }, - "documentation": "@notice Get the flat message of the contract address; typically TokenIOFeeContract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeMsg\" : \"Returns the fee message (bytes) associated with the contract address\"}", - "id": 2626, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeMsg", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2602, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2626, - "src": "24599:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2601, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "24599:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2604, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2626, - "src": "24618:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24618:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24598:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2608, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2607, - "name": "feeMsg", - "nodeType": "VariableDeclaration", - "scope": 2626, - "src": "24666:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2606, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "24666:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24665:14:8" - }, - "scope": 4606, - "src": "24580:217:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2656, - "nodeType": "Block", - "src": "25354:276:8", - "statements": [ - { - "assignments": [ - 2636 - ], - "declarations": [ - { - "constant": false, - "id": 2636, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "25360:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2635, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "25360:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2643, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e636f6e74726163742e6d6173746572", - "id": 2640, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25400:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - }, - "value": "fee.contract.master" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2638, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "25383:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2639, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25383:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2641, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25383:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2637, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "25373:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25373:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25360:63:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2648, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2636, - "src": "25468:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2649, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2630, - "src": "25472:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2645, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2628, - "src": "25444:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2646, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "25444:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 4950, - "src": "25444:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) external returns (bool)" - } - }, - "id": 2650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25444:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2651, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25496:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2644, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "25429:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25429:179:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2653, - "nodeType": "ExpressionStatement", - "src": "25429:179:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2654, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25621:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2634, - "id": 2655, - "nodeType": "Return", - "src": "25614:11:8" - } - ] - }, - "documentation": "@notice Set the master fee contract used as the default fee contract when none is provided\n@dev | This method has an `internal` view\n@dev | This value is set in the TokenIOAuthority contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"success\" : \"Returns true when successfully called from another contract\"}", - "id": 2657, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setMasterFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2631, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2628, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "25278:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2627, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "25278:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2630, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "25297:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2629, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25297:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25277:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2633, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "25340:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2632, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "25340:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25339:14:8" - }, - "scope": 4606, - "src": "25248:382:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2679, - "nodeType": "Block", - "src": "26023:114:8", - "statements": [ - { - "assignments": [ - 2665 - ], - "declarations": [ - { - "constant": false, - "id": 2665, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2680, - "src": "26029:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2664, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "26029:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2672, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e636f6e74726163742e6d6173746572", - "id": 2669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26069:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - }, - "value": "fee.contract.master" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c018a055f3a24969e61690d4ca69751c4508e81f6dd872f0c71d4c6e3d2aad64", - "typeString": "literal_string \"fee.contract.master\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2667, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "26052:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26052:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26052:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2666, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "26042:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26042:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26029:63:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2676, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2665, - "src": "26129:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2673, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2659, - "src": "26105:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2674, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "26105:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5164, - "src": "26105:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26105:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2663, - "id": 2678, - "nodeType": "Return", - "src": "26098:34:8" - } - ] - }, - "documentation": "@notice Get the master fee contract set via the TokenIOAuthority contract\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@return { \"masterFeeContract\" : \"Returns the master fee contract set for TSM.\"}", - "id": 2680, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getMasterFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2660, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2659, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2680, - "src": "25954:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2658, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "25954:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25953:19:8" - }, - "payable": false, - "returnParameters": { - "id": 2663, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2662, - "name": "masterFeeContract", - "nodeType": "VariableDeclaration", - "scope": 2680, - "src": "25996:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2661, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25996:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25995:27:8" - }, - "scope": 4606, - "src": "25924:213:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2719, - "nodeType": "Block", - "src": "26836:252:8", - "statements": [ - { - "assignments": [ - 2690 - ], - "declarations": [ - { - "constant": false, - "id": 2690, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26842:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2689, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "26842:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2698, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6163636f756e74", - "id": 2694, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26882:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - "value": "fee.account" - }, - { - "argumentTypes": null, - "id": 2695, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2684, - "src": "26897:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_171c8e096968f5d7bea786de8a8edaa4e6012a833c3927a4e918b09dc8bb8665", - "typeString": "literal_string \"fee.account\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2692, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "26865:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2693, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26865:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26865:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2691, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "26855:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26855:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26842:72:8" - }, - { - "assignments": [ - 2700 - ], - "declarations": [ - { - "constant": false, - "id": 2700, - "name": "feeAccount", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26921:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2699, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26921:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2706, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2704, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2690, - "src": "26966:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2701, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2682, - "src": "26942:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2702, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "26942:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 5164, - "src": "26942:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32) view external returns (address)" - } - }, - "id": 2705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26942:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26921:48:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2709, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2707, - "name": "feeAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "26979:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26993:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "26979:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2717, - "nodeType": "Block", - "src": "27052:32:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2715, - "name": "feeAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "27067:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2688, - "id": 2716, - "nodeType": "Return", - "src": "27060:17:8" - } - ] - }, - "id": 2718, - "nodeType": "IfStatement", - "src": "26975:109:8", - "trueBody": { - "id": 2714, - "nodeType": "Block", - "src": "26998:48:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2711, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2682, - "src": "27034:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - ], - "id": 2710, - "name": "getMasterFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2680, - "src": "27013:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer) view returns (address)" - } - }, - "id": 2712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27013:26:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2688, - "id": 2713, - "nodeType": "Return", - "src": "27006:33:8" - } - ] - } - } - ] - }, - "documentation": "@notice Get the fee contract set for a contract interface\n@dev | This method has an `internal` view\n@dev | Custom fee pricing can be set by assigning a fee contract to transactional contract interfaces\n@dev | If a fee contract has not been set by an interface contract, then the master fee contract will be returned\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the queryable interface\n@return { \"feeContract\" : \"Returns the fee contract associated with a contract interface\"}", - "id": 2720, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFeeContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2682, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26748:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2681, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "26748:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2684, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26767:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2683, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26767:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26747:44:8" - }, - "payable": false, - "returnParameters": { - "id": 2688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2687, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 2720, - "src": "26815:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2686, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26815:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26814:21:8" - }, - "scope": 4606, - "src": "26724:364:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2745, - "nodeType": "Block", - "src": "27551:114:8", - "statements": [ - { - "assignments": [ - 2730 - ], - "declarations": [ - { - "constant": false, - "id": 2730, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "27557:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2729, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "27557:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2738, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 2734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27597:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 2735, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2724, - "src": "27613:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2732, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "27580:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27580:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27580:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2731, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "27570:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27570:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "27557:66:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2742, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2730, - "src": "27657:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2739, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2722, - "src": "27636:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2740, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "27636:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "27636:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27636:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2728, - "id": 2744, - "nodeType": "Return", - "src": "27629:31:8" - } - ] - }, - "documentation": "@notice Get the token supply for a given TokenIO TSM currency symbol (e.g. USDx)\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@return { \"supply\" : \"Returns the token supply of the given currency\"}", - "id": 2746, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2722, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "27479:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2721, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "27479:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2724, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "27498:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2723, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "27498:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27478:36:8" - }, - "payable": false, - "returnParameters": { - "id": 2728, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2727, - "name": "supply", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "27538:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2726, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "27538:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27537:13:8" - }, - "scope": 4606, - "src": "27455:210:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2783, - "nodeType": "Block", - "src": "28192:189:8", - "statements": [ - { - "assignments": [ - 2760 - ], - "declarations": [ - { - "constant": false, - "id": 2760, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28198:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2759, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "28198:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2776, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 2764, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28238:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 2765, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2750, - "src": "28257:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2767, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2748, - "src": "28287:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2768, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2752, - "src": "28293:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2766, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "28267:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28267:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2771, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2748, - "src": "28323:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2772, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2754, - "src": "28329:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2770, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "28303:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28303:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2762, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "28221:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2763, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28221:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28221:117:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2761, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "28211:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28211:128:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "28198:141:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2780, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2760, - "src": "28373:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2777, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2748, - "src": "28352:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2778, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "28352:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "28352:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28352:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2758, - "id": 2782, - "nodeType": "Return", - "src": "28345:31:8" - } - ] - }, - "documentation": "@notice Get the token spender allowance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder\n@param spender Ethereum address of spender\n@return { \"allowance\" : \"Returns the allowance of a given spender for a given account\"}", - "id": 2784, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2755, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2748, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28083:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2747, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "28083:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2750, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28102:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2749, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "28102:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2752, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28119:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28119:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2754, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28136:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2753, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28136:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28082:70:8" - }, - "payable": false, - "returnParameters": { - "id": 2758, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2757, - "name": "allowance", - "nodeType": "VariableDeclaration", - "scope": 2784, - "src": "28176:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2756, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "28176:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28175:16:8" - }, - "scope": 4606, - "src": "28056:325:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2815, - "nodeType": "Block", - "src": "28904:151:8", - "statements": [ - { - "assignments": [ - 2796 - ], - "declarations": [ - { - "constant": false, - "id": 2796, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28910:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2795, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "28910:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2808, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 2800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28950:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 2801, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2788, - "src": "28967:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2803, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "28997:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2804, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2790, - "src": "29003:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2802, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "28977:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28977:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2798, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "28933:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2799, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28933:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28933:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2797, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "28923:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28923:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "28910:103:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2812, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "29047:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2809, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "29026:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2810, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "29026:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "29026:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29026:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2794, - "id": 2814, - "nodeType": "Return", - "src": "29019:31:8" - } - ] - }, - "documentation": "@notice Get the token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"balance\" : \"Return the balance of a given account for a specified currency\"}", - "id": 2816, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2791, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2786, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28814:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2785, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "28814:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2788, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28833:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2787, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "28833:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2790, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28850:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2789, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28850:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28813:53:8" - }, - "payable": false, - "returnParameters": { - "id": 2794, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2793, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "28890:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2792, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "28890:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "28889:14:8" - }, - "scope": 4606, - "src": "28789:266:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2847, - "nodeType": "Block", - "src": "29610:150:8", - "statements": [ - { - "assignments": [ - 2828 - ], - "declarations": [ - { - "constant": false, - "id": 2828, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29616:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2827, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "29616:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2840, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e66726f7a656e", - "id": 2832, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "29656:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - "value": "token.frozen" - }, - { - "argumentTypes": null, - "id": 2833, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2820, - "src": "29672:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2835, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "29702:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2836, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2822, - "src": "29708:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2834, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "29682:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29682:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2830, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "29639:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2831, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "29639:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29639:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2829, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "29629:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29629:89:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "29616:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2844, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2828, - "src": "29752:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2841, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "29731:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2842, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "29731:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "29731:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29731:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2826, - "id": 2846, - "nodeType": "Return", - "src": "29724:31:8" - } - ] - }, - "documentation": "@notice Get the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@return { \"frozenBalance\" : \"Return the frozen balance of a given account for a specified currency\"}", - "id": 2848, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTokenFrozenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2823, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2818, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29514:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2817, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "29514:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2820, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29533:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2819, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "29533:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2822, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29550:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2821, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "29550:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "29513:53:8" - }, - "payable": false, - "returnParameters": { - "id": 2826, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2825, - "name": "frozenBalance", - "nodeType": "VariableDeclaration", - "scope": 2848, - "src": "29590:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2824, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "29590:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "29589:20:8" - }, - "scope": 4606, - "src": "29483:277:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2887, - "nodeType": "Block", - "src": "30356:303:8", - "statements": [ - { - "assignments": [ - 2862 - ], - "declarations": [ - { - "constant": false, - "id": 2862, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30362:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2861, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "30362:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2874, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e66726f7a656e", - "id": 2866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30402:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - "value": "token.frozen" - }, - { - "argumentTypes": null, - "id": 2867, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "30418:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2869, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2850, - "src": "30448:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2870, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2854, - "src": "30454:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2868, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "30428:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 2871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30428:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f6e67d9dda19c38010603801a90346b4a4af222424ece7cb964888386876d87a", - "typeString": "literal_string \"token.frozen\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2864, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "30385:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2865, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "30385:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30385:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2863, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "30375:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30375:89:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "30362:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2879, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2862, - "src": "30506:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2880, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2856, - "src": "30510:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2876, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2850, - "src": "30485:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2877, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "30485:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "30485:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 2881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30485:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 2882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30525:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 2875, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "30470:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30470:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2884, - "nodeType": "ExpressionStatement", - "src": "30470:167:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "30650:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2860, - "id": 2886, - "nodeType": "Return", - "src": "30643:11:8" - } - ] - }, - "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Amount of tokens to freeze for account\n@return { \"success\" : \"Return true if successfully called from another contract\"}", - "id": 2888, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTokenFrozenBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2850, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30258:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2849, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "30258:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2852, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30277:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2851, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "30277:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2854, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30294:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2853, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "30294:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2856, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30311:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2855, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "30311:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "30257:66:8" - }, - "payable": false, - "returnParameters": { - "id": 2860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2859, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2888, - "src": "30342:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2858, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "30342:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "30341:14:8" - }, - "scope": 4606, - "src": "30227:432:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2987, - "nodeType": "Block", - "src": "31190:598:8", - "statements": [ - { - "assignments": [ - 2900 - ], - "declarations": [ - { - "constant": false, - "id": 2900, - "name": "maxFee", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31197:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2899, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31197:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2912, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d6178", - "id": 2907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31259:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - "value": "fee.max" - }, - { - "argumentTypes": null, - "id": 2908, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2892, - "src": "31270:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_926d0bc6047a0dc43905fd9cb3c7807557fb20d0264a144fd3807e863f3c770a", - "typeString": "literal_string \"fee.max\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2905, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "31242:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31242:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31242:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2904, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "31232:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31232:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2901, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "31211:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2902, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "31211:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "31211:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31211:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31197:91:8" - }, - { - "assignments": [ - 2914 - ], - "declarations": [ - { - "constant": false, - "id": 2914, - "name": "minFee", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31294:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2913, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31294:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2926, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e6d696e", - "id": 2921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31356:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - "value": "fee.min" - }, - { - "argumentTypes": null, - "id": 2922, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2892, - "src": "31367:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_459c1980a8e3139f963bbe2f02117a62eaa410025d2f21a52de7694c6d9f7423", - "typeString": "literal_string \"fee.min\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2919, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "31339:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2920, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31339:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31339:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2918, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "31329:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31329:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2915, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "31308:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2916, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "31308:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "31308:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31308:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31294:91:8" - }, - { - "assignments": [ - 2928 - ], - "declarations": [ - { - "constant": false, - "id": 2928, - "name": "bpsFee", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31391:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2927, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31391:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2940, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e627073", - "id": 2935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31453:9:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - "value": "fee.bps" - }, - { - "argumentTypes": null, - "id": 2936, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2892, - "src": "31464:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d4e409c39e3896f0dc34726f2f7cee64a86fc6b02717237a4d40005a365e29d6", - "typeString": "literal_string \"fee.bps\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2933, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "31436:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31436:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31436:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2932, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "31426:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31426:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2929, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "31405:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2930, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "31405:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "31405:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31405:77:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31391:91:8" - }, - { - "assignments": [ - 2942 - ], - "declarations": [ - { - "constant": false, - "id": 2942, - "name": "flatFee", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31488:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2941, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31488:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2954, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6665652e666c6174", - "id": 2949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31551:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - "value": "fee.flat" - }, - { - "argumentTypes": null, - "id": 2950, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2892, - "src": "31563:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cbd7e8fe7c0ca2a1075cf8ae36c4ec9da5dd98665916afce727ea8d262d0c0e4", - "typeString": "literal_string \"fee.flat\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2947, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "31534:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "31534:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31534:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2946, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "31524:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31524:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2943, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "31503:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 2944, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "31503:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 2945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "31503:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 2953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31503:78:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31488:93:8" - }, - { - "assignments": [ - 2956 - ], - "declarations": [ - { - "constant": false, - "id": 2956, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31587:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2955, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31587:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2967, - "name": "flatFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2942, - "src": "31637:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3130303030", - "id": 2963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31625:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - }, - "value": "10000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2959, - "name": "bpsFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2928, - "src": "31612:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2957, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2894, - "src": "31601:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "31601:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2960, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31601:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2961, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31600:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "31600:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31600:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2965, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31599:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "31599:37:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31599:46:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31587:58:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2970, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2956, - "src": "31656:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2971, - "name": "maxFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "31663:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31656:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2976, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2956, - "src": "31709:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 2977, - "name": "minFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2914, - "src": "31716:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31709:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2984, - "nodeType": "Block", - "src": "31758:26:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2982, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2956, - "src": "31773:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2898, - "id": 2983, - "nodeType": "Return", - "src": "31766:11:8" - } - ] - }, - "id": 2985, - "nodeType": "IfStatement", - "src": "31705:79:8", - "trueBody": { - "id": 2981, - "nodeType": "Block", - "src": "31724:28:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2979, - "name": "minFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2914, - "src": "31739:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2898, - "id": 2980, - "nodeType": "Return", - "src": "31732:13:8" - } - ] - } - }, - "id": 2986, - "nodeType": "IfStatement", - "src": "31652:132:8", - "trueBody": { - "id": 2975, - "nodeType": "Block", - "src": "31671:28:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2973, - "name": "maxFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "31686:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2898, - "id": 2974, - "nodeType": "Return", - "src": "31679:13:8" - } - ] - } - } - ] - }, - "documentation": "@notice Set the frozen token balance for a given account\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Contract address of the fee contract\n@param amount Transaction value\n@return { \"calculatedFees\" : \"Return the calculated transaction fees for a given amount and fee contract\" }", - "id": 2988, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "calculateFees", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2895, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2890, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31089:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2889, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "31089:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2892, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31108:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2891, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "31108:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2894, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31133:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2893, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31133:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "31088:57:8" - }, - "payable": false, - "returnParameters": { - "id": 2898, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2897, - "name": "calculatedFees", - "nodeType": "VariableDeclaration", - "scope": 2988, - "src": "31169:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2896, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "31169:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "31168:21:8" - }, - "scope": 4606, - "src": "31066:722:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3017, - "nodeType": "Block", - "src": "32388:334:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3001, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2990, - "src": "32423:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3002, - "name": "accountA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2992, - "src": "32429:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3000, - "name": "verifyAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3046, - "src": "32409:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32409:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", - "id": 3004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32446:92:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - }, - "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - } - ], - "id": 2999, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "32394:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32394:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3006, - "nodeType": "ExpressionStatement", - "src": "32394:150:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3009, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2990, - "src": "32579:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3010, - "name": "accountB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2994, - "src": "32585:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3008, - "name": "verifyAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3046, - "src": "32565:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32565:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e74206973206e6f7420766572696669656420666f72206f7065726174696f6e2e20506c6561736520656e73757265206163636f756e7420686173206265656e204b594320617070726f7665642e", - "id": 3012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32602:92:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - }, - "value": "Error: Account is not verified for operation. Please ensure account has been KYC approved." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6e8cc06096b6a891fed3ec56e325c01823c358e201ed09e330859368e9eb6644", - "typeString": "literal_string \"Error: Account is not verified for operation. Please ensure account has been KYC approved.\"" - } - ], - "id": 3007, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "32550:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "32550:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3014, - "nodeType": "ExpressionStatement", - "src": "32550:150:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3015, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "32713:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2998, - "id": 3016, - "nodeType": "Return", - "src": "32706:11:8" - } - ] - }, - "documentation": "@notice Verified KYC and global status for two accounts and return true or throw if either account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param accountA Ethereum address of first account holder to verify\n@param accountB Ethereum address of second account holder to verify\n@return { \"verified\" : \"Returns true if both accounts are successfully verified\" }", - "id": 3018, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyAccounts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2995, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2990, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3018, - "src": "32295:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 2989, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "32295:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2992, - "name": "accountA", - "nodeType": "VariableDeclaration", - "scope": 3018, - "src": "32314:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2991, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "32314:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2994, - "name": "accountB", - "nodeType": "VariableDeclaration", - "scope": 3018, - "src": "32332:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2993, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "32332:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32294:55:8" - }, - "payable": false, - "returnParameters": { - "id": 2998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2997, - "name": "verified", - "nodeType": "VariableDeclaration", - "scope": 3018, - "src": "32373:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2996, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "32373:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32372:15:8" - }, - "scope": 4606, - "src": "32271:451:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3045, - "nodeType": "Block", - "src": "33212:262:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3029, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3020, - "src": "33248:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3030, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3022, - "src": "33254:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3028, - "name": "getKYCApproval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "33233:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33233:29:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e7420646f6573206e6f742068617665204b594320617070726f76616c2e", - "id": 3032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33270:44:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", - "typeString": "literal_string \"Error: Account does not have KYC approval.\"" - }, - "value": "Error: Account does not have KYC approval." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0f45b4993013296383252d61e408cb72ffae2bdaad6eb0f6b52a93876e3d7df9", - "typeString": "literal_string \"Error: Account does not have KYC approval.\"" - } - ], - "id": 3027, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "33218:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33218:102:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3034, - "nodeType": "ExpressionStatement", - "src": "33218:102:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3037, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3020, - "src": "33358:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3038, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3022, - "src": "33364:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3036, - "name": "getAccountStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2340, - "src": "33341:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bool)" - } - }, - "id": 3039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33341:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e7420737461747573206973206066616c7365602e204163636f756e7420737461747573206d757374206265206074727565602e", - "id": 3040, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33380:66:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", - "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" - }, - "value": "Error: Account status is `false`. Account status must be `true`." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_88ea220c1dead5097e8c11650f8ed24bb7348ec629004cf58c9c3fd324e31d1f", - "typeString": "literal_string \"Error: Account status is `false`. Account status must be `true`.\"" - } - ], - "id": 3035, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "33326:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3041, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33326:126:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3042, - "nodeType": "ExpressionStatement", - "src": "33326:126:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3043, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33465:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3026, - "id": 3044, - "nodeType": "Return", - "src": "33458:11:8" - } - ] - }, - "documentation": "@notice Verified KYC and global status for a single account and return true or throw if account is not verified\n@dev | This method has an `internal` view\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of account holder to verify\n@return { \"verified\" : \"Returns true if account is successfully verified\" }", - "id": 3046, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyAccount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3023, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3020, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3046, - "src": "33138:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3019, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "33138:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3022, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3046, - "src": "33157:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3021, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "33157:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33137:36:8" - }, - "payable": false, - "returnParameters": { - "id": 3026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3025, - "name": "verified", - "nodeType": "VariableDeclaration", - "scope": 3046, - "src": "33197:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3024, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "33197:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33196:15:8" - }, - "scope": 4606, - "src": "33115:359:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3139, - "nodeType": "Block", - "src": "34344:799:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3063, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3052, - "src": "34366:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3062, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "34358:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34358:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34373:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "34358:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f6020616464726573732063616e6e6f74206265206e756c6c2e", - "id": 3067, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34378:37:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", - "typeString": "literal_string \"Error: `to` address cannot be null.\"" - }, - "value": "Error: `to` address cannot be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a226b210b3f8a24fddf74dacfc1ac1c826e29c09db94179af74e5de09d11f9be", - "typeString": "literal_string \"Error: `to` address cannot be null.\"" - } - ], - "id": 3061, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34350:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34350:67:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3069, - "nodeType": "ExpressionStatement", - "src": "34350:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3071, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3054, - "src": "34431:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3072, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34440:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "34431:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060616d6f756e7460206d7573742062652067726561746572207468616e207a65726f", - "id": 3074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34443:43:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", - "typeString": "literal_string \"Error: `amount` must be greater than zero\"" - }, - "value": "Error: `amount` must be greater than zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d02596d2188e56b2f261fb413421a7c0ba59699be91fd0f1a44d2c443ce7d84", - "typeString": "literal_string \"Error: `amount` must be greater than zero\"" - } - ], - "id": 3070, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34423:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34423:64:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3076, - "nodeType": "ExpressionStatement", - "src": "34423:64:8" - }, - { - "assignments": [ - 3078 - ], - "declarations": [ - { - "constant": false, - "id": 3078, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34494:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3077, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "34494:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3085, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3080, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34531:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3082, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "34545:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 3081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "34537:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34537:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3079, - "name": "getFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2720, - "src": "34516:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34516:35:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34494:57:8" - }, - { - "assignments": [ - 3087 - ], - "declarations": [ - { - "constant": false, - "id": 3087, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34557:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3086, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "34557:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3093, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3089, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34583:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3090, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3078, - "src": "34589:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3091, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3054, - "src": "34602:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3088, - "name": "calculateFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2988, - "src": "34569:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" - } - }, - "id": 3092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34569:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34557:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3096, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34656:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3097, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "34662:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34662:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3100, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34689:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3101, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3050, - "src": "34695:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3102, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3054, - "src": "34705:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3099, - "name": "getFxUSDAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4605, - "src": "34674:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" - } - }, - "id": 3103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34674:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3095, - "name": "setAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4384, - "src": "34631:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 3104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34631:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20736574207370656e64696e6720616d6f756e7420666f72206163636f756e742e", - "id": 3105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34721:51:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", - "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" - }, - "value": "Error: Unable to set spending amount for account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3dd31cfadf0b7c3e10d089f4a2aa572f1524677e3cfdf5778d61265145e5eb55", - "typeString": "literal_string \"Error: Unable to set spending amount for account.\"" - } - ], - "id": 3094, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34616:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34616:157:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3107, - "nodeType": "ExpressionStatement", - "src": "34616:157:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3110, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34809:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3111, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3050, - "src": "34815:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3112, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "34825:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34825:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3114, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3052, - "src": "34837:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3115, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3054, - "src": "34841:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3116, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3056, - "src": "34849:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3109, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "34795:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34795:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 3118, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34862:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 3108, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34780:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34780:128:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3120, - "nodeType": "ExpressionStatement", - "src": "34780:128:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3123, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "34986:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3124, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3050, - "src": "34992:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3125, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "35002:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "35002:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3127, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3078, - "src": "35014:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3128, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3087, - "src": "35027:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3130, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "35043:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3131, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3078, - "src": "35049:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3129, - "name": "getFeeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2626, - "src": "35033:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" - } - }, - "id": 3132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "35033:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3122, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "34972:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34972:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", - "id": 3134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "35070:49:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - }, - "value": "Error: Unable to transfer fees to fee contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - } - ], - "id": 3121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "34957:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34957:163:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3136, - "nodeType": "ExpressionStatement", - "src": "34957:163:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "35134:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3060, - "id": 3138, - "nodeType": "Return", - "src": "35127:11:8" - } - ] - }, - "documentation": "@notice Transfer an amount of currency token from msg.sender account to another specified account\n@dev This function is called by an interface that is accessible directly to the account holder\n@dev | This method has an `internal` view\n@dev | This method uses `forceTransfer()` low-level api\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3140, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3057, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3048, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34239:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3047, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "34239:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3050, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34258:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3049, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "34258:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3052, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34275:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3051, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "34275:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3054, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34287:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3053, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "34287:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3056, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34300:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3055, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "34300:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "34238:73:8" - }, - "payable": false, - "returnParameters": { - "id": 3060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3059, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3140, - "src": "34330:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3058, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "34330:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "34329:14:8" - }, - "scope": 4606, - "src": "34221:922:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3235, - "nodeType": "Block", - "src": "36400:1060:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3159, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "36429:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3158, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "36421:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36421:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36436:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "36421:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", - "id": 3163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36447:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - }, - "value": "Error: `to` address must not be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - } - ], - "id": 3157, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "36406:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36406:86:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3165, - "nodeType": "ExpressionStatement", - "src": "36406:86:8" - }, - { - "assignments": [ - 3167 - ], - "declarations": [ - { - "constant": false, - "id": 3167, - "name": "feeContract", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36499:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36499:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3174, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3169, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36536:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3171, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "36550:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 3170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "36542:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36542:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3168, - "name": "getFeeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2720, - "src": "36521:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36521:35:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "36499:57:8" - }, - { - "assignments": [ - 3176 - ], - "declarations": [ - { - "constant": false, - "id": 3176, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36562:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3175, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "36562:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3182, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3178, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36588:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3179, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3167, - "src": "36594:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3180, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "36607:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3177, - "name": "calculateFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2988, - "src": "36574:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) view returns (uint256)" - } - }, - "id": 3181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36574:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "36562:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3185, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36754:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3186, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3146, - "src": "36760:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3188, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36781:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3189, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3144, - "src": "36787:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3190, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "36797:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3187, - "name": "getFxUSDAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4605, - "src": "36766:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,uint256) view returns (uint256)" - } - }, - "id": 3191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36766:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3184, - "name": "setAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4384, - "src": "36729:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 3192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36729:76:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20736574206163636f756e74207370656e64696e6720616d6f756e742e", - "id": 3193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36813:47:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", - "typeString": "literal_string \"Error: Unable to set account spending amount.\"" - }, - "value": "Error: Unable to set account spending amount." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7a8790433f99260aa4e38602407436fb82a1411633b4406759e1ebede4d74a18", - "typeString": "literal_string \"Error: Unable to set account spending amount.\"" - } - ], - "id": 3183, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "36714:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36714:152:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3195, - "nodeType": "ExpressionStatement", - "src": "36714:152:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3198, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "36946:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3199, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3144, - "src": "36952:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3200, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3146, - "src": "36962:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3201, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "36968:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3202, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "36972:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3203, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3152, - "src": "36980:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3197, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "36932:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36932:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 3205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "36993:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 3196, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "36917:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "36917:127:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3207, - "nodeType": "ExpressionStatement", - "src": "36917:127:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3210, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "37122:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3211, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3144, - "src": "37128:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3212, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3146, - "src": "37138:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3213, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3167, - "src": "37144:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3214, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3176, - "src": "37157:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3216, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "37173:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3217, - "name": "feeContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3167, - "src": "37179:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3215, - "name": "getFeeMsg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2626, - "src": "37163:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (bytes memory)" - } - }, - "id": 3218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37163:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3209, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "37108:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 3219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37108:84:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e73666572206665657320746f2066656520636f6e74726163742e", - "id": 3220, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37200:49:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - }, - "value": "Error: Unable to transfer fees to fee contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f7d9d2b186deae04747f480de0e416c74701ab3e2f8cceccd78101586f4f25fa", - "typeString": "literal_string \"Error: Unable to transfer fees to fee contract.\"" - } - ], - "id": 3208, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "37093:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37093:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3222, - "nodeType": "ExpressionStatement", - "src": "37093:162:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3225, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3142, - "src": "37346:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3226, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3144, - "src": "37352:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3227, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3146, - "src": "37362:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3228, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "37368:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3224, - "name": "updateAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3387, - "src": "37330:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,uint256) returns (bool)" - } - }, - "id": 3229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37330:45:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f2075706461746520616c6c6f77616e636520666f72207370656e6465722e", - "id": 3230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37383:48:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", - "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" - }, - "value": "Error: Unable to update allowance for spender." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8344e2bd08f193506b41bb2de93efc5817da3f6b9bc69b72335fa3a76abb1260", - "typeString": "literal_string \"Error: Unable to update allowance for spender.\"" - } - ], - "id": 3223, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "37315:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "37315:122:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3232, - "nodeType": "ExpressionStatement", - "src": "37315:122:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "37451:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3156, - "id": 3234, - "nodeType": "Return", - "src": "37444:11:8" - } - ] - }, - "documentation": "@notice Transfer an amount of currency token from account to another specified account via an approved spender account\n@dev This function is called by an interface that is accessible directly to the account spender\n@dev | This method has an `internal` view\n@dev | Transactions will fail if the spending amount exceeds the daily limit\n@dev | This method uses `forceTransfer()` low-level api\n@dev | This method implements ERC20 transferFrom() method with approved spender behavior\n@dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3236, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3142, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36281:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3141, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "36281:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3144, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36300:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3143, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "36300:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3146, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36317:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36317:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3148, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36331:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3147, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "36331:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3150, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36343:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3149, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "36343:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3152, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36356:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3151, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "36356:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "36280:87:8" - }, - "payable": false, - "returnParameters": { - "id": 3156, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3155, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3236, - "src": "36386:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3154, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "36386:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "36385:14:8" - }, - "scope": 4606, - "src": "36259:1201:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3334, - "nodeType": "Block", - "src": "38349:801:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3255, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "38378:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3254, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "38370:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38370:11:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38385:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "38370:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2060746f602061646472657373206d757374206e6f74206265206e756c6c2e", - "id": 3259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38396:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - }, - "value": "Error: `to` address must not be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_521e933164953a65074f8cb7bc234c41c61a266083875e70b3f5169a1847150c", - "typeString": "literal_string \"Error: `to` address must not be null.\"" - } - ], - "id": 3253, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "38355:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38355:86:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3261, - "nodeType": "ExpressionStatement", - "src": "38355:86:8" - }, - { - "assignments": [ - 3263 - ], - "declarations": [ - { - "constant": false, - "id": 3263, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38448:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3262, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "38448:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3275, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38490:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3268, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3240, - "src": "38507:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3270, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38537:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3271, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3242, - "src": "38543:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3269, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "38517:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38517:31:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3265, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "38473:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "38473:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38473:76:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3264, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "38463:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38463:87:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "38448:102:8" - }, - { - "assignments": [ - 3277 - ], - "declarations": [ - { - "constant": false, - "id": 3277, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38556:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3276, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "38556:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3289, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38598:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3282, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3240, - "src": "38615:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3284, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38645:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3285, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "38651:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3283, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "38625:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38625:29:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3279, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "38581:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3280, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "38581:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38581:74:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3278, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "38571:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38571:85:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "38556:100:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3294, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3263, - "src": "38699:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3301, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3246, - "src": "38736:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3298, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3263, - "src": "38726:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3295, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38705:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3296, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "38705:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "38705:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38705:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "38705:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38705:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3291, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38678:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3292, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "38678:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "38678:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38678:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38752:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3290, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "38663:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38663:202:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3306, - "nodeType": "ExpressionStatement", - "src": "38663:202:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3311, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3277, - "src": "38907:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3318, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3246, - "src": "38944:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3315, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3277, - "src": "38934:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3312, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38913:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3313, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "38913:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "38913:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38913:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "38913:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38913:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3308, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3238, - "src": "38886:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3309, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "38886:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "38886:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38886:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "38960:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3307, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "38871:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "38871:202:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3323, - "nodeType": "ExpressionStatement", - "src": "38871:202:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3325, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3240, - "src": "39094:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3326, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3242, - "src": "39104:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3327, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "39110:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3328, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3246, - "src": "39114:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3329, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3248, - "src": "39122:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3324, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1670, - "src": "39085:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,address,uint256,bytes memory)" - } - }, - "id": 3330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39085:42:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3331, - "nodeType": "EmitStatement", - "src": "39080:47:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "39141:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3252, - "id": 3333, - "nodeType": "Return", - "src": "39134:11:8" - } - ] - }, - "documentation": "@notice Low-level transfer method\n@dev | This method has an `internal` view\n@dev | This method does not include fees or approved allowances.\n@dev | This method is only for authorized interfaces to use (e.g. TokenIOFX)\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param from Ethereum address of account to send currency amount from\n@param to Ethereum address of account to send currency amount to\n@param amount Value of currency to transfer\n@param data Arbitrary bytes data to include with the transaction\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3335, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "forceTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3249, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3238, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38230:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3237, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "38230:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3240, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38249:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3239, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "38249:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3242, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38266:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "38266:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3244, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38280:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3243, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "38280:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3246, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38292:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3245, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "38292:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3248, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38305:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3247, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "38305:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "38229:87:8" - }, - "payable": false, - "returnParameters": { - "id": 3252, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3251, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3335, - "src": "38335:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3250, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "38335:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "38334:14:8" - }, - "scope": 4606, - "src": "38207:943:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3386, - "nodeType": "Block", - "src": "39827:376:8", - "statements": [ - { - "assignments": [ - 3349 - ], - "declarations": [ - { - "constant": false, - "id": 3349, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39833:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3348, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "39833:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3366, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 3353, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "39873:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 3354, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3339, - "src": "39892:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3356, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3337, - "src": "39922:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3357, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3341, - "src": "39928:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3355, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "39902:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39902:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3360, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3337, - "src": "39958:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3361, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "39964:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "39964:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3359, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "39938:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39938:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3351, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "39856:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3352, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "39856:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39856:120:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3350, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "39846:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39846:131:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "39833:144:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3371, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3349, - "src": "40019:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3378, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3343, - "src": "40052:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3375, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3349, - "src": "40044:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3372, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3337, - "src": "40023:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3373, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "40023:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "40023:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40023:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "40023:28:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40023:36:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3368, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3337, - "src": "39998:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3369, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "39998:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "39998:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39998:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3381, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40068:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3367, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "39983:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "39983:198:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3383, - "nodeType": "ExpressionStatement", - "src": "39983:198:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3384, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40194:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3347, - "id": 3385, - "nodeType": "Return", - "src": "40187:11:8" - } - ] - }, - "documentation": "@notice Low-level method to update spender allowance for account\n@dev | This method is called inside the `transferFrom()` method\n@dev | msg.sender == spender address\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder\n@param amount Value to reduce allowance by (i.e. the amount spent)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3387, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "updateAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3344, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3337, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39729:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3336, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "39729:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3339, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39748:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3338, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "39748:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3341, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39765:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3340, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "39765:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3343, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39782:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3342, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "39782:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "39728:66:8" - }, - "payable": false, - "returnParameters": { - "id": 3347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3346, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3387, - "src": "39813:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3345, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "39813:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "39812:14:8" - }, - "scope": 4606, - "src": "39704:499:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3507, - "nodeType": "Block", - "src": "40767:1110:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3399, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3391, - "src": "40781:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40792:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "40781:14:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20607370656e6465726020616464726573732063616e6e6f74206265206e756c6c2e", - "id": 3402, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "40805:42:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", - "typeString": "literal_string \"Error: `spender` address cannot be null.\"" - }, - "value": "Error: `spender` address cannot be null." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0018de24dbddb3914bd9a5b32a3d9076db11906e59819ceab2859b81e8864c03", - "typeString": "literal_string \"Error: `spender` address cannot be null.\"" - } - ], - "id": 3398, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "40773:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40773:75:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3404, - "nodeType": "ExpressionStatement", - "src": "40773:75:8" - }, - { - "assignments": [ - 3406 - ], - "declarations": [ - { - "constant": false, - "id": 3406, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40855:22:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3405, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "40855:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3413, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3408, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "40895:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3410, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5261, - "src": "40909:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TokenIOLib_$4606", - "typeString": "library TokenIOLib" - } - ], - "id": 3409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "40901:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40901:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3407, - "name": "getTokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2418, - "src": "40880:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" - } - }, - "id": 3412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40880:35:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "40855:60:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3416, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "40959:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3417, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3406, - "src": "40965:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3419, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "40995:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3420, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3391, - "src": "41001:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3418, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "40975:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40975:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3415, - "name": "getTokenFrozenBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2848, - "src": "40937:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address) view returns (uint256)" - } - }, - "id": 3422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40937:73:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3423, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41014:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "40937:78:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205370656e646572206d757374206e6f74206861766520612066726f7a656e2062616c616e6365206469726563746c79", - "id": 3425, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41023:56:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", - "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" - }, - "value": "Error: Spender must not have a frozen balance directly" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0606de6f2c505880832b0302a22b13d70a4d217530b0181ae959df67358d52e0", - "typeString": "literal_string \"Error: Spender must not have a frozen balance directly\"" - } - ], - "id": 3414, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "40922:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "40922:158:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3427, - "nodeType": "ExpressionStatement", - "src": "40922:158:8" - }, - { - "assignments": [ - 3429 - ], - "declarations": [ - { - "constant": false, - "id": 3429, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "41087:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3428, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "41087:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3446, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e616c6c6f77616e6365", - "id": 3433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41129:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - "value": "token.allowance" - }, - { - "argumentTypes": null, - "id": 3434, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3406, - "src": "41148:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3436, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41178:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3437, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "41184:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41184:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3435, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "41158:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41158:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3441, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41217:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3442, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3391, - "src": "41223:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3440, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "41197:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41197:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_52f913954b67fffc85e9f7da03ffa77d1f903137ef8180236a8b3358e7c057a4", - "typeString": "literal_string \"token.allowance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3431, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "41112:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3432, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41112:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41112:120:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3430, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "41102:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41102:131:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "41087:146:8" - }, - { - "assignments": [ - 3448 - ], - "declarations": [ - { - "constant": false, - "id": 3448, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "41239:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3447, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "41239:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3461, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3452, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41281:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3453, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3406, - "src": "41298:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3455, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41328:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3456, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "41334:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41334:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3454, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "41308:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41308:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3450, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "41264:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3451, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41264:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41264:82:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3449, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "41254:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41254:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "41239:108:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3466, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3429, - "src": "41390:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3463, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41369:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3464, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "41369:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "41369:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41369:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3468, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41399:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "41369:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3472, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3470, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "41404:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41414:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "41404:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "41369:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20416c6c6f77616e6365206d757374206265207a65726f20283029206265666f72652073657474696e6720616e207570646174656420616c6c6f77616e636520666f72207370656e6465722e", - "id": 3474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41423:84:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", - "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" - }, - "value": "Error: Allowance must be zero (0) before setting an updated allowance for spender." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f7ec124e86dc355a89f70fe93c2c3eecd992b56f6399f647c6a2406ff60675a", - "typeString": "literal_string \"Error: Allowance must be zero (0) before setting an updated allowance for spender.\"" - } - ], - "id": 3462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "41354:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41354:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3476, - "nodeType": "ExpressionStatement", - "src": "41354:154:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3481, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "41551:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3478, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41530:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3479, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "41530:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "41530:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41530:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3483, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "41560:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "41530:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20416c6c6f77616e63652063616e6e6f7420657863656564206d73672e73656e64657220746f6b656e2062616c616e63652e", - "id": 3485, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41574:58:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", - "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" - }, - "value": "Error: Allowance cannot exceed msg.sender token balance." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6af1e476a84e37225451f3d4a062b746a360ad157c7c779f9a5f3d4e34ec8362", - "typeString": "literal_string \"Error: Allowance cannot exceed msg.sender token balance.\"" - } - ], - "id": 3477, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "41515:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41515:118:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3487, - "nodeType": "ExpressionStatement", - "src": "41515:118:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3492, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3429, - "src": "41676:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3493, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "41682:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3489, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3389, - "src": "41655:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3490, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "41655:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "41655:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41655:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3495, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41697:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3488, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "41640:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41640:165:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3497, - "nodeType": "ExpressionStatement", - "src": "41640:165:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3499, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "41826:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "41826:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3501, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3391, - "src": "41838:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3502, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "41847:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3498, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1638, - "src": "41817:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "41817:37:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3504, - "nodeType": "EmitStatement", - "src": "41812:42:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3505, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "41868:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3397, - "id": 3506, - "nodeType": "Return", - "src": "41861:11:8" - } - ] - }, - "documentation": "@notice Low-level method to set the allowance for a spender\n@dev | This method is called inside the `approve()` ERC20 method\n@dev | msg.sender == account holder\n@param self Internal storage proxying TokenIOStorage contract\n@param spender Ethereum address of account spender\n@param amount Value to set for spender allowance\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3508, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approveAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3394, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3389, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40686:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3388, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "40686:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3391, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40705:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3390, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "40705:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3393, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40722:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3392, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "40722:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "40685:49:8" - }, - "payable": false, - "returnParameters": { - "id": 3397, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3396, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "40753:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3395, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "40753:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "40752:14:8" - }, - "scope": 4606, - "src": "40660:1217:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3618, - "nodeType": "Block", - "src": "42704:943:8", - "statements": [ - { - "assignments": [ - 3524 - ], - "declarations": [ - { - "constant": false, - "id": 3524, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42710:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3523, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42710:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3536, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3528, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42752:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3529, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3512, - "src": "42769:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3531, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "42799:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3532, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3514, - "src": "42805:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3530, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "42779:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42779:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3526, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "42735:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42735:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42735:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3525, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "42725:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42725:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42710:105:8" - }, - { - "assignments": [ - 3538 - ], - "declarations": [ - { - "constant": false, - "id": 3538, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42821:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3537, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42821:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3547, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e697373756564", - "id": 3542, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42863:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - "value": "token.issued" - }, - { - "argumentTypes": null, - "id": 3543, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3512, - "src": "42879:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3544, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "42889:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3540, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "42846:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42846:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42846:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3539, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "42836:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42836:65:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42821:80:8" - }, - { - "assignments": [ - 3549 - ], - "declarations": [ - { - "constant": false, - "id": 3549, - "name": "id_c", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42907:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3548, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "42907:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3557, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 3553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "42949:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 3554, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3512, - "src": "42965:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3551, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "42932:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "42932:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42932:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3550, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "42922:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42922:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "42907:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3562, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3524, - "src": "43012:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3569, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3516, - "src": "43049:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3566, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3524, - "src": "43039:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3563, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43018:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3564, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43018:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "43018:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43018:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43018:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43018:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3559, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "42991:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3560, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "42991:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "42991:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42991:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3572, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43065:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3558, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "42983:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "42983:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3574, - "nodeType": "ExpressionStatement", - "src": "42983:190:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3579, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3538, - "src": "43208:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3586, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3516, - "src": "43245:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3583, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3538, - "src": "43235:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3580, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43214:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3581, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43214:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "43214:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43214:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43214:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43214:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3576, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43187:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3577, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43187:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "43187:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43187:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3589, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43261:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3575, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "43179:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43179:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3591, - "nodeType": "ExpressionStatement", - "src": "43179:190:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3596, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3549, - "src": "43404:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3603, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3516, - "src": "43441:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3600, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3549, - "src": "43431:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3597, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43410:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3598, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43410:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "43410:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43410:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "43410:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43410:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3593, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "43383:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "43383:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "43383:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43383:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43457:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3592, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "43375:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43375:190:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3608, - "nodeType": "ExpressionStatement", - "src": "43375:190:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3610, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3512, - "src": "43585:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3611, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3514, - "src": "43595:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3612, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3516, - "src": "43604:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3613, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "43612:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3609, - "name": "Deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "43577:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,uint256,string memory)" - } - }, - "id": 3614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "43577:46:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3615, - "nodeType": "EmitStatement", - "src": "43572:51:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "43637:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3522, - "id": 3617, - "nodeType": "Return", - "src": "43630:11:8" - } - ] - }, - "documentation": "@notice Deposit an amount of currency into the Ethereum account holder\n@dev | The total supply of the token increases only when new funds are deposited 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to deposit for account\n@param issuerFirm Name of the issuing firm authorizing the deposit\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3619, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3519, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3510, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42587:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3509, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "42587:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3512, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42606:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3511, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "42606:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3514, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42623:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3513, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "42623:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3516, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42640:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3515, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "42640:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3518, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42653:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3517, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "42653:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "42586:85:8" - }, - "payable": false, - "returnParameters": { - "id": 3522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3521, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3619, - "src": "42690:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3520, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "42690:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "42689:14:8" - }, - "scope": 4606, - "src": "42570:1077:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3729, - "nodeType": "Block", - "src": "44478:1002:8", - "statements": [ - { - "assignments": [ - 3635 - ], - "declarations": [ - { - "constant": false, - "id": 3635, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44484:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3634, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44484:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3647, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e62616c616e6365", - "id": 3639, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44526:15:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - "value": "token.balance" - }, - { - "argumentTypes": null, - "id": 3640, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "44543:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3642, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "44573:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3643, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3625, - "src": "44579:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3641, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "44553:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44553:34:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_44905fda164692a56298a4e5111df78b9b8dca1a61b0c4e924e1bc799a52d970", - "typeString": "literal_string \"token.balance\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3637, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "44509:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3638, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44509:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44509:79:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3636, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "44499:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44499:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44484:105:8" - }, - { - "assignments": [ - 3649 - ], - "declarations": [ - { - "constant": false, - "id": 3649, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44595:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3648, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44595:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3658, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e697373756564", - "id": 3653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44637:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - "value": "token.issued" - }, - { - "argumentTypes": null, - "id": 3654, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "44653:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3655, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "44663:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cdfec689a1e585be9caa8158425b66d8656e4db1d92d754c7743d7ae852e861b", - "typeString": "literal_string \"token.issued\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3651, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "44620:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3652, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44620:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44620:54:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3650, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "44610:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44610:65:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44595:80:8" - }, - { - "assignments": [ - 3660 - ], - "declarations": [ - { - "constant": false, - "id": 3660, - "name": "id_c", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44719:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3659, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "44719:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3668, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "746f6b656e2e737570706c79", - "id": 3664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44761:14:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - "value": "token.supply" - }, - { - "argumentTypes": null, - "id": 3665, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "44777:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ed5c9b13433e7ed246152cf6e328d2b2273dcf6ffe526207e94cf0f9516b4707", - "typeString": "literal_string \"token.supply\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3662, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "44744:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "44744:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44744:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3661, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "44734:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44734:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "44719:68:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3673, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3635, - "src": "44830:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3680, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "44867:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3677, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3635, - "src": "44857:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3674, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "44836:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3675, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "44836:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "44836:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44836:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "44836:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44836:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3670, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "44809:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3671, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "44809:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "44809:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44809:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "44883:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3669, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "44794:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3684, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44794:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3685, - "nodeType": "ExpressionStatement", - "src": "44794:197:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3690, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "45033:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3697, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "45070:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3694, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "45060:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3691, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "45039:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3692, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "45039:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "45039:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45039:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "45039:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45039:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3687, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "45012:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3688, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "45012:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "45012:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45012:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3700, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45086:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3686, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "44997:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "44997:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3702, - "nodeType": "ExpressionStatement", - "src": "44997:197:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3707, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3660, - "src": "45236:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3714, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "45273:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3711, - "name": "id_c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3660, - "src": "45263:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3708, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "45242:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3709, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "45242:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "45242:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 3712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45242:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "45242:30:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45242:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3704, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3621, - "src": "45215:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3705, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "45215:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "45215:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 3716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45215:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3717, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45289:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3703, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "45200:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45200:197:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3719, - "nodeType": "ExpressionStatement", - "src": "45200:197:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3721, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "45418:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3722, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3625, - "src": "45428:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3723, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "45437:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3724, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "45445:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3720, - "name": "Withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1658, - "src": "45409:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory,address,uint256,string memory)" - } - }, - "id": 3725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "45409:47:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3726, - "nodeType": "EmitStatement", - "src": "45404:52:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "45470:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3633, - "id": 3728, - "nodeType": "Return", - "src": "45463:11:8" - } - ] - }, - "documentation": "@notice Withdraw an amount of currency from the Ethereum account holder\n@dev | The total supply of the token decreases only when new funds are withdrawn 1:1\n@dev | This method should only be called by authorized issuer firms\n@param self Internal storage proxying TokenIOStorage contract\n@param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx)\n@param account Ethereum address of account holder to deposit funds for\n@param amount Value of currency to withdraw for account\n@param issuerFirm Name of the issuing firm authorizing the withdraw\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3730, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3630, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3621, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44361:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3620, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "44361:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3623, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44380:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3622, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "44380:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3625, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44397:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3624, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "44397:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3627, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44414:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3626, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "44414:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3629, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44427:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3628, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "44427:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "44360:85:8" - }, - "payable": false, - "returnParameters": { - "id": 3633, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3632, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "44464:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3631, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "44464:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "44463:14:8" - }, - "scope": 4606, - "src": "44343:1137:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3763, - "nodeType": "Block", - "src": "46213:275:8", - "statements": [ - { - "assignments": [ - 3742 - ], - "declarations": [ - { - "constant": false, - "id": 3742, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46219:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3741, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "46219:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3750, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e6669726d", - "id": 3746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46259:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - "value": "registered.firm" - }, - { - "argumentTypes": null, - "id": 3747, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3734, - "src": "46278:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3744, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "46242:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3745, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "46242:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46242:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3743, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "46232:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46232:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "46219:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3755, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3742, - "src": "46332:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3756, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3736, - "src": "46336:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3752, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3732, - "src": "46311:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "46311:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "46311:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 3757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46311:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3758, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46353:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3751, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "46296:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "46296:170:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3760, - "nodeType": "ExpressionStatement", - "src": "46296:170:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3761, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "46479:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3740, - "id": 3762, - "nodeType": "Return", - "src": "46472:11:8" - } - ] - }, - "documentation": "@notice Method for setting a registered issuer firm\n@dev | Only Token, Inc. and other authorized institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | If the registered firm is unapproved; all authorized addresses of that firm will also be unapproved\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered\n@param approved Approval status to set for the firm (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3764, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setRegisteredFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3732, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46128:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3731, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "46128:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3734, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46147:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3733, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "46147:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3736, - "name": "approved", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46166:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3735, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "46166:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "46127:53:8" - }, - "payable": false, - "returnParameters": { - "id": 3740, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3739, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3764, - "src": "46199:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3738, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "46199:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "46198:14:8" - }, - "scope": 4606, - "src": "46101:387:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3828, - "nodeType": "Block", - "src": "47321:679:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3779, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3766, - "src": "47359:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3780, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3768, - "src": "47365:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3778, - "name": "isRegisteredFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3884, - "src": "47342:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (bool)" - } - }, - "id": 3781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47342:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20606973737565724669726d60206d75737420626520726567697374657265642e", - "id": 3782, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47384:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", - "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" - }, - "value": "Error: `issuerFirm` must be registered." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_46aeb51389bf8624f1074b1e500a77c322e47158b30e825b9bdbb4743b1ebd4e", - "typeString": "literal_string \"Error: `issuerFirm` must be registered.\"" - } - ], - "id": 3777, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "47327:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3783, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47327:99:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3784, - "nodeType": "ExpressionStatement", - "src": "47327:99:8" - }, - { - "assignments": [ - 3786 - ], - "declarations": [ - { - "constant": false, - "id": 3786, - "name": "id_a", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47433:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3785, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "47433:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3795, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47475:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "id": 3791, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3768, - "src": "47499:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3792, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3770, - "src": "47511:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3788, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "47458:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "47458:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3793, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47458:70:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3787, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "47448:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47448:81:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "47433:96:8" - }, - { - "assignments": [ - 3797 - ], - "declarations": [ - { - "constant": false, - "id": 3797, - "name": "id_b", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47535:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3796, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "47535:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3805, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f726974792e6669726d", - "id": 3801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47577:27:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - "value": "registered.authority.firm" - }, - { - "argumentTypes": null, - "id": 3802, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3770, - "src": "47606:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3799, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "47560:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "47560:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47560:63:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3798, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "47550:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47550:74:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "47535:89:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3810, - "name": "id_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3786, - "src": "47667:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3811, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3772, - "src": "47673:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3807, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3766, - "src": "47646:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3808, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "47646:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "47646:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 3812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47646:36:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47690:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3806, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "47631:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47631:167:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3815, - "nodeType": "ExpressionStatement", - "src": "47631:167:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3820, - "name": "id_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3797, - "src": "47843:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3821, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3768, - "src": "47849:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3817, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3766, - "src": "47820:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3818, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "47820:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setString", - "nodeType": "MemberAccess", - "referencedDeclaration": 4990, - "src": "47820:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_string_memory_ptr_$returns$_t_bool_$", - "typeString": "function (bytes32,string memory) external returns (bool)" - } - }, - "id": 3822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47820:40:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 3823, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47868:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 3816, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "47805:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "47805:171:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3825, - "nodeType": "ExpressionStatement", - "src": "47805:171:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "47991:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3776, - "id": 3827, - "nodeType": "Return", - "src": "47984:11:8" - } - ] - }, - "documentation": "@notice Method for setting a registered issuer firm authority\n@dev | Only Token, Inc. and other approved institutions may set a registered firm\n@dev | The TokenIOAuthority.sol interface wraps this method\n@dev | Authority can only be set for a registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the firm to be registered to authority\n@param authorityAddress Ethereum address of the firm authority to be approved\n@param approved Approval status to set for the firm authority (true/false)\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 3829, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setRegisteredAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3773, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3766, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47210:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3765, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "47210:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3768, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47229:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3767, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "47229:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3770, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47248:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3769, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "47248:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3772, - "name": "approved", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47274:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3771, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "47274:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "47209:79:8" - }, - "payable": false, - "returnParameters": { - "id": 3776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3775, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3829, - "src": "47307:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3774, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "47307:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "47306:14:8" - }, - "scope": 4606, - "src": "47178:822:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3857, - "nodeType": "Block", - "src": "48488:164:8", - "statements": [ - { - "assignments": [ - 3839 - ], - "declarations": [ - { - "constant": false, - "id": 3839, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3858, - "src": "48494:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3838, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "48494:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3850, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f726974792e6669726d", - "id": 3843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "48534:27:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - "value": "registered.authority.firm" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3845, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3831, - "src": "48583:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3846, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3833, - "src": "48589:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3844, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "48563:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48563:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_32ee0f15ae2ef298554083e918a71dccd963cd3ab12841cee29073b83ba3eaa9", - "typeString": "literal_string \"registered.authority.firm\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3841, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "48517:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "48517:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48517:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3840, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "48507:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48507:101:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "48494:114:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3854, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3839, - "src": "48644:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3851, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3831, - "src": "48621:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "48621:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getString", - "nodeType": "MemberAccess", - "referencedDeclaration": 5188, - "src": "48621:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_string_memory_ptr_$", - "typeString": "function (bytes32) view external returns (string memory)" - } - }, - "id": 3855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "48621:26:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 3837, - "id": 3856, - "nodeType": "Return", - "src": "48614:33:8" - } - ] - }, - "documentation": "@notice Get the issuer firm registered to the authority Ethereum address\n@dev | Only one firm can be registered per authority\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"issuerFirm\" : \"Name of the firm registered to authority\" }", - "id": 3858, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFirmFromAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3834, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3831, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3858, - "src": "48401:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3830, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "48401:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3833, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3858, - "src": "48420:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "48420:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48400:45:8" - }, - "payable": false, - "returnParameters": { - "id": 3837, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3836, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3858, - "src": "48469:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3835, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "48469:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48468:19:8" - }, - "scope": 4606, - "src": "48371:281:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3883, - "nodeType": "Block", - "src": "49050:119:8", - "statements": [ - { - "assignments": [ - 3868 - ], - "declarations": [ - { - "constant": false, - "id": 3868, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3884, - "src": "49056:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3867, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "49056:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3876, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e6669726d", - "id": 3872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "49096:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - "value": "registered.firm" - }, - { - "argumentTypes": null, - "id": 3873, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3862, - "src": "49115:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a9b4213e9296324e7231bb4431e77a9cd8a564f25eceb05010ece0167bbe013e", - "typeString": "literal_string \"registered.firm\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3870, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "49079:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3871, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "49079:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49079:47:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3869, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "49069:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49069:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "49056:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3880, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3868, - "src": "49161:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3877, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3860, - "src": "49140:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3878, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "49140:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "49140:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49140:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3866, - "id": 3882, - "nodeType": "Return", - "src": "49133:31:8" - } - ] - }, - "documentation": "@notice Return the boolean (true/false) registration status for an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@return { \"registered\" : \"Return if the issuer firm has been registered\" }", - "id": 3884, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3860, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3884, - "src": "48972:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3859, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "48972:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3862, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3884, - "src": "48991:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3861, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "48991:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "48971:38:8" - }, - "payable": false, - "returnParameters": { - "id": 3866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3865, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3884, - "src": "49033:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3864, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "49033:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49032:17:8" - }, - "scope": 4606, - "src": "48946:223:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3915, - "nodeType": "Block", - "src": "49701:169:8", - "statements": [ - { - "assignments": [ - 3896 - ], - "declarations": [ - { - "constant": false, - "id": 3896, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49707:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3895, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "49707:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3908, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3900, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "49747:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "id": 3901, - "name": "issuerFirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3888, - "src": "49771:10:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3903, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3886, - "src": "49803:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3904, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3890, - "src": "49809:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3902, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "49783:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49783:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3898, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "49730:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "49730:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49730:97:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3897, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "49720:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49720:108:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "49707:121:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3912, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3896, - "src": "49862:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3909, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3886, - "src": "49841:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3910, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "49841:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "49841:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "49841:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3894, - "id": 3914, - "nodeType": "Return", - "src": "49834:31:8" - } - ] - }, - "documentation": "@notice Return the boolean (true/false) status if an authority is registered to an issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param issuerFirm Name of the issuer firm\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered with the issuer firm\" }", - "id": 3916, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredToFirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3891, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3886, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49597:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3885, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "49597:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3888, - "name": "issuerFirm", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49616:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3887, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "49616:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3890, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49635:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3889, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "49635:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49596:64:8" - }, - "payable": false, - "returnParameters": { - "id": 3894, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3893, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3916, - "src": "49684:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3892, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "49684:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "49683:17:8" - }, - "scope": 4606, - "src": "49569:301:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3951, - "nodeType": "Block", - "src": "50346:230:8", - "statements": [ - { - "assignments": [ - 3926 - ], - "declarations": [ - { - "constant": false, - "id": 3926, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3952, - "src": "50352:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "50352:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3944, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "726567697374657265642e617574686f72697479", - "id": 3930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "50392:22:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - "value": "registered.authority" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3932, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3918, - "src": "50437:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3934, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3918, - "src": "50463:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3935, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3920, - "src": "50469:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3933, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "50443:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50443:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3931, - "name": "getFirmFromAuthority", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "50416:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_string_memory_ptr_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (string memory)" - } - }, - "id": 3937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50416:71:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3939, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3918, - "src": "50509:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 3940, - "name": "authorityAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3920, - "src": "50515:16:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3938, - "name": "getForwardedAccount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "50489:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_address_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (address)" - } - }, - "id": 3941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50489:43:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_75a42ea06d3299a2953ccbaab4d8e13f13b520ba22f4196b6100af6c29e6e5cc", - "typeString": "literal_string \"registered.authority\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3928, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "50375:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "50375:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50375:158:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3927, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "50365:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50365:169:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "50352:182:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3948, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3926, - "src": "50568:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3945, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3918, - "src": "50547:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3946, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "50547:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "50547:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "50547:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3924, - "id": 3950, - "nodeType": "Return", - "src": "50540:31:8" - } - ] - }, - "documentation": "@notice Return if an authority address is registered\n@dev | This also checks the status of the registered issuer firm\n@param self Internal storage proxying TokenIOStorage contract\n@param authorityAddress Ethereum address of the firm authority to query\n@return { \"registered\" : \"Return if the authority is registered\" }", - "id": 3952, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isRegisteredAuthority", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3921, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3918, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3952, - "src": "50261:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3917, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "50261:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3920, - "name": "authorityAddress", - "nodeType": "VariableDeclaration", - "scope": 3952, - "src": "50280:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3919, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "50280:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50260:45:8" - }, - "payable": false, - "returnParameters": { - "id": 3924, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3923, - "name": "registered", - "nodeType": "VariableDeclaration", - "scope": 3952, - "src": "50329:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3922, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "50329:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50328:17:8" - }, - "scope": 4606, - "src": "50230:346:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3977, - "nodeType": "Block", - "src": "51021:109:8", - "statements": [ - { - "assignments": [ - 3962 - ], - "declarations": [ - { - "constant": false, - "id": 3962, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 3978, - "src": "51027:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3961, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51027:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3970, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74782e737461747573", - "id": 3966, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51067:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - "value": "tx.status" - }, - { - "argumentTypes": null, - "id": 3967, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3956, - "src": "51080:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 3964, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "51050:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "51050:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51050:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3963, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "51040:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51040:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "51027:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3974, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3962, - "src": "51122:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3971, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3954, - "src": "51101:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 3972, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "51101:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 3973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "51101:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 3975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51101:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3960, - "id": 3976, - "nodeType": "Return", - "src": "51094:31:8" - } - ] - }, - "documentation": "@notice Return boolean transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return {\"txStatus\": \"Returns true if the tx hash has already been set using `setTxStatus()` method\"}", - "id": 3978, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getTxStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3957, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3954, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 3978, - "src": "50948:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3953, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "50948:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3956, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 3978, - "src": "50967:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3955, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "50967:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "50947:35:8" - }, - "payable": false, - "returnParameters": { - "id": 3960, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3959, - "name": "txStatus", - "nodeType": "VariableDeclaration", - "scope": 3978, - "src": "51006:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3958, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "51006:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51005:15:8" - }, - "scope": 4606, - "src": "50927:203:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4018, - "nodeType": "Block", - "src": "51539:486:8", - "statements": [ - { - "assignments": [ - 3988 - ], - "declarations": [ - { - "constant": false, - "id": 3988, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4019, - "src": "51545:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3987, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51545:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3996, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74782e737461747573", - "id": 3992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51585:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - "value": "tx.status" - }, - { - "argumentTypes": null, - "id": 3993, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3982, - "src": "51598:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6741377b69c3e695119e3c3557de4d20ca1c342ada345d105444d0663b64de02", - "typeString": "literal_string \"tx.status\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 3990, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "51568:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3991, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "51568:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 3994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51568:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3989, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "51558:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 3995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51558:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "51545:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "51675:26:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3999, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3980, - "src": "51688:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4000, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3982, - "src": "51694:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 3998, - "name": "getTxStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3978, - "src": "51676:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) view returns (bool)" - } - }, - "id": 4001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51676:25:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205472616e73616374696f6e20737461747573206d7573742062652066616c7365206265666f72652073657474696e6720746865207472616e73616374696f6e207374617475732e", - "id": 4003, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51709:80:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", - "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" - }, - "value": "Error: Transaction status must be false before setting the transaction status." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6b6b44c02ad373ae1a352e2f774020c56e7682f4606dc72abe42fabe2146ecd", - "typeString": "literal_string \"Error: Transaction status must be false before setting the transaction status.\"" - } - ], - "id": 3997, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "51667:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51667:123:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4005, - "nodeType": "ExpressionStatement", - "src": "51667:123:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4010, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3988, - "src": "51877:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51881:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4007, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3980, - "src": "51856:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4008, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "51856:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "51856:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 4012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51856:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e74726163742068617320616c6c6f776564207065726d697373696f6e7320776974682073746f7261676520636f6e74726163742e", - "id": 4013, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "51894:107:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22dded7af558dce305746e9041fe35975da42d48e013cb3d33f15c4dacc60563", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract.\"" - } - ], - "id": 4006, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "51848:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4014, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "51848:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4015, - "nodeType": "ExpressionStatement", - "src": "51848:154:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4016, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "52016:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3986, - "id": 4017, - "nodeType": "Return", - "src": "52009:11:8" - } - ] - }, - "documentation": "@notice Set transaction status if the transaction has been used\n@param self Internal storage proxying TokenIOStorage contract\n@param txHash keccak256 ABI tightly packed encoded hash digest of tx params\n@return { \"success\" : \"Return true if successfully called from another contract\" }", - "id": 4019, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setTxStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3983, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3980, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4019, - "src": "51472:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 3979, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "51472:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3982, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 4019, - "src": "51491:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3981, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "51491:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51471:35:8" - }, - "payable": false, - "returnParameters": { - "id": 3986, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3985, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4019, - "src": "51525:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3984, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "51525:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "51524:14:8" - }, - "scope": 4606, - "src": "51451:574:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4132, - "nodeType": "Block", - "src": "53345:1436:8", - "statements": [ - { - "assignments": [ - 4045 - ], - "declarations": [ - { - "constant": false, - "id": 4045, - "name": "fxTxHash", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53352:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4044, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53352:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4057, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4049, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "53398:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4050, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4025, - "src": "53409:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4051, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4027, - "src": "53418:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4052, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4029, - "src": "53427:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4053, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4031, - "src": "53435:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4054, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "53443:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4047, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "53381:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "53381:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53381:73:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4046, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "53371:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4056, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53371:84:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "53352:103:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4060, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4021, - "src": "53628:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4061, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "53634:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "53634:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4063, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "53646:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4059, - "name": "verifyAccounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3018, - "src": "53613:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,address) view returns (bool)" - } - }, - "id": 4064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53613:43:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204f6e6c79207665726966696564206163636f756e74732063616e20706572666f726d2063757272656e63792073776170732e", - "id": 4065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "53664:59:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", - "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" - }, - "value": "Error: Only verified accounts can perform currency swaps." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2d5476fa8f300d3e5ff26716022f2312fb75aeda0809a8a0c344ea177dc90fef", - "typeString": "literal_string \"Error: Only verified accounts can perform currency swaps.\"" - } - ], - "id": 4058, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "53598:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53598:126:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4067, - "nodeType": "ExpressionStatement", - "src": "53598:126:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4070, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4021, - "src": "53848:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4071, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "53854:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4069, - "name": "setTxStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4019, - "src": "53836:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,bytes32) returns (bool)" - } - }, - "id": 4072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53836:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204661696c656420746f20736574207472616e73616374696f6e2073746174757320746f2066756c66696c6c65642e", - "id": 4073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "53871:55:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", - "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" - }, - "value": "Error: Failed to set transaction status to fulfilled." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_306a216decb1ab106261ea4f2fb5c8c78c42b91a5dd348d24976dfa5040b5edc", - "typeString": "literal_string \"Error: Failed to set transaction status to fulfilled.\"" - } - ], - "id": 4068, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "53821:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53821:106:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4075, - "nodeType": "ExpressionStatement", - "src": "53821:106:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4077, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "53992:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4078, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5242, - "src": "54006:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "53992:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a205472616e73616374696f6e20686173206578706972656421", - "id": 4080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54011:33:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", - "typeString": "literal_string \"Error: Transaction has expired!\"" - }, - "value": "Error: Transaction has expired!" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7f18c4ffb4d36eb74b7fd6eefa13eb81c9c972b7902a33fe3ecf489aa3a91620", - "typeString": "literal_string \"Error: Transaction has expired!\"" - } - ], - "id": 4076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "53984:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "53984:61:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4082, - "nodeType": "ExpressionStatement", - "src": "53984:61:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4085, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "54205:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4086, - "name": "sigV", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4033, - "src": "54215:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 4087, - "name": "sigR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4035, - "src": "54221:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4088, - "name": "sigS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "54227:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4084, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5232, - "src": "54195:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 4089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54195:37:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4090, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "54236:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "54195:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204164647265737320646572697665642066726f6d207472616e73616374696f6e207369676e617475726520646f6573206e6f74206d6174636820746865207265717565737465722061646472657373", - "id": 4092, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54253:88:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", - "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" - }, - "value": "Error: Address derived from transaction signature does not match the requester address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9e0795ab6551e9eece179272edb0adbc438af1b7f84b0e5b0b3693a1116ead9a", - "typeString": "literal_string \"Error: Address derived from transaction signature does not match the requester address\"" - } - ], - "id": 4083, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "54180:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54180:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4094, - "nodeType": "ExpressionStatement", - "src": "54180:162:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4097, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4021, - "src": "54436:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4098, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4025, - "src": "54442:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4099, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "54451:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "54451:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4101, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "54463:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4102, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4029, - "src": "54474:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 4103, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54482:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - } - ], - "id": 4096, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "54422:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 4104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54422:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 4105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54496:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 4095, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "54407:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54407:135:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4107, - "nodeType": "ExpressionStatement", - "src": "54407:135:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4110, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4021, - "src": "54578:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4111, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4027, - "src": "54584:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4112, - "name": "requester", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4023, - "src": "54593:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4113, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5240, - "src": "54604:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "54604:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4115, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4031, - "src": "54616:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 4116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54624:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810", - "typeString": "literal_string \"0x0\"" - } - ], - "id": 4109, - "name": "forceTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3335, - "src": "54564:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory,address,address,uint256,bytes memory) returns (bool)" - } - }, - "id": 4117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54564:66:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207472616e736665722066756e647320746f206163636f756e742e", - "id": 4118, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54638:45:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - }, - "value": "Error: Unable to transfer funds to account." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_da1ba7df7890c8b56e087dbc0a047a645ebce90ed730f864d8cca9e613f4dfba", - "typeString": "literal_string \"Error: Unable to transfer funds to account.\"" - } - ], - "id": 4108, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "54549:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54549:135:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4120, - "nodeType": "ExpressionStatement", - "src": "54549:135:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4122, - "name": "symbolA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4025, - "src": "54703:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4123, - "name": "symbolB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4027, - "src": "54712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4124, - "name": "valueA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4029, - "src": "54721:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4125, - "name": "valueB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4031, - "src": "54729:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4126, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "54737:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4127, - "name": "fxTxHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4045, - "src": "54749:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4121, - "name": "FxSwap", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1700, - "src": "54696:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", - "typeString": "function (string memory,string memory,uint256,uint256,uint256,bytes32)" - } - }, - "id": 4128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "54696:62:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4129, - "nodeType": "EmitStatement", - "src": "54691:67:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4130, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "54772:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4043, - "id": 4131, - "nodeType": "Return", - "src": "54765:11:8" - } - ] - }, - "documentation": "@notice Accepts a signed fx request to swap currency pairs at a given amount;\n@dev | This method can be called directly between peers\n@dev | This method does not take transaction fees from the swap\n@param self Internal storage proxying TokenIOStorage contract\n@param requester address Requester is the orginator of the offer and must\nmatch the signature of the payload submitted by the fulfiller\n@param symbolA Symbol of the currency desired\n@param symbolB Symbol of the currency offered\n@param valueA Amount of the currency desired\n@param valueB Amount of the currency offered\n@param sigV Ethereum secp256k1 signature V value; used by ecrecover()\n@param sigR Ethereum secp256k1 signature R value; used by ecrecover()\n@param sigS Ethereum secp256k1 signature S value; used by ecrecover()\n@param expiration Expiration of the offer; Offer is good until expired\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", - "id": 4133, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "execSwap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4021, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53121:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4020, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "53121:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4023, - "name": "requester", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53144:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4022, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "53144:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4025, - "name": "symbolA", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53167:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4024, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "53167:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4027, - "name": "symbolB", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53187:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4026, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "53187:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4029, - "name": "valueA", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53207:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4028, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53207:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4031, - "name": "valueB", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53224:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4030, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53224:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4033, - "name": "sigV", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53241:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4032, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "53241:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4035, - "name": "sigR", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53257:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4034, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53257:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4037, - "name": "sigS", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53275:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4036, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "53275:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4039, - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53293:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4038, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "53293:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "53115:197:8" - }, - "payable": false, - "returnParameters": { - "id": 4043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4042, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4133, - "src": "53331:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4041, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "53331:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "53330:14:8" - }, - "scope": 4606, - "src": "53098:1683:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4171, - "nodeType": "Block", - "src": "55334:350:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4143, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4137, - "src": "55348:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 4144, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55367:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "55348:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a2063616e6e6f74206465707265636174652061206e756c6c20616464726573732e", - "id": 4146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55380:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", - "typeString": "literal_string \"Error: cannot deprecate a null address.\"" - }, - "value": "Error: cannot deprecate a null address." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e6a22bcb54a93c443cfe56eb9f702a51c6c475f1275ab9e48822b3a19c8e3cad", - "typeString": "literal_string \"Error: cannot deprecate a null address.\"" - } - ], - "id": 4142, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "55340:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55340:82:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4148, - "nodeType": "ExpressionStatement", - "src": "55340:82:8" - }, - { - "assignments": [ - 4150 - ], - "declarations": [ - { - "constant": false, - "id": 4150, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4172, - "src": "55429:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4149, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "55429:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4158, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6465706372656361746564", - "id": 4154, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55469:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - "value": "depcrecated" - }, - { - "argumentTypes": null, - "id": 4155, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4137, - "src": "55484:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "55452:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "55452:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55452:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4151, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "55442:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55442:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "55429:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4163, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4150, - "src": "55537:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55541:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4160, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4135, - "src": "55516:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4161, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "55516:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5030, - "src": "55516:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bool_$returns$_t_bool_$", - "typeString": "function (bytes32,bool) external returns (bool)" - } - }, - "id": 4165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55516:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55554:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4159, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "55508:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "55508:153:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4168, - "nodeType": "ExpressionStatement", - "src": "55508:153:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "55675:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4141, - "id": 4170, - "nodeType": "Return", - "src": "55668:11:8" - } - ] - }, - "documentation": "@notice Deprecate a contract interface\n@dev | This is a low-level method to deprecate a contract interface.\n@dev | This is useful if the interface needs to be updated or becomes out of date\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"success\" : \"Returns true if successfully called from another contract\"}", - "id": 4172, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setDeprecatedContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4138, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4135, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4172, - "src": "55258:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4134, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "55258:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4137, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 4172, - "src": "55277:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4136, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "55277:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "55257:44:8" - }, - "payable": false, - "returnParameters": { - "id": 4141, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4140, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4172, - "src": "55320:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4139, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "55320:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "55319:14:8" - }, - "scope": 4606, - "src": "55227:457:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4197, - "nodeType": "Block", - "src": "56098:120:8", - "statements": [ - { - "assignments": [ - 4182 - ], - "declarations": [ - { - "constant": false, - "id": 4182, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4198, - "src": "56104:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4181, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "56104:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4190, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6465706372656361746564", - "id": 4186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56144:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - "value": "depcrecated" - }, - { - "argumentTypes": null, - "id": 4187, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4176, - "src": "56159:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6f45f48a298a20344cb7118778f636c99a71d88738a0a1718ae9d6ccf3894384", - "typeString": "literal_string \"depcrecated\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4184, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "56127:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4185, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "56127:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56127:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4183, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "56117:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56117:59:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "56104:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4194, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4182, - "src": "56210:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4191, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4174, - "src": "56189:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4192, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "56189:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getBool", - "nodeType": "MemberAccess", - "referencedDeclaration": 5212, - "src": "56189:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 4195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56189:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 4180, - "id": 4196, - "nodeType": "Return", - "src": "56182:31:8" - } - ] - }, - "documentation": "@notice Return the deprecation status of a contract\n@param self Internal storage proxying TokenIOStorage contract\n@param contractAddress Ethereum address of the contract interface\n@return {\"status\" : \"Return deprecation status (true/false) of the contract interface\"}", - "id": 4198, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isContractDeprecated", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4177, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4174, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4198, - "src": "56018:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4173, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "56018:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4176, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 4198, - "src": "56037:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4175, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "56037:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56017:44:8" - }, - "payable": false, - "returnParameters": { - "id": 4180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4179, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 4198, - "src": "56085:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4178, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "56085:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56084:13:8" - }, - "scope": 4606, - "src": "55988:230:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4231, - "nodeType": "Block", - "src": "56741:264:8", - "statements": [ - { - "assignments": [ - 4210 - ], - "declarations": [ - { - "constant": false, - "id": 4210, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56747:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4209, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "56747:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4218, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6c696d69742e7370656e64696e672e706572696f64", - "id": 4214, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56787:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - "value": "limit.spending.period" - }, - { - "argumentTypes": null, - "id": 4215, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4202, - "src": "56812:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4212, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "56770:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4213, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "56770:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56770:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4211, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "56760:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56760:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "56747:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4223, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4210, - "src": "56856:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4224, - "name": "period", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4204, - "src": "56860:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4220, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4200, - "src": "56835:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4221, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "56835:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "56835:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56835:32:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56875:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4219, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "56827:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "56827:155:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4228, - "nodeType": "ExpressionStatement", - "src": "56827:155:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "56996:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4208, - "id": 4230, - "nodeType": "Return", - "src": "56989:11:8" - } - ] - }, - "documentation": "@notice Set the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param period Unix timestamp of the spending period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4232, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4205, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4200, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56660:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4199, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "56660:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4202, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56679:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4201, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "56679:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4204, - "name": "period", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56696:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4203, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "56696:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56659:49:8" - }, - "payable": false, - "returnParameters": { - "id": 4208, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4207, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4232, - "src": "56727:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4206, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "56727:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "56726:14:8" - }, - "scope": 4606, - "src": "56626:379:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4257, - "nodeType": "Block", - "src": "57590:122:8", - "statements": [ - { - "assignments": [ - 4242 - ], - "declarations": [ - { - "constant": false, - "id": 4242, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4258, - "src": "57596:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4241, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "57596:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4250, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6c696d69742e7370656e64696e672e706572696f64", - "id": 4246, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "57636:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - "value": "limit.spending.period" - }, - { - "argumentTypes": null, - "id": 4247, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4236, - "src": "57661:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b7f44dbc2be97fd1a0b2754c1714e68f777a3ad95cacd0c84e9127a6195b8cae", - "typeString": "literal_string \"limit.spending.period\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4244, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "57619:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4245, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "57619:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57619:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4243, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "57609:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57609:61:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "57596:74:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4254, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4242, - "src": "57704:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4251, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4234, - "src": "57683:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4252, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "57683:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "57683:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "57683:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4240, - "id": 4256, - "nodeType": "Return", - "src": "57676:31:8" - } - ] - }, - "documentation": "@notice Get the Account Spending Period Limit as UNIX timestamp\n@dev | Each account has it's own daily spending limit\n@dev | If the current spending period has expired, it will be set upon next `transfer()`\nor `transferFrom()` request\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"period\" : \"Returns Unix timestamp of the current spending period\"}", - "id": 4258, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4234, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4258, - "src": "57518:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4233, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "57518:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4236, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4258, - "src": "57537:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4235, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "57537:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "57517:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4240, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4239, - "name": "period", - "nodeType": "VariableDeclaration", - "scope": 4258, - "src": "57577:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4238, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "57577:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "57576:13:8" - }, - "scope": 4606, - "src": "57484:228:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4291, - "nodeType": "Block", - "src": "58198:264:8", - "statements": [ - { - "assignments": [ - 4270 - ], - "declarations": [ - { - "constant": false, - "id": 4270, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58204:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4269, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "58204:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4278, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", - "id": 4274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58244:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - "value": "account.spending.limit" - }, - { - "argumentTypes": null, - "id": 4275, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4262, - "src": "58270:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4272, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "58227:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "58227:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58227:51:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4271, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "58217:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58217:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "58204:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4283, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4270, - "src": "58314:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4284, - "name": "limit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4264, - "src": "58318:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4280, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4260, - "src": "58293:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4281, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "58293:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "58293:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58293:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4286, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58332:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4279, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "58285:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58285:154:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4288, - "nodeType": "ExpressionStatement", - "src": "58285:154:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58453:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4268, - "id": 4290, - "nodeType": "Return", - "src": "58446:11:8" - } - ] - }, - "documentation": "@notice Set the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param limit Spending limit amount\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4292, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingLimit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4265, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4260, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58118:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4259, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "58118:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4262, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58137:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4261, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "58137:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4264, - "name": "limit", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58154:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4263, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "58154:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58117:48:8" - }, - "payable": false, - "returnParameters": { - "id": 4268, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4267, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4292, - "src": "58184:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4266, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "58184:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58183:14:8" - }, - "scope": 4606, - "src": "58085:377:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4317, - "nodeType": "Block", - "src": "58887:123:8", - "statements": [ - { - "assignments": [ - 4302 - ], - "declarations": [ - { - "constant": false, - "id": 4302, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4318, - "src": "58893:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4301, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "58893:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4310, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e6c696d6974", - "id": 4306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "58933:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - "value": "account.spending.limit" - }, - { - "argumentTypes": null, - "id": 4307, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4296, - "src": "58959:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_25180818ea9cb099281c5ce274acca768b81a67b86109a573c594e5a1221c40e", - "typeString": "literal_string \"account.spending.limit\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4304, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "58916:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "58916:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58916:51:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4303, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "58906:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58906:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "58893:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4314, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4302, - "src": "59002:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4311, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294, - "src": "58981:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4312, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "58981:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "58981:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "58981:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4300, - "id": 4316, - "nodeType": "Return", - "src": "58974:31:8" - } - ] - }, - "documentation": "@notice Get the account spending limit amount\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"limit\" : \"Returns the account spending limit amount\"}", - "id": 4318, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingLimit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4294, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4318, - "src": "58816:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4293, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "58816:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4296, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4318, - "src": "58835:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4295, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "58835:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58815:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4300, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4299, - "name": "limit", - "nodeType": "VariableDeclaration", - "scope": 4318, - "src": "58875:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4298, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "58875:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "58874:12:8" - }, - "scope": 4606, - "src": "58783:227:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4383, - "nodeType": "Block", - "src": "59710:887:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4331, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "59844:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4332, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "59850:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4330, - "name": "updateAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4441, - "src": "59816:27:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) returns (bool)" - } - }, - "id": 4333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59816:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4334, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "59866:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4329, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "59808:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59808:109:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4336, - "nodeType": "ExpressionStatement", - "src": "59808:109:8" - }, - { - "assignments": [ - 4338 - ], - "declarations": [ - { - "constant": false, - "id": 4338, - "name": "updatedAmount", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59924:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4337, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "59924:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4346, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4344, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4324, - "src": "59989:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4340, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "59970:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4341, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "59976:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4339, - "name": "getAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4471, - "src": "59945:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59945:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "59945:43:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "59945:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "59924:72:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4349, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "60126:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4350, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "60132:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4348, - "name": "getAccountSpendingLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4318, - "src": "60102:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60102:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4352, - "name": "updatedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60144:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "60102:55:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a204163636f756e742063616e6e6f742065786365656420697473206461696c79207370656e64206c696d69742e", - "id": 4354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60165:53:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", - "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" - }, - "value": "Error: Account cannot exceed its daily spend limit." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3616f04fc54939d89200b223e95722b2255260cce876359cce1a9810f761a370", - "typeString": "literal_string \"Error: Account cannot exceed its daily spend limit.\"" - } - ], - "id": 4347, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "60087:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60087:132:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4356, - "nodeType": "ExpressionStatement", - "src": "60087:132:8" - }, - { - "assignments": [ - 4358 - ], - "declarations": [ - { - "constant": false, - "id": 4358, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "60289:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4357, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "60289:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4370, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", - "id": 4362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60329:25:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - "value": "account.spending.amount" - }, - { - "argumentTypes": null, - "id": 4363, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "60356:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4365, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "60390:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4366, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "60396:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4364, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4258, - "src": "60365:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60365:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4360, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "60312:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "60312:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60312:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4359, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "60302:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60302:104:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "60289:117:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4375, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4358, - "src": "60441:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4376, - "name": "updatedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4338, - "src": "60445:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4372, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4320, - "src": "60420:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4373, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "60420:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "60420:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60420:39:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f207365742073746f726167652076616c75652e20506c6561736520656e7375726520636f6e747261637420696e7465726661636520697320616c6c6f776564206279207468652073746f7261676520636f6e74726163742e", - "id": 4378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60467:106:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - }, - "value": "Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4d1d7108c7333a64781f866e4207a24118cd496e91657d0979d473aed39c63dd", - "typeString": "literal_string \"Error: Unable to set storage value. Please ensure contract interface is allowed by the storage contract.\"" - } - ], - "id": 4371, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "60412:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "60412:162:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4380, - "nodeType": "ExpressionStatement", - "src": "60412:162:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4381, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "60588:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4328, - "id": 4382, - "nodeType": "Return", - "src": "60581:11:8" - } - ] - }, - "documentation": "@notice Set the account spending amount for the daily period\n@dev | Each account has it's own daily spending limit\n@dev | This transaction will throw if the new spending amount is greater than the limit\n@dev | This method is called in the `transfer()` and `transferFrom()` methods\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@param amount Set the amount spent for the daily period\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4384, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setAccountSpendingAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4325, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4320, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59629:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4319, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "59629:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4322, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59648:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4321, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "59648:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4324, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59665:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4323, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "59665:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59628:49:8" - }, - "payable": false, - "returnParameters": { - "id": 4328, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4327, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4384, - "src": "59696:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4326, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "59696:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59695:14:8" - }, - "scope": 4606, - "src": "59595:1002:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4440, - "nodeType": "Block", - "src": "61157:398:8", - "statements": [ - { - "assignments": [ - 4394 - ], - "declarations": [ - { - "constant": false, - "id": 4394, - "name": "begDate", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61163:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4393, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "61163:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4399, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4396, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4386, - "src": "61203:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4397, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4388, - "src": "61209:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4395, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4258, - "src": "61178:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61178:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "61163:54:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4400, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4394, - "src": "61227:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 4401, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5242, - "src": "61237:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "61227:13:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 4438, - "nodeType": "Block", - "src": "61274:277:8", - "statements": [ - { - "assignments": [ - 4407 - ], - "declarations": [ - { - "constant": false, - "id": 4407, - "name": "duration", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61282:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4406, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "61282:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4409, - "initialValue": { - "argumentTypes": null, - "hexValue": "3836343030", - "id": 4408, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61298:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "86400" - }, - "nodeType": "VariableDeclarationStatement", - "src": "61282:21:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4412, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4386, - "src": "61379:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4413, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4388, - "src": "61385:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4429, - "name": "duration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4407, - "src": "61452:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 4425, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61444:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4422, - "name": "duration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4407, - "src": "61430:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4418, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4394, - "src": "61416:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4416, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5242, - "src": "61408:3:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "61408:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61408:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4420, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "61407:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "61407:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61407:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "61407:36:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61407:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4427, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "61406:41:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "61406:45:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61406:55:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4414, - "name": "begDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4394, - "src": "61394:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 284, - "src": "61394:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61394:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 4411, - "name": "setAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4232, - "src": "61354:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$1630_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address,uint256) returns (bool)" - } - }, - "id": 4432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61354:109:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61473:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4410, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "61337:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "61337:187:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4435, - "nodeType": "ExpressionStatement", - "src": "61337:187:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4436, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61540:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4392, - "id": 4437, - "nodeType": "Return", - "src": "61533:11:8" - } - ] - }, - "id": 4439, - "nodeType": "IfStatement", - "src": "61223:328:8", - "trueBody": { - "id": 4405, - "nodeType": "Block", - "src": "61242:26:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4403, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "61257:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4392, - "id": 4404, - "nodeType": "Return", - "src": "61250:11:8" - } - ] - } - } - ] - }, - "documentation": "@notice Low-level API to ensure the account spending period is always current\n@dev | This method is internally called by `setAccountSpendingAmount()` to ensure\nspending period is always the most current daily period.\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"success\" : \"Returns true is successfully called from a contract\"}", - "id": 4441, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "updateAccountSpendingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4389, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4386, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61089:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4385, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "61089:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4388, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61108:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61108:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61088:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4392, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4391, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4441, - "src": "61143:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4390, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "61143:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61142:14:8" - }, - "scope": 4606, - "src": "61052:503:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4470, - "nodeType": "Block", - "src": "62019:165:8", - "statements": [ - { - "assignments": [ - 4451 - ], - "declarations": [ - { - "constant": false, - "id": 4451, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4471, - "src": "62025:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4450, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "62025:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4463, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "6163636f756e742e7370656e64696e672e616d6f756e74", - "id": 4455, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "62065:25:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - "value": "account.spending.amount" - }, - { - "argumentTypes": null, - "id": 4456, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4445, - "src": "62092:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4458, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4443, - "src": "62126:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4459, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4445, - "src": "62132:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4457, - "name": "getAccountSpendingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4258, - "src": "62101:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62101:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_7115572a5b80a92d701ce33707142575689f9f2ec0574945d16643a4377866a6", - "typeString": "literal_string \"account.spending.amount\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4453, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "62048:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4454, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "62048:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62048:93:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4452, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "62038:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62038:104:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "62025:117:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4467, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4451, - "src": "62176:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4464, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4443, - "src": "62155:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4465, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "62155:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "62155:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62155:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4449, - "id": 4469, - "nodeType": "Return", - "src": "62148:31:8" - } - ] - }, - "documentation": "@notice Return the amount spent during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount spent by the account during the current period\"}", - "id": 4471, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4446, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4443, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4471, - "src": "61947:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4442, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "61947:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4445, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4471, - "src": "61966:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4444, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61966:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "61946:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4449, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4448, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4471, - "src": "62006:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4447, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "62006:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62005:13:8" - }, - "scope": 4606, - "src": "61913:271:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4491, - "nodeType": "Block", - "src": "62667:101:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4486, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4473, - "src": "62748:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4487, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4475, - "src": "62754:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4485, - "name": "getAccountSpendingAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4471, - "src": "62723:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62723:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4481, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4473, - "src": "62704:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4482, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4475, - "src": "62710:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4480, - "name": "getAccountSpendingLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4318, - "src": "62680:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_address_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,address) view returns (uint256)" - } - }, - "id": 4483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62680:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 259, - "src": "62680:42:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "62680:83:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4479, - "id": 4490, - "nodeType": "Return", - "src": "62673:90:8" - } - ] - }, - "documentation": "@notice Return the amount remaining during the current period\n@dev | Each account has it's own daily spending limit\n@param self Internal storage proxying TokenIOStorage contract\n@param account Ethereum address of the account holder\n@return {\"amount\" : \"Returns the amount remaining by the account during the current period\"}", - "id": 4492, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getAccountSpendingRemaining", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4476, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4473, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4492, - "src": "62587:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4472, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "62587:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4475, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4492, - "src": "62606:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4474, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "62606:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62586:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4479, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4478, - "name": "remainingLimit", - "nodeType": "VariableDeclaration", - "scope": 4492, - "src": "62646:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4477, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "62646:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62645:21:8" - }, - "scope": 4606, - "src": "62550:218:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4525, - "nodeType": "Block", - "src": "63361:207:8", - "statements": [ - { - "assignments": [ - 4504 - ], - "declarations": [ - { - "constant": false, - "id": 4504, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63367:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4503, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "63367:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4512, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66782e7573642e72617465", - "id": 4508, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63407:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - "value": "fx.usd.rate" - }, - { - "argumentTypes": null, - "id": 4509, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4496, - "src": "63422:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4506, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "63390:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4507, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "63390:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63390:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4505, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "63380:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63380:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "63367:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4517, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4504, - "src": "63474:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4518, - "name": "bpsRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4498, - "src": "63478:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4514, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4494, - "src": "63453:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4515, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "63453:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 4970, - "src": "63453:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (bytes32,uint256) external returns (bool)" - } - }, - "id": 4519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63453:33:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4572726f723a20556e61626c6520746f20757064617465206163636f756e74207370656e64696e6720706572696f642e", - "id": 4520, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63494:50:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - }, - "value": "Error: Unable to update account spending period." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92c0be692062dbe2524cc8f576f74245e5149f852c7120e3a07f04f2a9c0584b", - "typeString": "literal_string \"Error: Unable to update account spending period.\"" - } - ], - "id": 4513, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5243, - 5244 - ], - "referencedDeclaration": 5244, - "src": "63438:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63438:107:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4522, - "nodeType": "ExpressionStatement", - "src": "63438:107:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4523, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "63559:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4502, - "id": 4524, - "nodeType": "Return", - "src": "63552:11:8" - } - ] - }, - "documentation": "@notice Set the foreign currency exchange rate to USD in basis points\n@dev | This value should always be relative to USD pair; e.g. JPY/USD, GBP/USD, etc.\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param bpsRate Basis point rate of foreign currency exchange rate to USD\n@return { \"success\": \"Returns true if successfully called from another contract\"}", - "id": 4526, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setFxUSDBPSRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4499, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4494, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63279:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4493, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "63279:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4496, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63298:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4495, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "63298:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4498, - "name": "bpsRate", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63315:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4497, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "63315:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63278:50:8" - }, - "payable": false, - "returnParameters": { - "id": 4502, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4501, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4526, - "src": "63347:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4500, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "63347:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63346:14:8" - }, - "scope": 4606, - "src": "63254:314:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4551, - "nodeType": "Block", - "src": "63974:113:8", - "statements": [ - { - "assignments": [ - 4536 - ], - "declarations": [ - { - "constant": false, - "id": 4536, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 4552, - "src": "63980:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4535, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "63980:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4544, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66782e7573642e72617465", - "id": 4540, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64020:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - "value": "fx.usd.rate" - }, - { - "argumentTypes": null, - "id": 4541, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4530, - "src": "64035:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_508f4880798ccd7104a22fcf619ddce77b3cfa9b331c7cf9275f5a4c7527275c", - "typeString": "literal_string \"fx.usd.rate\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4538, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5227, - "src": "64003:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "64003:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 4542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64003:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4537, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5234, - "src": "63993:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 4543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "63993:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "63980:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4548, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4536, - "src": "64079:2:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4545, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4528, - "src": "64058:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - "id": 4546, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "Storage", - "nodeType": "MemberAccess", - "referencedDeclaration": 1629, - "src": "64058:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TokenIOStorage_$5225", - "typeString": "contract TokenIOStorage" - } - }, - "id": 4547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUint", - "nodeType": "MemberAccess", - "referencedDeclaration": 5176, - "src": "64058:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view external returns (uint256)" - } - }, - "id": 4549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64058:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4534, - "id": 4550, - "nodeType": "Return", - "src": "64051:31:8" - } - ] - }, - "documentation": "@notice Return the foreign currency USD exchanged amount in basis points\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@return {\"usdAmount\" : \"Returns the foreign currency amount in USD\"}", - "id": 4552, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFxUSDBPSRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4531, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4528, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4552, - "src": "63901:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4527, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "63901:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4530, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4552, - "src": "63920:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4529, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "63920:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63900:36:8" - }, - "payable": false, - "returnParameters": { - "id": 4534, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4533, - "name": "bpsRate", - "nodeType": "VariableDeclaration", - "scope": 4552, - "src": "63960:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4532, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "63960:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "63959:14:8" - }, - "scope": 4606, - "src": "63876:211:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4604, - "nodeType": "Block", - "src": "64556:330:8", - "statements": [ - { - "assignments": [ - 4564 - ], - "declarations": [ - { - "constant": false, - "id": 4564, - "name": "usdDecimals", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64562:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4563, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64562:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4569, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4566, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4554, - "src": "64598:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "hexValue": "55534478", - "id": 4567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64604:6:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", - "typeString": "literal_string \"USDx\"" - }, - "value": "USDx" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_stringliteral_0b578d2346a4fcbd9695c06fa0894a84b168dee176474e03cac413d348199809", - "typeString": "literal_string \"USDx\"" - } - ], - "id": 4565, - "name": "getTokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2496, - "src": "64581:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64581:30:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64562:49:8" - }, - { - "assignments": [ - 4571 - ], - "declarations": [ - { - "constant": false, - "id": 4571, - "name": "fxDecimals", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64617:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4570, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64617:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4576, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4573, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4554, - "src": "64652:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4574, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4556, - "src": "64658:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4572, - "name": "getTokenDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2496, - "src": "64635:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64635:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64617:50:8" - }, - { - "assignments": [ - 4578 - ], - "declarations": [ - { - "constant": false, - "id": 4578, - "name": "usdAmount", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64741:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4577, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64741:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4601, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 4597, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64844:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "id": 4598, - "name": "fxDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4571, - "src": "64848:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "64844:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 4591, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64822:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "id": 4592, - "name": "usdDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4564, - "src": "64826:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "64822:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3130303030", - "id": 4587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "64810:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - }, - "value": "10000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_10000_by_1", - "typeString": "int_const 10000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4582, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4554, - "src": "64789:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - } - }, - { - "argumentTypes": null, - "id": 4583, - "name": "currency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4556, - "src": "64795:8:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data storage pointer" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4581, - "name": "getFxUSDBPSRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4552, - "src": "64773:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$1630_storage_ptr_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (struct TokenIOLib.Data storage pointer,string memory) view returns (uint256)" - } - }, - "id": 4584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64773:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4579, - "name": "fxAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4558, - "src": "64760:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "64760:12:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64760:45:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "64760:49:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64760:56:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4589, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "64759:58:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 220, - "src": "64759:62:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64759:79:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4595, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "64758:81:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 238, - "src": "64758:85:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 4600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "64758:101:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "64741:118:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 4602, - "name": "usdAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4578, - "src": "64872:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4562, - "id": 4603, - "nodeType": "Return", - "src": "64865:16:8" - } - ] - }, - "documentation": "@notice Return the foreign currency USD exchanged amount\n@param self Internal storage proxying TokenIOStorage contract\n@param currency The TokenIO currency symbol (e.g. USDx, JPYx, GBPx)\n@param fxAmount Amount of foreign currency to exchange into USD\n@return {\"amount\" : \"Returns the foreign currency amount in USD\"}", - "id": 4605, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getFxUSDAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4559, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4554, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64469:17:8", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - }, - "typeName": { - "contractScope": null, - "id": 4553, - "name": "Data", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1630, - "src": "64469:4:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Data_$1630_storage_ptr", - "typeString": "struct TokenIOLib.Data" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4556, - "name": "currency", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64488:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4555, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "64488:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4558, - "name": "fxAmount", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64505:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4557, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64505:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "64468:51:8" - }, - "payable": false, - "returnParameters": { - "id": 4562, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4561, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4605, - "src": "64543:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4560, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "64543:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "64542:13:8" - }, - "scope": 4606, - "src": "64445:441:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4607, - "src": "898:63992:8" - } - ], - "src": "0:64891:8" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": { - "1": { - "events": {}, - "links": {}, - "address": "0xc418e6ebf1bdf0063b2c91128fd89b653d9f0a6a", - "transactionHash": "0xf109fddc82f116988d60142b52a85aa379162a6ce98139a08a1f7edfb786abfc" - }, - "4447": { - "events": {}, - "links": {}, - "address": "0xf25186b5081ff5ce73482ad761db0eb0d25abfbf", - "transactionHash": "0xc4608ab1e3304d6d0bfca4f8267084ed8c4facc883347950bd99b1dd6a24f0c0" - } - }, - "schemaVersion": "2.0.1", - "updatedAt": "2018-10-24T17:02:25.571Z" -} \ No newline at end of file diff --git a/package.json b/package.json index 2f11012..561033b 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,9 @@ }, "devDependencies": { "dotenv": "^6.2.0", - "solc": "^0.4.24", + "solc": "^0.5.2", "solmd": "^0.3.0", - "truffle": "^4.1.12", + "truffle": "5.0.2", "truffle-hdwallet-provider": "0.0.5" } } diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js index 9b390a9..ffe7893 100644 --- a/test/TokenIOERC20FeesApply.js +++ b/test/TokenIOERC20FeesApply.js @@ -91,7 +91,7 @@ contract("TokenIOERC20FeesApply", function(accounts) { assert.equal(balance1, DEPOSIT_AMOUNT, "first account should contain all the deposit initially") assert.equal(balance2, 0, "Second account should have zero balance") - const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT, TEST_ACCOUNT_1) const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() const balance2b = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() @@ -123,7 +123,7 @@ contract("TokenIOERC20FeesApply", function(accounts) { const balance1a = +(await erc20.balanceOf(TEST_ACCOUNT_1)) const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_2)) - const approveReceipt = await erc20.approve(TEST_ACCOUNT_2, balance1a) + const approveReceipt = await erc20.approve(TEST_ACCOUNT_2, balance1a, TEST_ACCOUNT_1) const allowance = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() assert.notEqual(allowance, 0, "Allowance should not equal zero.") diff --git a/test/TokenIOStableSwap.js b/test/TokenIOStableSwap.js index ce0e5e9..19b5d65 100644 --- a/test/TokenIOStableSwap.js +++ b/test/TokenIOStableSwap.js @@ -65,6 +65,7 @@ contract("TokenIOStableSwap", function(accounts) { it("Should allow the swap between the requester and the contract", async () => { await SWAP.convert(USDC.address, USDX.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) + // const FEES = +(await USDC.calculateFees(SWAP_AMOUNT)) // NOTE: These fees only apply in testing due to Token X ERC20 dummy asset const SWAP_FEES = +(await SWAP.calcAssetFees(USDC.address, SWAP_AMOUNT)); const NET_AMOUNT = (SWAP_AMOUNT-SWAP_FEES); @@ -77,8 +78,6 @@ contract("TokenIOStableSwap", function(accounts) { const TEST_ACCOUNT_1_USDX_BALANCE = +(await USDX.balanceOf(TEST_ACCOUNT_1)).toString() assert.equal(TEST_ACCOUNT_1_USDX_BALANCE, CONVERTED_AMOUNT, "Requester balance should equal requester deposit amount for USDX contract") - - }) it("Should allow the swap between the requester and the contract in reverse", async () => { @@ -100,8 +99,6 @@ contract("TokenIOStableSwap", function(accounts) { +(await SWAP.calcAssetFees(USDC.address, SWAP_AMOUNT)) + +(await SWAP.calcAssetFees(USDC.address, CONVERTED_AMOUNT)) ), "Swap Balance of USDC should be equal to the swamp amount.") - - }) }); From 8360ce9a74119b5200bdfb6bbd4311888d4aa91c Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Wed, 20 Feb 2019 01:20:22 +0200 Subject: [PATCH 33/40] fix compilation errors --- contracts/TokenIOAuthorityProxy.sol | 22 ++++----- contracts/TokenIOCurrencyAuthorityProxy.sol | 30 ++++++------ contracts/TokenIOERC20.sol | 4 +- contracts/TokenIOERC20FeesApply.sol | 1 + contracts/TokenIOERC20FeesApplyProxy.sol | 46 ++++++++----------- contracts/TokenIOERC20Proxy.sol | 4 +- contracts/TokenIOERC20UnlimitedProxy.sol | 4 +- contracts/TokenIOFeeContractProxy.sol | 14 +++--- contracts/TokenIOLib.sol | 1 + contracts/TokenIOMerchantProxy.sol | 32 ++++++------- contracts/TokenIONameSpaceProxy.sol | 8 +--- contracts/TokenIOStableSwapProxy.sol | 28 +++++------ contracts/TokenIOStorage.sol | 2 +- .../{TokenIOProxy.sol => UpgradableProxy.sol} | 9 ++-- 14 files changed, 99 insertions(+), 106 deletions(-) rename contracts/{TokenIOProxy.sol => UpgradableProxy.sol} (90%) diff --git a/contracts/TokenIOAuthorityProxy.sol b/contracts/TokenIOAuthorityProxy.sol index 44d4c50..161b85b 100644 --- a/contracts/TokenIOAuthorityProxy.sol +++ b/contracts/TokenIOAuthorityProxy.sol @@ -2,20 +2,20 @@ pragma solidity 0.5.2; import "./Ownable.sol"; -interface TokenIOFeeContractI { - function setRegisteredFirm(string memory firmName, bool _authorized) public returns (bool success); +interface TokenIOAuthorityI { + function setRegisteredFirm(string calldata firmName, bool _authorized, address sender) external returns (bool success); - function setRegisteredAuthority(string memory firmName, address authority, bool _authorized) public returns (bool success); + function setRegisteredAuthority(string calldata firmName, address authority, bool _authorized, address sender) external returns (bool success); - function getFirmFromAuthority(address authority) public view returns (string memory firm); + function getFirmFromAuthority(address authority) external view returns (string memory firm); - function isRegisteredFirm(string memory firmName) public view returns (bool status); + function isRegisteredFirm(string calldata firmName) external view returns (bool status); - function isRegisteredToFirm(string memory firmName, address authority) public view returns (bool registered); + function isRegisteredToFirm(string calldata firmName, address authority) external view returns (bool registered); - function isRegisteredAuthority(address authority) public view returns (bool registered); + function isRegisteredAuthority(address authority) external view returns (bool registered); - function setMasterFeeContract(address feeContract) public returns (bool success); + function setMasterFeeContract(address feeContract) external returns (bool success); } contract TokenIOAuthorityProxy is Ownable { @@ -23,12 +23,12 @@ contract TokenIOAuthorityProxy is Ownable { TokenIOAuthorityI tokenIOAuthorityImpl; constructor(address _tokenIOAuthorityImpl) public { - tokenIOAuthorityImpl = TokenIOFeeContractI(_tokenIOAuthorityImpl); + tokenIOAuthorityImpl = TokenIOAuthorityI(_tokenIOAuthorityImpl); } function upgradeTokenImplamintation(address _newTokenIOAuthorityImpl) onlyOwner external { require(_newTokenIOAuthorityImpl != address(0)); - tokenIOAuthorityImpl = TokenIOFeeContractI(_newTokenIOAuthorityImpl); + tokenIOAuthorityImpl = TokenIOAuthorityI(_newTokenIOAuthorityImpl); } function setRegisteredFirm(string memory firmName, bool _authorized) public returns (bool success) { @@ -41,7 +41,7 @@ contract TokenIOAuthorityProxy is Ownable { function setRegisteredAuthority(string memory firmName, address authority, bool _authorized) public returns (bool success) { require( - tokenIOAuthorityImpl.setRegisteredAuthority(firmName, _authorized, msg.sender), + tokenIOAuthorityImpl.setRegisteredAuthority(firmName, authority, _authorized, msg.sender), "Unable to execute setRegisteredFirm" ); return true; diff --git a/contracts/TokenIOCurrencyAuthorityProxy.sol b/contracts/TokenIOCurrencyAuthorityProxy.sol index e37604a..aadcd05 100644 --- a/contracts/TokenIOCurrencyAuthorityProxy.sol +++ b/contracts/TokenIOCurrencyAuthorityProxy.sol @@ -3,31 +3,31 @@ pragma solidity 0.5.2; import "./Ownable.sol"; interface TokenIOCurrencyAuthorityI { - function getTokenBalance(string memory currency, address account) public view returns (uint balance); + function getTokenBalance(string calldata currency, address account) external view returns (uint balance); - function getTokenSupply(string memory currency) public view returns (uint supply); + function getTokenSupply(string calldata currency) external view returns (uint supply); - function freezeAccount(address account, bool isAllowed, string memory issuerFirm) public returns (bool success); + function freezeAccount(address account, bool isAllowed, string calldata issuerFirm, address sender) external returns (bool success); - function approveKYC(address account, bool isApproved, uint limit, string memory issuerFirm) public returns (bool success); + function approveKYC(address account, bool isApproved, uint limit, string calldata issuerFirm, address sender) external returns (bool success); - function approveKYCAndDeposit(string memory currency, address account, uint amount, uint limit, string memory issuerFirm) public returns (bool success); + function approveKYCAndDeposit(string calldata currency, address account, uint amount, uint limit, string calldata issuerFirm, address sender) external returns (bool success); - function setAccountSpendingLimit(address account, uint limit, string memory issuerFirm) public returns (bool success); + function setAccountSpendingLimit(address account, uint limit, string calldata issuerFirm, address sender) external returns (bool success); - function getAccountSpendingRemaining(address account) public view returns (uint spendingRemaining); + function getAccountSpendingRemaining(address account) external view returns (uint spendingRemaining); - function getAccountSpendingLimit(address account) public view returns (uint spendingLimit); + function getAccountSpendingLimit(address account) external view returns (uint spendingLimit); - function setFxBpsRate(string memory currency, uint bpsRate, string memory issuerFirm) public returns (bool success); + function setFxBpsRate(string calldata currency, uint bpsRate, string calldata issuerFirm, address sender) external returns (bool success); - function getFxUSDAmount(string memory currency, uint fxAmount) public view returns (uint usdAmount); + function getFxUSDAmount(string calldata currency, uint fxAmount) external view returns (uint usdAmount); - function approveForwardedAccount(address originalAccount, address updatedAccount, string memory issuerFirm) public returns (bool success); + function approveForwardedAccount(address originalAccount, address updatedAccount, string calldata issuerFirm, address sender) external returns (bool success); - function deposit(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success); + function deposit(string calldata currency, address account, uint amount, string calldata issuerFirm, address sender) external returns (bool success); - function withdraw(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success); + function withdraw(string calldata currency, address account, uint amount, string calldata issuerFirm, address sender) external returns (bool success); } contract TokenIOCurrencyAuthorityProxy is Ownable { @@ -38,8 +38,8 @@ contract TokenIOCurrencyAuthorityProxy is Ownable { tokenIOCurrencyAuthorityImpl = TokenIOCurrencyAuthorityI(_tokenIOCurrencyAuthorityImpl); } - function upgradeTokenImplamintation(address _newTokenIOFeeContractImpl) onlyOwner external { - require(_newTokenIOFeeContractImpl != address(0)); + function upgradeTokenImplamintation(address _newTokenIOCurrencyAuthorityImpl) onlyOwner external { + require(_newTokenIOCurrencyAuthorityImpl != address(0)); tokenIOCurrencyAuthorityImpl = TokenIOCurrencyAuthorityI(_newTokenIOCurrencyAuthorityImpl); } diff --git a/contracts/TokenIOERC20.sol b/contracts/TokenIOERC20.sol index 1560310..896ebd3 100644 --- a/contracts/TokenIOERC20.sol +++ b/contracts/TokenIOERC20.sol @@ -213,11 +213,11 @@ contract TokenIOERC20 is Ownable { * @param amount Allowance amount * @return {"success" : "Returns true if approve succeeds"} */ - function approve(address spender, uint amount) public notDeprecated returns (bool success) { + function approve(address spender, uint amount, address sender) public notDeprecated returns (bool success) { /// @notice sends approve through library /// @dev !!! mtuates storage states require( - lib.approveAllowance(spender, amount), + lib.approveAllowance(spender, amount, sender), "Error: Unable to approve allowance for spender. Please ensure spender is not null and does not have a frozen balance." ); return true; diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 0cf8d3e..3ab36b9 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -61,6 +61,7 @@ contract TokenIOERC20FeesApply is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } diff --git a/contracts/TokenIOERC20FeesApplyProxy.sol b/contracts/TokenIOERC20FeesApplyProxy.sol index 26513ba..b54084f 100644 --- a/contracts/TokenIOERC20FeesApplyProxy.sol +++ b/contracts/TokenIOERC20FeesApplyProxy.sol @@ -1,6 +1,8 @@ pragma solidity 0.5.2; import "./Ownable.sol"; +import "./UpgradableProxy.sol"; + interface TokenIOERC20FeesApplyI { function setParams(string calldata _name, string calldata _symbol, string calldata _tla, string calldata _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external returns(bool success); @@ -25,26 +27,18 @@ interface TokenIOERC20FeesApplyI { function calculateFees(uint amount) external view returns (uint fees); - function transfer(address to, uint amount) external returns(bool success); + function transfer(address to, uint amount, address sender) external returns(bool success); function transferFrom(address from, address to, uint amount) external returns(bool success); - function approve(address spender, uint amount) external returns (bool success); + function approve(address spender, uint amount, address sender) external returns (bool success); function deprecateInterface() external returns (bool deprecated); } -contract TokenIOERC20FeesApplyProxy is Ownable { - - TokenIOERC20FeesApplyI tokenIOERC20FeesApplyImpl; - - constructor(address _tokenIOERC20FeesApplyImpl) public { - tokenIOERC20FeesApplyImpl = TokenIOERC20FeesApplyI(_tokenIOERC20FeesApplyImpl); - } +contract TokenIOERC20FeesApplyProxy is Ownable, UpgradableProxy { - function upgradeTokenImplamintation(address _newTokenIOERC20FeesApplyImpl) onlyOwner external { - require(_newTokenIOERC20FeesApplyImpl != address(0)); - tokenIOERC20FeesApplyImpl = TokenIOERC20FeesApplyI(_newTokenIOERC20FeesApplyImpl); + constructor(address _tokenIOERC20FeesApplyImpl, bytes memory _data) UpgradableProxy(_tokenIOERC20FeesApplyImpl, _data) public { } function setParams( @@ -56,70 +50,70 @@ contract TokenIOERC20FeesApplyProxy is Ownable { address _feeContract, uint256 _fxUSDBPSRate ) onlyOwner public returns(bool) { - require(tokenIOERC20FeesApplyImpl.setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + require(TokenIOERC20FeesApplyI(_implementation()).setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Unable to execute setParams"); return true; } function transfer(address to, uint256 amount) external returns(bool) { - require(tokenIOERC20FeesApplyImpl.transfer(to, amount, msg.sender), + require(TokenIOERC20FeesApplyI(_implementation()).transfer(to, amount, msg.sender), "Unable to execute transfer"); return true; } function transferFrom(address from, address to, uint256 amount) external returns(bool) { - require(tokenIOERC20FeesApplyImpl.transferFrom(from, to, amount), + require(TokenIOERC20FeesApplyI(_implementation()).transferFrom(from, to, amount), "Unable to execute transferFrom"); return true; } function approve(address spender, uint256 amount) external returns (bool) { - require(tokenIOERC20FeesApplyImpl.approve(spender, amount, msg.sender), + require(TokenIOERC20FeesApplyI(_implementation()).approve(spender, amount, msg.sender), "Unable to execute approve"); return true; } function name() external view returns (string memory) { - return tokenIOERC20FeesApplyImpl.name(); + return TokenIOERC20FeesApplyI(_implementation()).name(); } function symbol() external view returns (string memory) { - return tokenIOERC20FeesApplyImpl.symbol(); + return TokenIOERC20FeesApplyI(_implementation()).symbol(); } function tla() external view returns (string memory) { - return tokenIOERC20FeesApplyImpl.symbol(); + return TokenIOERC20FeesApplyI(_implementation()).symbol(); } function version() external view returns (string memory) { - return tokenIOERC20FeesApplyImpl.version(); + return TokenIOERC20FeesApplyI(_implementation()).version(); } function decimals() external view returns (uint) { - return tokenIOERC20FeesApplyImpl.decimals(); + return TokenIOERC20FeesApplyI(_implementation()).decimals(); } function totalSupply() external view returns (uint256) { - return tokenIOERC20FeesApplyImpl.totalSupply(); + return TokenIOERC20FeesApplyI(_implementation()).totalSupply(); } function allowance(address account, address spender) external view returns (uint256) { - return tokenIOERC20FeesApplyImpl.allowance(account, spender); + return TokenIOERC20FeesApplyI(_implementation()).allowance(account, spender); } function balanceOf(address account) external view returns (uint256) { - return tokenIOERC20FeesApplyImpl.balanceOf(account); + return TokenIOERC20FeesApplyI(_implementation()).balanceOf(account); } function calculateFees(uint amount) external view returns (uint256) { - return tokenIOERC20FeesApplyImpl.calculateFees(amount); + return TokenIOERC20FeesApplyI(_implementation()).calculateFees(amount); } function deprecateInterface() external onlyOwner returns (bool) { - require(tokenIOERC20FeesApplyImpl.deprecateInterface(), + require(TokenIOERC20FeesApplyI(_implementation()).deprecateInterface(), "Unable to execute deprecateInterface"); return true; diff --git a/contracts/TokenIOERC20Proxy.sol b/contracts/TokenIOERC20Proxy.sol index c5a7965..94b6b42 100644 --- a/contracts/TokenIOERC20Proxy.sol +++ b/contracts/TokenIOERC20Proxy.sol @@ -25,11 +25,11 @@ interface TokenIOERC20I { function calculateFees(uint amount) external view returns (uint fees); - function transfer(address to, uint amount) external returns(bool success); + function transfer(address to, uint amount, address sender) external returns(bool success); function transferFrom(address from, address to, uint amount) external returns(bool success); - function approve(address spender, uint amount) external returns (bool success); + function approve(address spender, uint amount, address sender) external returns (bool success); function deprecateInterface() external returns (bool deprecated); } diff --git a/contracts/TokenIOERC20UnlimitedProxy.sol b/contracts/TokenIOERC20UnlimitedProxy.sol index 7772313..855d2d3 100644 --- a/contracts/TokenIOERC20UnlimitedProxy.sol +++ b/contracts/TokenIOERC20UnlimitedProxy.sol @@ -25,11 +25,11 @@ interface TokenIOERC20UnlimitedI { function calculateFees(uint amount) external view returns (uint fees); - function transfer(address to, uint amount) external returns(bool success); + function transfer(address to, uint amount, address sender) external returns(bool success); function transferFrom(address from, address to, uint amount) external returns(bool success); - function approve(address spender, uint amount) external returns (bool success); + function approve(address spender, uint amount, address sender) external returns (bool success); function deprecateInterface() external returns (bool deprecated); } diff --git a/contracts/TokenIOFeeContractProxy.sol b/contracts/TokenIOFeeContractProxy.sol index cec2a85..daa4899 100644 --- a/contracts/TokenIOFeeContractProxy.sol +++ b/contracts/TokenIOFeeContractProxy.sol @@ -3,15 +3,15 @@ pragma solidity 0.5.2; import "./Ownable.sol"; interface TokenIOFeeContractI { - function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes memory feeMsg) public returns (bool success); + function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes calldata feeMsg) external returns (bool success); - function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeContract); + function getFeeParams() external view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeContract); - function getTokenBalance(string memory currency) public view returns(uint balance); + function getTokenBalance(string calldata currency) external view returns(uint balance); - function calculateFees(uint amount) public view returns (uint fees); + function calculateFees(uint amount) external view returns (uint fees); - function transferCollectedFees(string memory currency, address to, uint amount, bytes memory data) public returns (bool success); + function transferCollectedFees(string calldata currency, address to, uint amount, bytes calldata data) external returns (bool success); } contract TokenIOFeeContractProxy is Ownable { @@ -38,7 +38,7 @@ contract TokenIOFeeContractProxy is Ownable { } function getTokenBalance(string memory currency) public view returns(uint balance) { - return tokenIOFeeContractImpl.getFeeParams(currency); + return tokenIOFeeContractImpl.getTokenBalance(currency); } function calculateFees(uint amount) public view returns (uint fees) { @@ -47,7 +47,7 @@ contract TokenIOFeeContractProxy is Ownable { function transferCollectedFees(string memory currency, address to, uint amount, bytes memory data) public onlyOwner returns (bool success) { require( - tokenIOFeeContractImpl.transferCollectedFees(currency, proxyInstance, to, amount, data), + tokenIOFeeContractImpl.transferCollectedFees(currency, to, amount, data), "Unable to execute transferCollectedFees" ); return true; diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 0b88452..4a760d7 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -34,6 +34,7 @@ library TokenIOLib { /// @dev the Data struct uses the Storage contract for stateful setters struct Data { TokenIOStorage Storage; + address proxyInstance; } /// @notice Not using `Log` prefix for events to be consistent with ERC20 named events; diff --git a/contracts/TokenIOMerchantProxy.sol b/contracts/TokenIOMerchantProxy.sol index 1f3504f..571873d 100644 --- a/contracts/TokenIOMerchantProxy.sol +++ b/contracts/TokenIOMerchantProxy.sol @@ -2,46 +2,46 @@ pragma solidity 0.5.2; import "./Ownable.sol"; -interface TokenIOFeeContractI { - function setParams(address feeContract) public returns (bool success); +interface TokenIOMerchantI { + function setParams(address feeContract) external returns (bool success); - function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount); + function getFeeParams() external view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount); - function calculateFees(uint amount) public view returns (uint fees); + function calculateFees(uint amount) external view returns (uint fees); - function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success); + function pay(string calldata currency, address merchant, uint amount, bool merchantPaysFees, bytes calldata data, address sender) external returns (bool success); } -contract TokenIOAuthorityProxy is Ownable { +contract TokenIOMerchantProxy is Ownable { - TokenIOAuthorityI tokenIOAuthorityImpl; + TokenIOMerchantI tokenIOMerchantImpl; - constructor(address _tokenIOAuthorityImpl) public { - tokenIOAuthorityImpl = TokenIOFeeContractI(_tokenIOAuthorityImpl); + constructor(address _tokenIOMerchantImpl) public { + tokenIOMerchantImpl = TokenIOMerchantI(_tokenIOMerchantImpl); } - function upgradeTokenImplamintation(address _newTokenIOAuthorityImpl) onlyOwner external { - require(_newTokenIOAuthorityImpl != address(0)); - tokenIOAuthorityImpl = TokenIOFeeContractI(_newTokenIOAuthorityImpl); + function upgradeTokenImplamintation(address _newTokenIOMerchantImpl) onlyOwner external { + require(_newTokenIOMerchantImpl != address(0)); + tokenIOMerchantImpl = TokenIOMerchantI(_newTokenIOMerchantImpl); } function setParams(address feeContract) public onlyOwner returns (bool success) { - require(tokenIOAuthorityImpl.setParams(feeContract), + require(tokenIOMerchantImpl.setParams(feeContract), "Unable to execute setParams"); return true; } function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { - return tokenIOAuthorityImpl.getFeeParams(); + return tokenIOMerchantImpl.getFeeParams(); } function calculateFees(uint amount) public view returns (uint fees) { - return tokenIOAuthorityImpl.calculateFees(amount); + return tokenIOMerchantImpl.calculateFees(amount); } function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success) { - require(tokenIOAuthorityImpl.pay(currency, merchant, amount, merchantPaysFees, data, msg.sender), + require(tokenIOMerchantImpl.pay(currency, merchant, amount, merchantPaysFees, data, msg.sender), "Unable to execute pay"); return true; diff --git a/contracts/TokenIONameSpaceProxy.sol b/contracts/TokenIONameSpaceProxy.sol index f68303e..387ace1 100644 --- a/contracts/TokenIONameSpaceProxy.sol +++ b/contracts/TokenIONameSpaceProxy.sol @@ -3,13 +3,7 @@ pragma solidity 0.5.2; import "./Ownable.sol"; interface TokenIONameSpaceI { - function setParams(address feeContract) public returns (bool success); - - function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount); - - function calculateFees(uint amount) public view returns (uint fees); - - function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success); + function getTokenNameSpace(string calldata currency) external view returns (address contractAddress); } contract TokenIONameSpaceProxy is Ownable { diff --git a/contracts/TokenIOStableSwapProxy.sol b/contracts/TokenIOStableSwapProxy.sol index 07c0079..ee01010 100644 --- a/contracts/TokenIOStableSwapProxy.sol +++ b/contracts/TokenIOStableSwapProxy.sol @@ -3,27 +3,29 @@ pragma solidity 0.5.2; import "./Ownable.sol"; interface TokenIOStableSwapI { - function allowAsset(address asset, string memory currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public returns (bool success); + function allowAsset(address asset, string calldata currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) external returns (bool success); - function removeAsset(address asset) public returns (bool success); + function removeAsset(address asset) external returns (bool success); - function isAllowedAsset(address asset, string memory currency) public view returns (bool allowed); + function isAllowedAsset(address asset, string calldata currency) external view returns (bool allowed); - function getAssetCurrency(address asset) public view returns (string memory currency); + function setAssetCurrency(address asset, string calldata currency) external returns (bool success); - function setTokenXCurrency(address asset, string memory currency) public returns (bool success); + function getAssetCurrency(address asset) external view returns (string memory currency); - function isTokenXContract(address asset, string memory currency) public view returns (bool isX); + function setTokenXCurrency(address asset, string calldata currency) external returns (bool success); - function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public returns (bool success); + function isTokenXContract(address asset, string calldata currency) external view returns (bool isX); - function calcAssetFees(address asset, uint amount) public view returns (uint fees); + function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) external returns (bool success); - function convert(address fromAsset, address toAsset, uint amount) public returns (bool success); + function calcAssetFees(address asset, uint amount) external view returns (uint fees); - function transferCollectedFees(address asset, address to, uint amount) public returns (bool success); + function convert(address fromAsset, address toAsset, uint amount) external returns (bool success); - function deprecateInterface() public returns (bool deprecated); + function transferCollectedFees(address asset, address to, uint amount) external returns (bool success); + + function deprecateInterface() external returns (bool deprecated); } contract TokenIOStableSwapProxy is Ownable { @@ -31,12 +33,12 @@ contract TokenIOStableSwapProxy is Ownable { TokenIOStableSwapI tokenIOStableSwapImpl; constructor(address _tokenIOStableSwapImpl) public { - tokenIOStableSwapImpl = TokenIOFeeContractI(_tokenIOStableSwapImpl); + tokenIOStableSwapImpl = TokenIOStableSwapI(_tokenIOStableSwapImpl); } function upgradeTokenImplamintation(address _newTokenIOStableSwapImpl) onlyOwner external { require(_newTokenIOStableSwapImpl != address(0)); - tokenIOStableSwapImpl = TokenIOFeeContractI(_newTokenIOStableSwapImpl); + tokenIOStableSwapImpl = TokenIOStableSwapI(_newTokenIOStableSwapImpl); } function allowAsset(address asset, string memory currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner returns (bool success) { diff --git a/contracts/TokenIOStorage.sol b/contracts/TokenIOStorage.sol index 4a1df8e..054e1e3 100644 --- a/contracts/TokenIOStorage.sol +++ b/contracts/TokenIOStorage.sol @@ -37,7 +37,7 @@ Changes: must take ownership of the TokenIO contract, it will require using the public methods to update changes to the underlying data. The updated contract must use a standard call to original TokenIO contract such that the request is made from - the upgraded contract and not the transaction origin (msg.sender) of the signing + the upgraded contract and not the transaction origin (tx.origin) of the signing account. diff --git a/contracts/TokenIOProxy.sol b/contracts/UpgradableProxy.sol similarity index 90% rename from contracts/TokenIOProxy.sol rename to contracts/UpgradableProxy.sol index 9ab6c4d..f9ea6a4 100644 --- a/contracts/TokenIOProxy.sol +++ b/contracts/UpgradableProxy.sol @@ -1,7 +1,7 @@ pragma solidity 0.5.2; import './Proxy.sol'; -import 'openzeppelin-solidity/contracts/AddressUtils.sol'; +import 'zeppelin-solidity/contracts/AddressUtils.sol'; /** * @title UpgradeabilityProxy @@ -9,7 +9,7 @@ import 'openzeppelin-solidity/contracts/AddressUtils.sol'; * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ -contract UpgradeabilityProxy is Proxy { +contract UpgradableProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. @@ -31,11 +31,12 @@ contract UpgradeabilityProxy is Proxy { * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ - constructor(address _implementation, bytes _data) public payable { + constructor(address _implementation, bytes memory _data) public { assert(IMPLEMENTATION_SLOT == keccak256("org.token.io")); _setImplementation(_implementation); if(_data.length > 0) { - require(_implementation.delegatecall(_data)); + (bool success, ) = _implementation.delegatecall(_data); + require(success); } } From 799dc45c6803991cd1aadff0b206fa4d4381af1d Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Wed, 20 Feb 2019 16:14:26 +0200 Subject: [PATCH 34/40] update proxy contract --- contracts/TokenIOCurrencyAuthorityProxy.sol | 39 +++++++++------------ contracts/UpgradableProxy.sol | 2 +- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/contracts/TokenIOCurrencyAuthorityProxy.sol b/contracts/TokenIOCurrencyAuthorityProxy.sol index aadcd05..56942db 100644 --- a/contracts/TokenIOCurrencyAuthorityProxy.sol +++ b/contracts/TokenIOCurrencyAuthorityProxy.sol @@ -1,6 +1,7 @@ pragma solidity 0.5.2; import "./Ownable.sol"; +import "./UpgradableProxy.sol"; interface TokenIOCurrencyAuthorityI { function getTokenBalance(string calldata currency, address account) external view returns (uint balance); @@ -30,30 +31,22 @@ interface TokenIOCurrencyAuthorityI { function withdraw(string calldata currency, address account, uint amount, string calldata issuerFirm, address sender) external returns (bool success); } -contract TokenIOCurrencyAuthorityProxy is Ownable { +contract TokenIOCurrencyAuthorityProxy is Ownable, UpgradableProxy { - TokenIOCurrencyAuthorityI tokenIOCurrencyAuthorityImpl; - - constructor(address _tokenIOCurrencyAuthorityImpl) public { - tokenIOCurrencyAuthorityImpl = TokenIOCurrencyAuthorityI(_tokenIOCurrencyAuthorityImpl); - } - - function upgradeTokenImplamintation(address _newTokenIOCurrencyAuthorityImpl) onlyOwner external { - require(_newTokenIOCurrencyAuthorityImpl != address(0)); - tokenIOCurrencyAuthorityImpl = TokenIOCurrencyAuthorityI(_newTokenIOCurrencyAuthorityImpl); + constructor(address _tokenIOCurrencyAuthorityImpl, bytes memory _data) UpgradableProxy(_tokenIOCurrencyAuthorityImpl, _data) public { } function getTokenBalance(string memory currency, address account) public view returns (uint balance) { - return tokenIOCurrencyAuthorityImpl.getTokenBalance(currency, account); + return TokenIOCurrencyAuthorityI(_implementation()).getTokenBalance(currency, account); } function getTokenSupply(string memory currency) public view returns (uint supply) { - return tokenIOCurrencyAuthorityImpl.getTokenSupply(currency); + return TokenIOCurrencyAuthorityI(_implementation()).getTokenSupply(currency); } function freezeAccount(address account, bool isAllowed, string memory issuerFirm) public returns (bool success) { require( - tokenIOCurrencyAuthorityImpl.freezeAccount(account, isAllowed, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(_implementation()).freezeAccount(account, isAllowed, issuerFirm, msg.sender), "Unable to execute freezeAccount" ); return true; @@ -61,7 +54,7 @@ contract TokenIOCurrencyAuthorityProxy is Ownable { function approveKYC(address account, bool isApproved, uint limit, string memory issuerFirm) public returns (bool success) { require( - tokenIOCurrencyAuthorityImpl.approveKYC(account, isApproved, limit, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(_implementation()).approveKYC(account, isApproved, limit, issuerFirm, msg.sender), "Unable to execute approveKYC" ); @@ -70,7 +63,7 @@ contract TokenIOCurrencyAuthorityProxy is Ownable { function approveKYCAndDeposit(string memory currency, address account, uint amount, uint limit, string memory issuerFirm) public returns (bool success) { require( - tokenIOCurrencyAuthorityImpl.approveKYCAndDeposit(currency, account, amount, limit, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(_implementation()).approveKYCAndDeposit(currency, account, amount, limit, issuerFirm, msg.sender), "Unable to execute approveKYCAndDeposit" ); @@ -79,35 +72,35 @@ contract TokenIOCurrencyAuthorityProxy is Ownable { function setAccountSpendingLimit(address account, uint limit, string memory issuerFirm) public returns (bool success) { require( - tokenIOCurrencyAuthorityImpl.setAccountSpendingLimit(account, limit, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(_implementation()).setAccountSpendingLimit(account, limit, issuerFirm, msg.sender), "Unable to execute setAccountSpendingLimit" ); return true; } function getAccountSpendingRemaining(address account) public view returns (uint spendingRemaining) { - return tokenIOCurrencyAuthorityImpl.getAccountSpendingRemaining(account); + return TokenIOCurrencyAuthorityI(_implementation()).getAccountSpendingRemaining(account); } function getAccountSpendingLimit(address account) public view returns (uint spendingLimit) { - return tokenIOCurrencyAuthorityImpl.getAccountSpendingLimit(account); + return TokenIOCurrencyAuthorityI(_implementation()).getAccountSpendingLimit(account); } function setFxBpsRate(string memory currency, uint bpsRate, string memory issuerFirm) public returns (bool success) { require( - tokenIOCurrencyAuthorityImpl.setFxBpsRate(currency, bpsRate, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(_implementation()).setFxBpsRate(currency, bpsRate, issuerFirm, msg.sender), "Unable to execute setFxBpsRate" ); return true; } function getFxUSDAmount(string memory currency, uint fxAmount) public view returns (uint usdAmount) { - return tokenIOCurrencyAuthorityImpl.getFxUSDAmount(currency, fxAmount); + return TokenIOCurrencyAuthorityI(_implementation()).getFxUSDAmount(currency, fxAmount); } function approveForwardedAccount(address originalAccount, address updatedAccount, string memory issuerFirm) public returns (bool success) { require( - tokenIOCurrencyAuthorityImpl.approveForwardedAccount(originalAccount, updatedAccount, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(_implementation()).approveForwardedAccount(originalAccount, updatedAccount, issuerFirm, msg.sender), "Unable to execute approveForwardedAccount" ); return true; @@ -115,7 +108,7 @@ contract TokenIOCurrencyAuthorityProxy is Ownable { function deposit(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success) { require( - tokenIOCurrencyAuthorityImpl.deposit(currency, account, amount, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(_implementation()).deposit(currency, account, amount, issuerFirm, msg.sender), "Unable to execute deposit" ); return true; @@ -123,7 +116,7 @@ contract TokenIOCurrencyAuthorityProxy is Ownable { function withdraw(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success) { require( - tokenIOCurrencyAuthorityImpl.withdraw(currency, account, amount, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(_implementation()).withdraw(currency, account, amount, issuerFirm, msg.sender), "Unable to execute withdraw" ); return true; diff --git a/contracts/UpgradableProxy.sol b/contracts/UpgradableProxy.sol index f9ea6a4..6a5039b 100644 --- a/contracts/UpgradableProxy.sol +++ b/contracts/UpgradableProxy.sol @@ -36,7 +36,7 @@ contract UpgradableProxy is Proxy { _setImplementation(_implementation); if(_data.length > 0) { (bool success, ) = _implementation.delegatecall(_data); - require(success); + //require(success); } } From e76b813d270b0afc2e90c5655593ecf9f2d465b9 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Wed, 20 Feb 2019 17:36:57 +0200 Subject: [PATCH 35/40] add upgrade function --- contracts/TokenIOCurrencyAuthorityProxy.sol | 4 ++++ contracts/TokenIOERC20FeesApplyProxy.sol | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/contracts/TokenIOCurrencyAuthorityProxy.sol b/contracts/TokenIOCurrencyAuthorityProxy.sol index 56942db..5391611 100644 --- a/contracts/TokenIOCurrencyAuthorityProxy.sol +++ b/contracts/TokenIOCurrencyAuthorityProxy.sol @@ -35,6 +35,10 @@ contract TokenIOCurrencyAuthorityProxy is Ownable, UpgradableProxy { constructor(address _tokenIOCurrencyAuthorityImpl, bytes memory _data) UpgradableProxy(_tokenIOCurrencyAuthorityImpl, _data) public { } + + function upgradeTo(address _newTokenIOCurrencyAuthorityImpl) external { + _upgradeTo(_newTokenIOCurrencyAuthorityImpl); + } function getTokenBalance(string memory currency, address account) public view returns (uint balance) { return TokenIOCurrencyAuthorityI(_implementation()).getTokenBalance(currency, account); diff --git a/contracts/TokenIOERC20FeesApplyProxy.sol b/contracts/TokenIOERC20FeesApplyProxy.sol index b54084f..c281ca0 100644 --- a/contracts/TokenIOERC20FeesApplyProxy.sol +++ b/contracts/TokenIOERC20FeesApplyProxy.sol @@ -40,6 +40,10 @@ contract TokenIOERC20FeesApplyProxy is Ownable, UpgradableProxy { constructor(address _tokenIOERC20FeesApplyImpl, bytes memory _data) UpgradableProxy(_tokenIOERC20FeesApplyImpl, _data) public { } + + function upgradeTo(address _newTokenIOERC20FeesApplyImpl) external { + _upgradeTo(_newTokenIOERC20FeesApplyImpl); + } function setParams( string memory _name, From e090dbb77c4f55777977fe8888c8bb8f46e4f01d Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Wed, 27 Feb 2019 07:36:53 +0200 Subject: [PATCH 36/40] change tests for proxies --- contracts/TokenIOAuthority.sol | 1 + contracts/TokenIOCurrencyAuthority.sol | 1 + contracts/TokenIOERC20.sol | 9 +- contracts/TokenIOERC20FeesApply.sol | 4 +- contracts/TokenIOERC20FeesApplyProxy.sol | 12 +- contracts/TokenIOERC20Proxy.sol | 10 +- contracts/TokenIOERC20Unlimited.sol | 5 +- contracts/TokenIOERC20UnlimitedProxy.sol | 6 +- contracts/TokenIOFeeContract.sol | 1 + contracts/TokenIOLib.sol | 29 ++- contracts/TokenIOMerchant.sol | 1 + contracts/TokenIONameSpace.sol | 1 + contracts/TokenIOStableSwap.sol | 13 +- contracts/TokenIOStableSwapProxy.sol | 4 +- migrations/10_deploy_TokenIOUnlimited.js | 8 +- migrations/11_deploy_TokenIOStableSwap.js | 20 +- migrations/12_deploy_TokenIOFeesApply.js | 8 +- .../4_deploy_TokenIOMasterFeeContract.js | 6 +- migrations/5_deploy_TokenIOAuthority.js | 16 +- .../6_deploy_TokenIOCurrencyAuthority.js | 5 + migrations/7_deploy_TokenIOMerchant.js | 11 +- migrations/8_deploy_TokenIOERC20.js | 8 +- package.json | 2 + test/TokenIOAuthority.js | 70 ------ test/TokenIOAuthorityProxy.js | 77 +++++++ test/TokenIOCurrencyAuthority.js | 95 -------- test/TokenIOCurrencyAuthorityProxy.js | 103 +++++++++ test/TokenIOERC20.js | 206 ------------------ test/TokenIOERC20FeesApply.js | 166 -------------- test/TokenIOERC20FeesApplyProxy.js | 122 +++-------- test/TokenIOERC20Proxy.js | 194 +++++++++++++++++ test/TokenIOERC20Unlimited.js | 163 -------------- test/TokenIOERC20UnlimitedProxy.js | 159 ++++++++++++++ test/{TokenIOFX.js => TokenIOFXProxy.js} | 44 ++-- test/TokenIOFeeContract.js | 70 ------ test/TokenIOFeeContractProxy.js | 78 +++++++ test/TokenIOMerchant.js | 78 ------- test/TokenIOMerchantProxy.js | 88 ++++++++ ...tableSwap.js => TokenIOStableSwapProxy.js} | 56 +++-- test/TokenIOStorage.js | 4 +- 40 files changed, 918 insertions(+), 1036 deletions(-) delete mode 100644 test/TokenIOAuthority.js create mode 100644 test/TokenIOAuthorityProxy.js delete mode 100644 test/TokenIOCurrencyAuthority.js create mode 100644 test/TokenIOCurrencyAuthorityProxy.js delete mode 100644 test/TokenIOERC20.js delete mode 100644 test/TokenIOERC20FeesApply.js create mode 100644 test/TokenIOERC20Proxy.js delete mode 100644 test/TokenIOERC20Unlimited.js create mode 100644 test/TokenIOERC20UnlimitedProxy.js rename test/{TokenIOFX.js => TokenIOFXProxy.js} (72%) delete mode 100644 test/TokenIOFeeContract.js create mode 100644 test/TokenIOFeeContractProxy.js delete mode 100644 test/TokenIOMerchant.js create mode 100644 test/TokenIOMerchantProxy.js rename test/{TokenIOStableSwap.js => TokenIOStableSwapProxy.js} (56%) diff --git a/contracts/TokenIOAuthority.sol b/contracts/TokenIOAuthority.sol index ea872f4..4f1a736 100644 --- a/contracts/TokenIOAuthority.sol +++ b/contracts/TokenIOAuthority.sol @@ -54,6 +54,7 @@ contract TokenIOAuthority is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } /** diff --git a/contracts/TokenIOCurrencyAuthority.sol b/contracts/TokenIOCurrencyAuthority.sol index 4652ed5..64febd4 100644 --- a/contracts/TokenIOCurrencyAuthority.sol +++ b/contracts/TokenIOCurrencyAuthority.sol @@ -51,6 +51,7 @@ contract TokenIOCurrencyAuthority is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } /** diff --git a/contracts/TokenIOERC20.sol b/contracts/TokenIOERC20.sol index 896ebd3..473f29a 100644 --- a/contracts/TokenIOERC20.sol +++ b/contracts/TokenIOERC20.sol @@ -56,6 +56,7 @@ contract TokenIOERC20 is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } /** @@ -180,11 +181,11 @@ contract TokenIOERC20 is Ownable { * @param amount Transfer amount * @return {"success" : "Returns true if transfer succeeds"} */ - function transfer(address to, uint amount) public notDeprecated returns (bool success) { + function transfer(address to, uint amount, address sender) public notDeprecated returns (bool success) { /// @notice send transfer through library /// @dev !!! mutates storage state require( - lib.transfer(lib.getTokenSymbol(proxyInstance), to, amount, "0x0"), + lib.transfer(lib.getTokenSymbol(proxyInstance), to, amount, sender, "0x0"), "Error: Unable to transfer funds. Please check your parameters." ); return true; @@ -197,11 +198,11 @@ contract TokenIOERC20 is Ownable { * @param amount Transfer amount * @return {"success" : "Returns true if transferFrom succeeds"} */ - function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) { + function transferFrom(address from, address to, uint amount, address sender) public notDeprecated returns (bool success) { /// @notice sends transferFrom through library /// @dev !!! mutates storage state require( - lib.transferFrom(lib.getTokenSymbol(proxyInstance), from, to, amount, "0x0"), + lib.transferFrom(from, to, amount, "0x0", sender), "Error: Unable to transfer funds. Please check your parameters and ensure the spender has the approved amount of funds to transfer." ); return true; diff --git a/contracts/TokenIOERC20FeesApply.sol b/contracts/TokenIOERC20FeesApply.sol index 3ab36b9..4fe7d47 100644 --- a/contracts/TokenIOERC20FeesApply.sol +++ b/contracts/TokenIOERC20FeesApply.sol @@ -217,7 +217,7 @@ contract TokenIOERC20FeesApply is Ownable { * @param amount Transfer amount * @return {"success" : "Returns true if transferFrom succeeds"} */ - function transferFrom(address from, address to, uint amount) public notDeprecated returns(bool success) { + function transferFrom(address from, address to, uint amount, address sender) public notDeprecated returns(bool success) { address feeContract = lib.getFeeContract(proxyInstance); (string memory currency, address[3] memory addresses) = lib.getTransferDetails(proxyInstance, [from, to, feeContract]); uint fees = calculateFees(feeContract, amount); @@ -231,7 +231,7 @@ contract TokenIOERC20FeesApply is Ownable { /// @notice This transaction will fail if the msg.sender does not have an approved allowance. require( - lib.updateAllowance(lib.getTokenSymbol(proxyInstance), from, amount.add(fees)), + lib.updateAllowance(lib.getTokenSymbol(proxyInstance), from, amount.add(fees), sender), "Error: Unable to update allowance for spender." ); diff --git a/contracts/TokenIOERC20FeesApplyProxy.sol b/contracts/TokenIOERC20FeesApplyProxy.sol index c281ca0..ccfe471 100644 --- a/contracts/TokenIOERC20FeesApplyProxy.sol +++ b/contracts/TokenIOERC20FeesApplyProxy.sol @@ -29,7 +29,7 @@ interface TokenIOERC20FeesApplyI { function transfer(address to, uint amount, address sender) external returns(bool success); - function transferFrom(address from, address to, uint amount) external returns(bool success); + function transferFrom(address from, address to, uint amount, address sender) external returns(bool success); function approve(address spender, uint amount, address sender) external returns (bool success); @@ -41,7 +41,7 @@ contract TokenIOERC20FeesApplyProxy is Ownable, UpgradableProxy { constructor(address _tokenIOERC20FeesApplyImpl, bytes memory _data) UpgradableProxy(_tokenIOERC20FeesApplyImpl, _data) public { } - function upgradeTo(address _newTokenIOERC20FeesApplyImpl) external { + function upgradeTo(address _newTokenIOERC20FeesApplyImpl) onlyOwner external { _upgradeTo(_newTokenIOERC20FeesApplyImpl); } @@ -59,6 +59,10 @@ contract TokenIOERC20FeesApplyProxy is Ownable, UpgradableProxy { return true; } + function delegateCall() external { + _delegate(_implementation()); + } + function transfer(address to, uint256 amount) external returns(bool) { require(TokenIOERC20FeesApplyI(_implementation()).transfer(to, amount, msg.sender), "Unable to execute transfer"); @@ -67,7 +71,7 @@ contract TokenIOERC20FeesApplyProxy is Ownable, UpgradableProxy { } function transferFrom(address from, address to, uint256 amount) external returns(bool) { - require(TokenIOERC20FeesApplyI(_implementation()).transferFrom(from, to, amount), + require(TokenIOERC20FeesApplyI(_implementation()).transferFrom(from, to, amount, msg.sender), "Unable to execute transferFrom"); return true; @@ -89,7 +93,7 @@ contract TokenIOERC20FeesApplyProxy is Ownable, UpgradableProxy { } function tla() external view returns (string memory) { - return TokenIOERC20FeesApplyI(_implementation()).symbol(); + return TokenIOERC20FeesApplyI(_implementation()).tla(); } function version() external view returns (string memory) { diff --git a/contracts/TokenIOERC20Proxy.sol b/contracts/TokenIOERC20Proxy.sol index 94b6b42..142122e 100644 --- a/contracts/TokenIOERC20Proxy.sol +++ b/contracts/TokenIOERC20Proxy.sol @@ -27,7 +27,7 @@ interface TokenIOERC20I { function transfer(address to, uint amount, address sender) external returns(bool success); - function transferFrom(address from, address to, uint amount) external returns(bool success); + function transferFrom(address from, address to, uint amount, address sender) external returns(bool success); function approve(address spender, uint amount, address sender) external returns (bool success); @@ -69,7 +69,7 @@ contract TokenIOERC20Proxy is Ownable { } function transferFrom(address from, address to, uint256 amount) external returns(bool) { - require(tokenIOERC20Impl.transferFrom(from, to, amount), + require(tokenIOERC20Impl.transferFrom(from, to, amount, msg.sender), "Unable to execute transferFrom"); return true; @@ -91,7 +91,7 @@ contract TokenIOERC20Proxy is Ownable { } function tla() external view returns (string memory) { - return tokenIOERC20Impl.symbol(); + return tokenIOERC20Impl.tla(); } function version() external view returns (string memory) { @@ -114,6 +114,10 @@ contract TokenIOERC20Proxy is Ownable { return tokenIOERC20Impl.balanceOf(account); } + function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { + return tokenIOERC20Impl.getFeeParams(); + } + function calculateFees(uint amount) external view returns (uint256) { return tokenIOERC20Impl.calculateFees(amount); } diff --git a/contracts/TokenIOERC20Unlimited.sol b/contracts/TokenIOERC20Unlimited.sol index 80543f3..f7010b6 100644 --- a/contracts/TokenIOERC20Unlimited.sol +++ b/contracts/TokenIOERC20Unlimited.sol @@ -58,6 +58,7 @@ contract TokenIOERC20Unlimited is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } /** @@ -177,7 +178,7 @@ contract TokenIOERC20Unlimited is Ownable { * @param amount Transfer amount * @return {"success" : "Returns true if transferFrom succeeds"} */ - function transferFrom(address from, address to, uint amount) public notDeprecated returns (bool success) { + function transferFrom(address from, address to, uint amount, address sender) public notDeprecated returns (bool success) { /// @notice sends transferFrom through library /// @dev !!! mutates storage state require( @@ -187,7 +188,7 @@ contract TokenIOERC20Unlimited is Ownable { /// @notice This transaction will fail if the msg.sender does not have an approved allowance. require( - lib.updateAllowance(lib.getTokenSymbol(proxyInstance), from, amount), + lib.updateAllowance(lib.getTokenSymbol(proxyInstance), from, amount, sender), "Error: Unable to update allowance for spender." ); diff --git a/contracts/TokenIOERC20UnlimitedProxy.sol b/contracts/TokenIOERC20UnlimitedProxy.sol index 855d2d3..cd263c1 100644 --- a/contracts/TokenIOERC20UnlimitedProxy.sol +++ b/contracts/TokenIOERC20UnlimitedProxy.sol @@ -27,7 +27,7 @@ interface TokenIOERC20UnlimitedI { function transfer(address to, uint amount, address sender) external returns(bool success); - function transferFrom(address from, address to, uint amount) external returns(bool success); + function transferFrom(address from, address to, uint amount, address sender) external returns(bool success); function approve(address spender, uint amount, address sender) external returns (bool success); @@ -69,7 +69,7 @@ contract TokenIOERC20UnlimitedProxy is Ownable { } function transferFrom(address from, address to, uint256 amount) external returns(bool) { - require(tokenIOERC20UnlimitedImpl.transferFrom(from, to, amount), + require(tokenIOERC20UnlimitedImpl.transferFrom(from, to, amount, msg.sender), "Unable to execute transferFrom"); return true; @@ -91,7 +91,7 @@ contract TokenIOERC20UnlimitedProxy is Ownable { } function tla() external view returns (string memory) { - return tokenIOERC20UnlimitedImpl.symbol(); + return tokenIOERC20UnlimitedImpl.tla(); } function version() external view returns (string memory) { diff --git a/contracts/TokenIOFeeContract.sol b/contracts/TokenIOFeeContract.sol index 772338a..df0149c 100644 --- a/contracts/TokenIOFeeContract.sol +++ b/contracts/TokenIOFeeContract.sol @@ -57,6 +57,7 @@ contract TokenIOFeeContract is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } /** diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 4a760d7..669b886 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -47,6 +47,10 @@ library TokenIOLib { event FxSwap(string tokenASymbol,string tokenBSymbol,uint tokenAValue,uint tokenBValue, uint expiration, bytes32 transactionHash); event AccountForward(address indexed originalAccount, address indexed forwardedAccount); event NewAuthority(address indexed authority, string issuerFirm); + event UpdateAllowance(uint victim); + event USDAmount(uint victim); + + function setTokenParams(Data storage self, string memory _name, string memory _symbol, string memory _tla, string memory _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) internal returns(bool success) { require( @@ -592,7 +596,7 @@ library TokenIOLib { * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function transfer(Data storage self, string memory currency, address to, uint amount, bytes memory data) internal returns (bool success) { + function transfer(Data storage self, string memory currency, address to, uint amount, address sender, bytes memory data) internal returns (bool success) { require(address(to) != address(0), "Error: `to` address cannot be null." ); require(amount > 0, "Error: `amount` must be greater than zero"); @@ -600,16 +604,18 @@ library TokenIOLib { uint fees = calculateFees(self, feeContract, amount); require( - setAccountSpendingAmount(self, msg.sender, getFxUSDAmount(self, currency, amount)), + setAccountSpendingAmount(self, sender, getFxUSDAmount(self, currency, amount)), "Error: Unable to set spending amount for account."); + emit USDAmount(getFxUSDAmount(self, currency, amount)); + require( - forceTransfer(self, currency, msg.sender, to, amount, data), + forceTransfer(self, currency, sender, to, amount, data), "Error: Unable to transfer funds to account."); // @dev transfer fees to fee contract require( - forceTransfer(self, currency, msg.sender, feeContract, fees, getFeeMsg(self, feeContract)), + forceTransfer(self, currency, sender, feeContract, fees, getFeeMsg(self, feeContract)), "Error: Unable to transfer fees to fee contract."); return true; @@ -624,14 +630,13 @@ library TokenIOLib { * @dev | This method implements ERC20 transferFrom() method with approved spender behavior * @dev | msg.sender == spender; `updateAllowance()` reduces approved limit for account spender * @param self Internal storage proxying TokenIOStorage contract - * @param currency Currency symbol of the token (e.g. USDx, JYPx, GBPx) * @param from Ethereum address of account to send currency amount from * @param to Ethereum address of account to send currency amount to * @param amount Value of currency to transfer * @param data Arbitrary bytes data to include with the transaction * @return { "success" : "Return true if successfully called from another contract" } */ - function transferFrom(Data storage self, string memory currency, address from, address to, uint amount, bytes memory data) internal returns (bool success) { + function transferFrom(Data storage self, address from, address to, uint amount, bytes memory data, address sender) internal returns (bool success) { require( address(to) != address(0), "Error: `to` address must not be null." @@ -642,26 +647,26 @@ library TokenIOLib { /// @dev NOTE: This transaction will fail if the spending amount exceeds the daily limit require( - setAccountSpendingAmount(self, from, getFxUSDAmount(self, currency, amount)), + setAccountSpendingAmount(self, from, getFxUSDAmount(self, getTokenSymbol(self, self.proxyInstance), amount)), "Error: Unable to set account spending amount." ); /// @dev Attempt to transfer the amount require( - forceTransfer(self, currency, from, to, amount, data), + forceTransfer(self, getTokenSymbol(self, self.proxyInstance), from, to, amount, data), "Error: Unable to transfer funds to account." ); // @dev transfer fees to fee contract require( - forceTransfer(self, currency, from, feeContract, fees, getFeeMsg(self, feeContract)), + forceTransfer(self, getTokenSymbol(self, self.proxyInstance), from, feeContract, fees, getFeeMsg(self, feeContract)), "Error: Unable to transfer fees to fee contract." ); /// @dev Attempt to update the spender allowance /// @notice this will throw if the allowance has not been set. require( - updateAllowance(self, currency, from, amount), + updateAllowance(self, getTokenSymbol(self, self.proxyInstance), from, amount, sender), "Error: Unable to update allowance for spender." ); @@ -712,8 +717,8 @@ library TokenIOLib { * @param amount Value to reduce allowance by (i.e. the amount spent) * @return { "success" : "Return true if successfully called from another contract" } */ - function updateAllowance(Data storage self, string memory currency, address account, uint amount) internal returns (bool success) { - bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, msg.sender))); + function updateAllowance(Data storage self, string memory currency, address account, uint amount, address sender) internal returns (bool success) { + bytes32 id = keccak256(abi.encodePacked('token.allowance', currency, getForwardedAccount(self, account), getForwardedAccount(self, sender))); require( self.Storage.setUint(id, self.Storage.getUint(id).sub(amount)), "Error: Unable to set storage value. Please ensure contract has allowed permissions with storage contract." diff --git a/contracts/TokenIOMerchant.sol b/contracts/TokenIOMerchant.sol index efcd4c8..1289d04 100644 --- a/contracts/TokenIOMerchant.sol +++ b/contracts/TokenIOMerchant.sol @@ -54,6 +54,7 @@ contract TokenIOMerchant is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } /** diff --git a/contracts/TokenIONameSpace.sol b/contracts/TokenIONameSpace.sol index 8cf163d..f110b24 100644 --- a/contracts/TokenIONameSpace.sol +++ b/contracts/TokenIONameSpace.sol @@ -57,6 +57,7 @@ contract TokenIONameSpace is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } /** diff --git a/contracts/TokenIOStableSwap.sol b/contracts/TokenIOStableSwap.sol index 21398bd..7c63213 100644 --- a/contracts/TokenIOStableSwap.sol +++ b/contracts/TokenIOStableSwap.sol @@ -64,6 +64,7 @@ contract TokenIOStableSwap is Ownable { require(_proxy != address(0)); proxyInstance = _proxy; + lib.proxyInstance = _proxy; } /** @@ -212,7 +213,7 @@ contract TokenIOStableSwap is Ownable { * @param amount Amount of fromAsset to be transferred. * @return { "success" : "Returns true if successfully called from another contract"} */ - function convert(address fromAsset, address toAsset, uint amount) public notDeprecated returns (bool success) { + function convert(address fromAsset, address toAsset, uint amount, address sender) public notDeprecated returns (bool success) { /// @notice lookup currency from one of the assets, check if allowed by both assets. string memory currency = getAssetCurrency(fromAsset); uint fromDecimals = ERC20Interface(fromAsset).decimals(); @@ -229,7 +230,7 @@ contract TokenIOStableSwap is Ownable { /// @dev the amount being transferred must be in the same decimal representation of the asset /// e.g. If decimals = 6 and want to transfer $100.00 the amount passed to this contract should be 100e6 (100 * 10 ** 6) require( - ERC20Interface(fromAsset).transferFrom(msg.sender, proxyInstance, amount), + ERC20Interface(fromAsset).transferFrom(sender, proxyInstance, amount), 'Error: Unable to transferFrom your asset holdings. Please ensure this contract has an approved allowance equal to or greater than the amount called in transferFrom method.' ); @@ -239,7 +240,7 @@ contract TokenIOStableSwap is Ownable { /// @dev Ensure amount is converted for the correct decimal representation; uint convertedAmountFrom = (netAmountFrom.mul(10**toDecimals)).div(10**fromDecimals); require( - lib.deposit(lib.getTokenSymbol(toAsset), msg.sender, convertedAmountFrom, 'Token, Inc.'), + lib.deposit(lib.getTokenSymbol(toAsset), sender, convertedAmountFrom, 'Token, Inc.'), "Error: Unable to deposit funds. Please check issuerFirm and firm authority are registered" ); } else if(isTokenXContract(fromAsset, currency)) { @@ -250,13 +251,13 @@ contract TokenIOStableSwap is Ownable { uint netAmountTo = convertedAmount.sub(fees); /// @dev Ensure amount is converted for the correct decimal representation; require( - ERC20Interface(toAsset).transfer(msg.sender, netAmountTo), + ERC20Interface(toAsset).transfer(sender, netAmountTo), 'Unable to call the requested erc20 contract.' ); /// @dev Withdraw TokenX asset from the user require( - lib.withdraw(lib.getTokenSymbol(fromAsset), msg.sender, amount, 'Token, Inc.'), + lib.withdraw(lib.getTokenSymbol(fromAsset), sender, amount, 'Token, Inc.'), "Error: Unable to withdraw funds. Please check issuerFirm and firm authority are registered and have issued funds that can be withdrawn" ); } else { @@ -264,7 +265,7 @@ contract TokenIOStableSwap is Ownable { } /// @dev Log the swap event for event listeners - emit StableSwap(fromAsset, toAsset, msg.sender, amount, currency); + emit StableSwap(fromAsset, toAsset, sender, amount, currency); return true; } diff --git a/contracts/TokenIOStableSwapProxy.sol b/contracts/TokenIOStableSwapProxy.sol index ee01010..a26c3d6 100644 --- a/contracts/TokenIOStableSwapProxy.sol +++ b/contracts/TokenIOStableSwapProxy.sol @@ -21,7 +21,7 @@ interface TokenIOStableSwapI { function calcAssetFees(address asset, uint amount) external view returns (uint fees); - function convert(address fromAsset, address toAsset, uint amount) external returns (bool success); + function convert(address fromAsset, address toAsset, uint amount, address sender) external returns (bool success); function transferCollectedFees(address asset, address to, uint amount) external returns (bool success); @@ -153,7 +153,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return { "success" : "Returns true if successfully called from another contract"} */ function convert(address fromAsset, address toAsset, uint amount) public returns (bool success) { - require(tokenIOStableSwapImpl.convert(fromAsset, toAsset, amount), 'Unable to execute convert'); + require(tokenIOStableSwapImpl.convert(fromAsset, toAsset, amount, msg.sender), 'Unable to execute convert'); return true; } diff --git a/migrations/10_deploy_TokenIOUnlimited.js b/migrations/10_deploy_TokenIOUnlimited.js index f752fcb..672743e 100644 --- a/migrations/10_deploy_TokenIOUnlimited.js +++ b/migrations/10_deploy_TokenIOUnlimited.js @@ -2,6 +2,7 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol") +const TokenIOERC20UnlimitedProxy = artifacts.require("./TokenIOERC20UnlimitedProxy.sol") const { mode, development, production } = require('../token.config.js'); const { @@ -17,7 +18,12 @@ const deployContracts = async (deployer, accounts) => { /* token */ const token = await deployer.deploy(TokenIOERC20Unlimited, storage.address) await storage.allowOwnership(token.address) - await token.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + const tokenProxy = await deployer.deploy(TokenIOERC20UnlimitedProxy, token.address) + await token.allowOwnership(tokenProxy.address) + await token.initProxy(tokenProxy.address) + + await tokenProxy.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) return true } catch (err) { diff --git a/migrations/11_deploy_TokenIOStableSwap.js b/migrations/11_deploy_TokenIOStableSwap.js index 9442d58..3914dd1 100644 --- a/migrations/11_deploy_TokenIOStableSwap.js +++ b/migrations/11_deploy_TokenIOStableSwap.js @@ -2,8 +2,9 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol") -const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") -const TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol") +const TokenIOStableSwapProxy = artifacts.require("./TokenIOStableSwapProxy.sol") +const TokenIOERC20Proxy = artifacts.require("./TokenIOERC20Proxy.sol") +const TokenIOERC20UnlimitedProxy = artifacts.require("./TokenIOERC20UnlimitedProxy.sol") const deployContracts = async (deployer, accounts) => { try { @@ -15,15 +16,20 @@ const deployContracts = async (deployer, accounts) => { await storage.allowOwnership(swap.address) + const swapProxy = await deployer.deploy(TokenIOStableSwapProxy, swap.address) + + await swap.allowOwnership(swapProxy.address) + await swap.initProxy(swapProxy.address) + // Allow USD asset - const usdx = await TokenIOERC20.deployed(); + const usdx = await TokenIOERC20Proxy.deployed(); const params1 = [ usdx.address, await usdx.tla() ] - await swap.setTokenXCurrency(...params1); + await swapProxy.setTokenXCurrency(...params1); // Allow other interfaces for USDx - const usdxUnlimited = await TokenIOERC20Unlimited.deployed(); + const usdxUnlimited = await TokenIOERC20UnlimitedProxy.deployed(); const params2 = [ usdxUnlimited.address, await usdxUnlimited.tla() ] - await swap.setTokenXCurrency(...params2); + await swapProxy.setTokenXCurrency(...params2); // Allow USDC // NOTE: Fees must be in the decimal representation of the asset @@ -33,7 +39,7 @@ const deployContracts = async (deployer, accounts) => { const feeMax = 1e12; // $1 million max fee; (6 decimal representation) const feeFlat = 0; const params3 = [ USDC, "USD", feeBps, feeMin, feeMax, feeFlat ] - await swap.allowAsset(...params3); + await swapProxy.allowAsset(...params3); return true } catch (err) { diff --git a/migrations/12_deploy_TokenIOFeesApply.js b/migrations/12_deploy_TokenIOFeesApply.js index 39cd628..dc827cb 100644 --- a/migrations/12_deploy_TokenIOFeesApply.js +++ b/migrations/12_deploy_TokenIOFeesApply.js @@ -2,6 +2,7 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOERC20FeesApply = artifacts.require("./TokenIOERC20FeesApply.sol") +const TokenIOERC20FeesApplyProxy = artifacts.require("./TokenIOERC20FeesApplyProxy.sol") const { mode, development, production } = require('../token.config.js'); const { @@ -17,7 +18,12 @@ const deployContracts = async (deployer, accounts) => { /* token */ const token = await deployer.deploy(TokenIOERC20FeesApply, storage.address) await storage.allowOwnership(token.address) - await token.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + const tokenProxy = await deployer.deploy(TokenIOERC20FeesApplyProxy, token.address, "0x00") + await token.allowOwnership(tokenProxy.address) + await token.initProxy(tokenProxy.address) + + await tokenProxy.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) return true } catch (err) { diff --git a/migrations/4_deploy_TokenIOMasterFeeContract.js b/migrations/4_deploy_TokenIOMasterFeeContract.js index 0635bd8..5f90b84 100644 --- a/migrations/4_deploy_TokenIOMasterFeeContract.js +++ b/migrations/4_deploy_TokenIOMasterFeeContract.js @@ -2,6 +2,7 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") +const TokenIOFeeContractProxy = artifacts.require("./TokenIOFeeContractProxy.sol") const { mode, development, production } = require('../token.config.js'); const { @@ -16,8 +17,11 @@ const deployContracts = async (deployer, accounts) => { /* master fee contract */ const masterFeeContract = await deployer.deploy(TokenIOFeeContract, storage.address) + const masterFeeContractProxy = await deployer.deploy(TokenIOFeeContractProxy, masterFeeContract.address) await storage.allowOwnership(masterFeeContract.address) - await masterFeeContract.setFeeParams(...Object.keys(FEE_PARAMS).map((p) => { return FEE_PARAMS[p] })) + await masterFeeContract.allowOwnership(masterFeeContractProxy.address) + await masterFeeContract.initProxy(masterFeeContractProxy.address) + await masterFeeContractProxy.setFeeParams(...Object.keys(FEE_PARAMS).map((p) => { return FEE_PARAMS[p] })) return true } catch (err) { diff --git a/migrations/5_deploy_TokenIOAuthority.js b/migrations/5_deploy_TokenIOAuthority.js index ee090b8..03e7dff 100644 --- a/migrations/5_deploy_TokenIOAuthority.js +++ b/migrations/5_deploy_TokenIOAuthority.js @@ -2,7 +2,8 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOAuthority = artifacts.require("./TokenIOAuthority.sol") -const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") +const TokenIOAuthorityProxy = artifacts.require("./TokenIOAuthorityProxy.sol") +const TokenIOFeeContractProxy = artifacts.require("./TokenIOFeeContractProxy.sol") const { mode, development, production } = require('../token.config.js'); const { @@ -18,12 +19,17 @@ const deployContracts = async (deployer, accounts) => { const authority = await deployer.deploy(TokenIOAuthority, storage.address) await storage.allowOwnership(authority.address) - const masterFeeContract = await TokenIOFeeContract.deployed() + const authorityProxy = await deployer.deploy(TokenIOAuthorityProxy, authority.address) + + await authority.allowOwnership(authorityProxy.address) + await authority.initProxy(authorityProxy.address) + + const masterFeeContractProxy = await TokenIOFeeContractProxy.deployed() /* registration */ - await authority.setRegisteredFirm(firmName, true) - await authority.setRegisteredAuthority(firmName, accounts[0], true) - await authority.setMasterFeeContract(masterFeeContract.address) + await authorityProxy.setRegisteredFirm(firmName, true) + await authorityProxy.setRegisteredAuthority(firmName, accounts[0], true) + await authorityProxy.setMasterFeeContract(masterFeeContractProxy.address) return true } catch (err) { diff --git a/migrations/6_deploy_TokenIOCurrencyAuthority.js b/migrations/6_deploy_TokenIOCurrencyAuthority.js index 4a85766..d9d052d 100644 --- a/migrations/6_deploy_TokenIOCurrencyAuthority.js +++ b/migrations/6_deploy_TokenIOCurrencyAuthority.js @@ -2,6 +2,7 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol") +const TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol") const deployContracts = async (deployer, accounts) => { try { @@ -12,6 +13,10 @@ const deployContracts = async (deployer, accounts) => { /* authority contracts */ const currencyAuthority = await deployer.deploy(TokenIOCurrencyAuthority, storage.address) await storage.allowOwnership(currencyAuthority.address) + const currencyAuthorityProxy = await deployer.deploy(TokenIOCurrencyAuthorityProxy, currencyAuthority.address, "0x00") + + await currencyAuthority.allowOwnership(currencyAuthorityProxy.address) + await currencyAuthority.initProxy(currencyAuthorityProxy.address) return true } catch (err) { diff --git a/migrations/7_deploy_TokenIOMerchant.js b/migrations/7_deploy_TokenIOMerchant.js index f5a37f8..ae265e9 100644 --- a/migrations/7_deploy_TokenIOMerchant.js +++ b/migrations/7_deploy_TokenIOMerchant.js @@ -1,8 +1,9 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") -const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") +const TokenIOFeeContractProxy = artifacts.require("./TokenIOFeeContractProxy.sol") const TokenIOMerchant = artifacts.require("./TokenIOMerchant.sol") +const TokenIOMerchantProxy = artifacts.require("./TokenIOMerchantProxy.sol") const deployContracts = async (deployer, accounts) => { try { @@ -10,12 +11,16 @@ const deployContracts = async (deployer, accounts) => { const storage = await TokenIOStorage.deployed() /* master fee contract */ - const masterFeeContract = await TokenIOFeeContract.deployed() + const masterFeeContractProxy = await TokenIOFeeContractProxy.deployed() /* merchant contract */ const merchant = await deployer.deploy(TokenIOMerchant, storage.address) await storage.allowOwnership(merchant.address) - await merchant.setParams(masterFeeContract.address) + const merchantProxy = await deployer.deploy(TokenIOMerchantProxy, merchant.address) + await merchant.allowOwnership(merchantProxy.address) + await merchant.initProxy(merchantProxy.address) + + await merchantProxy.setParams(masterFeeContractProxy.address) return true } catch (err) { diff --git a/migrations/8_deploy_TokenIOERC20.js b/migrations/8_deploy_TokenIOERC20.js index 1752854..b126d96 100644 --- a/migrations/8_deploy_TokenIOERC20.js +++ b/migrations/8_deploy_TokenIOERC20.js @@ -2,6 +2,7 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") +const TokenIOERC20Proxy = artifacts.require("./TokenIOERC20Proxy.sol") const { mode, development, production } = require('../token.config.js'); const { @@ -17,7 +18,12 @@ const deployContracts = async (deployer, accounts) => { /* token */ const token = await deployer.deploy(TokenIOERC20, storage.address) await storage.allowOwnership(token.address) - await token.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) + + const tokenProxy = await deployer.deploy(TokenIOERC20Proxy, token.address) + await token.allowOwnership(tokenProxy.address) + await token.initProxy(tokenProxy.address) + + await tokenProxy.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) return true } catch (err) { diff --git a/package.json b/package.json index 561033b..0aeb78b 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,8 @@ "repository": "https://github.com/tokenio/tokeninc-smart-contracts.git", "dependencies": { "bluebird": "^3.5.1", + "bignumber.js": "^7.2.0", + "ethereumjs-abi": "^0.6.5", "ethereumjs-util": "^5.1.5", "ethers": "^3.0.15", "truffle-contract": "^3.0.6", diff --git a/test/TokenIOAuthority.js b/test/TokenIOAuthority.js deleted file mode 100644 index 94ad347..0000000 --- a/test/TokenIOAuthority.js +++ /dev/null @@ -1,70 +0,0 @@ -var { utils } = require('ethers'); -var Promise = require('bluebird') -var TokenIOAuthority = artifacts.require("./TokenIOAuthority.sol"); - -const { mode, development, production } = require('../token.config.js'); -const { - AUTHORITY_DETAILS: { firmName, authorityAddress }, - TOKEN_DETAILS -} = mode == 'production' ? production : development; - -const USDx = TOKEN_DETAILS['USDx'] - -contract("TokenIOAuthority", function(accounts) { - - // Global Test Variables; - const AUTHORITY_ACCOUNT_0 = accounts[0]; - const AUTHORITY_ACCOUNT_1 = accounts[1]; - const FIRM_NAME = firmName; - const NEW_FIRM_NAME = "Test Firm, L.L.C." - const AUTHORITY_ACCOUNT_2 = accounts[2]; - - - it("Should confirm AUTHORITY_ACCOUNT has been set appropriately", async () => { - const authority = await TokenIOAuthority.deployed(); - const isAuthorized = await authority.isRegisteredToFirm(FIRM_NAME, AUTHORITY_ACCOUNT_0); - assert.equal(isAuthorized, true, "Authority firm and address should be authorized"); - }); - - it("Should confirm FIRM_NAME has been set appropriately", async () => { - const authority = await TokenIOAuthority.deployed(); - const authorityFirm = await authority.getFirmFromAuthority(AUTHORITY_ACCOUNT_0); - assert.equal(authorityFirm, FIRM_NAME, "Authority firm should be set to the firmName"); - }) - - it("Should confirm non-authority is not authorized", async () => { - const authority = await TokenIOAuthority.deployed(); - const isAuthorized = await authority.isRegisteredAuthority(AUTHORITY_ACCOUNT_1); - assert.equal(isAuthorized, false, "Non registered account should not be authorized"); - }) - - it("Should register a new firm and a firm authority", async () => { - const authority = await TokenIOAuthority.deployed(); - const NEW_FIRM_TX = await authority.setRegisteredFirm(NEW_FIRM_NAME, true) - const NEW_AUTHORITY_TX = await authority.setRegisteredAuthority(NEW_FIRM_NAME, AUTHORITY_ACCOUNT_2, true) - - assert.equal(NEW_FIRM_TX['receipt']['status'], "0x1", "Transaction should succeed") - assert.equal(NEW_AUTHORITY_TX['receipt']['status'], "0x1", "Transaction should succeed") - - const isRegisteredFirm = await authority.isRegisteredFirm(NEW_FIRM_NAME); - assert.equal(isRegisteredFirm, true, "New firm should be registered"); - - const isAuthorized = await authority.isRegisteredToFirm(NEW_FIRM_NAME, AUTHORITY_ACCOUNT_2); - assert.equal(isAuthorized, true, "Authority firm and address should be authorized"); - - }) - - it("Should allow AUTHORITY_ACCOUNT_2 to register AUTHORITY_ACCOUNT_1 to NEW_FIRM_NAME", async () => { - const authority = await TokenIOAuthority.deployed(); - const NEW_AUTHORITY_TX = await authority.setRegisteredAuthority(NEW_FIRM_NAME, AUTHORITY_ACCOUNT_1, true, { from: AUTHORITY_ACCOUNT_2 }) - - assert.equal(NEW_AUTHORITY_TX['receipt']['status'], "0x1", "Transaction should succeed") - - const isAuthorized = await authority.isRegisteredToFirm(NEW_FIRM_NAME, AUTHORITY_ACCOUNT_1); - assert.equal(isAuthorized, true, "Authority firm and address should be authorized"); - - }) - - - -}); diff --git a/test/TokenIOAuthorityProxy.js b/test/TokenIOAuthorityProxy.js new file mode 100644 index 0000000..96bd1a2 --- /dev/null +++ b/test/TokenIOAuthorityProxy.js @@ -0,0 +1,77 @@ +var { utils } = require('ethers'); +var Promise = require('bluebird') +var TokenIOAuthorityProxy = artifacts.require("./TokenIOAuthorityProxy.sol"); + + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS +} = mode == 'production' ? production : development; + +const USDx = TOKEN_DETAILS['USDx'] + +contract("TokenIOAuthorityProxy", function(accounts) { + + // Global Test Variables; + const AUTHORITY_ACCOUNT_0 = accounts[0]; + const AUTHORITY_ACCOUNT_1 = accounts[1]; + const FIRM_NAME = firmName; + const NEW_FIRM_NAME = "Test Firm, L.L.C." + const AUTHORITY_ACCOUNT_2 = accounts[2]; + + before(async function () { + this.tokenIOAuthorityProxy = await TokenIOAuthorityProxy.deployed(); + }); + + describe("Should confirm AUTHORITY_ACCOUNT has been set appropriately", function () { + it("Should pass", async function () { + const isAuthorized = await this.tokenIOAuthorityProxy.isRegisteredToFirm(FIRM_NAME, AUTHORITY_ACCOUNT_0); + assert.equal(isAuthorized, true, "Authority firm and address should be authorized"); + }); + }) + + describe("Should confirm FIRM_NAME has been set appropriately", function () { + it("Should pass", async function () { + const authorityFirm = await this.tokenIOAuthorityProxy.getFirmFromAuthority(AUTHORITY_ACCOUNT_0); + assert.equal(authorityFirm, FIRM_NAME, "Authority firm should be set to the firmName"); + }) + }) + + describe("Should confirm non-authority is not authorized", function () { + it("Should pass", async function () { + const isAuthorized = await this.tokenIOAuthorityProxy.isRegisteredAuthority(AUTHORITY_ACCOUNT_1); + assert.equal(isAuthorized, false, "Non registered account should not be authorized"); + }) + }) + + describe("Should register a new firm and a firm authority", function () { + it("Should pass", async function () { + const NEW_FIRM_TX = await this.tokenIOAuthorityProxy.setRegisteredFirm(NEW_FIRM_NAME, true) + const NEW_AUTHORITY_TX = await this.tokenIOAuthorityProxy.setRegisteredAuthority(NEW_FIRM_NAME, AUTHORITY_ACCOUNT_2, true) + + assert.equal(NEW_FIRM_TX['receipt']['status'], "0x1", "Transaction should succeed") + assert.equal(NEW_AUTHORITY_TX['receipt']['status'], "0x1", "Transaction should succeed") + + const isRegisteredFirm = await this.tokenIOAuthorityProxy.isRegisteredFirm(NEW_FIRM_NAME); + assert.equal(isRegisteredFirm, true, "New firm should be registered"); + + const isAuthorized = await this.tokenIOAuthorityProxy.isRegisteredToFirm(NEW_FIRM_NAME, AUTHORITY_ACCOUNT_2); + assert.equal(isAuthorized, true, "Authority firm and address should be authorized"); + }) + }) + + describe("Should allow AUTHORITY_ACCOUNT_2 to register AUTHORITY_ACCOUNT_1 to NEW_FIRM_NAME", function () { + it("Should pass", async function () { + const NEW_AUTHORITY_TX = await this.tokenIOAuthorityProxy.setRegisteredAuthority(NEW_FIRM_NAME, AUTHORITY_ACCOUNT_1, true, { from: AUTHORITY_ACCOUNT_2 }) + + assert.equal(NEW_AUTHORITY_TX['receipt']['status'], "0x1", "Transaction should succeed") + + const isAuthorized = await this.tokenIOAuthorityProxy.isRegisteredToFirm(NEW_FIRM_NAME, AUTHORITY_ACCOUNT_1); + assert.equal(isAuthorized, true, "Authority firm and address should be authorized"); + }) + }) + + + +}); diff --git a/test/TokenIOCurrencyAuthority.js b/test/TokenIOCurrencyAuthority.js deleted file mode 100644 index dc1aa9e..0000000 --- a/test/TokenIOCurrencyAuthority.js +++ /dev/null @@ -1,95 +0,0 @@ -var { utils } = require('ethers'); -var Promise = require('bluebird') -var TokenIOERC20 = artifacts.require("./TokenIOERC20.sol"); -var TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); - -const { mode, development, production } = require('../token.config.js'); -const { - AUTHORITY_DETAILS: { firmName, authorityAddress }, - TOKEN_DETAILS -} = mode == 'production' ? production : development; - -const USDx = TOKEN_DETAILS['USDx'] - -contract("TokenIOCurrencyAuthority", function(accounts) { - - // Global Test Variables; - const AUTHORITY_ACCOUNT = accounts[0]; - const DEPOSIT_TO_ACCOUNT = accounts[1]; - const CURRENCY_SYMBOL = USDx.tokenSymbol - const DEPOSIT_AMOUNT = 1123581321e2 - const LIMIT_AMOUNT = 5000e2 - const WITHDRAW_AMOUNT = 81321e2 - const FIRM_NAME = firmName; - - it("Should ensure the AUTHORITY_ACCOUNT cannot receive deposited funds on behalf of an account until the account is KYC'd", async () => { - const CA = await TokenIOCurrencyAuthority.deployed(); - - try { - const { receipt: { status, logs } } = await CA.deposit(CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, FIRM_NAME) - assert.equal(status, "0x0", "Transaction should fail."); - } catch (error) { - assert.equal(error.message.match(RegExp('revert')).length, 1, "Expect transaction to revert due to KYC approval not met"); - } - }) - - it("Should ensure the AUTHORITY_ACCOUNT can approve and deposit funds for an account", async () => { - const CA = await TokenIOCurrencyAuthority.deployed(); - const erc20 = await TokenIOERC20.deployed() - - const { receipt: { status } } = await CA.approveKYCAndDeposit(CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, LIMIT_AMOUNT, FIRM_NAME) - assert.equal(status, "0x1", "Transaction receipt status should be 0x1 successful."); - - const BALANCE = +(await erc20.balanceOf(DEPOSIT_TO_ACCOUNT)).toString() - const TOTAL_SUPPLY = +(await erc20.totalSupply()).toString() - - assert.equal(TOTAL_SUPPLY, DEPOSIT_AMOUNT, "Total supply should equal the amount deposited.") - assert.equal(BALANCE, DEPOSIT_AMOUNT, "Account balance should equal the amount deposited.") - - }) - - it("Should ensure the AUTHORITY_ACCOUNT can withdraw funds from an approved account", async () => { - const CA = await TokenIOCurrencyAuthority.deployed(); - const erc20 = await TokenIOERC20.deployed() - - const { receipt: { status, logs } } = await CA.withdraw(CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, FIRM_NAME) - assert.equal(status, "0x1", "Transaction receipt status should be 0x1 successful."); - - const BALANCE = +(await erc20.balanceOf(DEPOSIT_TO_ACCOUNT)).toString() - const TOTAL_SUPPLY = +(await erc20.totalSupply()).toString() - - assert.equal(TOTAL_SUPPLY, 0, "Total supply should equal 0 after amount is withdrawn.") - assert.equal(BALANCE, 0, "Account balance should equal 0 after amount is withdrawn.") - }) - - it("Should ensure the AUTHORITY_ACCOUNT can freeze account and disallow depositing funds to an account", async () => { - const CA = await TokenIOCurrencyAuthority.deployed(); - const erc20 = await TokenIOERC20.deployed() - - const KYC_TX_RESULT = await CA.freezeAccount(DEPOSIT_TO_ACCOUNT, true, FIRM_NAME); - assert.equal(KYC_TX_RESULT.receipt.status, "0x1", "Transaction receipt status should be 0x1 successful."); - - try { - const { receipt: { status, logs } } = await CA.deposit(CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, FIRM_NAME) - assert.equal(status, "0x1", "Transaction receipt status should be 0x1 successful."); - - // const TX_FEES = +(await erc20.calculateFees(DEPOSIT_AMOUNT)).toString() - const BALANCE = +(await erc20.balanceOf(DEPOSIT_TO_ACCOUNT)).toString() - const TOTAL_SUPPLY = +(await erc20.totalSupply()).toString() - - assert.equal(TOTAL_SUPPLY, DEPOSIT_AMOUNT, "Total supply should equal the amount deposited.") - assert.equal(BALANCE, DEPOSIT_AMOUNT, "Account balance should equal the amount deposited.") - } catch (error) { - assert.equal(error.message.match(RegExp('revert')).length, 1, "Expect transaction to revert due to KYC approval not met"); - } - - - }); - - - - - - - -}); diff --git a/test/TokenIOCurrencyAuthorityProxy.js b/test/TokenIOCurrencyAuthorityProxy.js new file mode 100644 index 0000000..b406109 --- /dev/null +++ b/test/TokenIOCurrencyAuthorityProxy.js @@ -0,0 +1,103 @@ +var { utils } = require('ethers'); +var Promise = require('bluebird') +var TokenIOERC20 = artifacts.require("./TokenIOERC20.sol"); +var TokenIOERC20Proxy = artifacts.require("./TokenIOERC20Proxy.sol"); +var TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); + +const { mode, development, production } = require('../token.config.js'); +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS +} = mode == 'production' ? production : development; + +const USDx = TOKEN_DETAILS['USDx'] + +contract("TokenIOCurrencyAuthorityProxy", function(accounts) { + + // Global Test Variables; + const AUTHORITY_ACCOUNT = accounts[0]; + const DEPOSIT_TO_ACCOUNT = accounts[1]; + const CURRENCY_SYMBOL = USDx.tokenSymbol + const DEPOSIT_AMOUNT = 1123581321e2 + const LIMIT_AMOUNT = 5000e2 + const WITHDRAW_AMOUNT = 81321e2 + const FIRM_NAME = firmName; + + const TOKEN_NAME = USDx.tokenName; + const TOKEN_SYMBOL = USDx.tokenSymbol + const TOKEN_TLA = USDx.tokenTLA + const TOKEN_VERSION = USDx.tokenVersion + const FEE_CONTRACT = USDx.feeContract + const TOKEN_DECIMALS = USDx.tokenDecimals + + before(async function () { + this.tokenIOCurrencyAuthorityProxy = await TokenIOCurrencyAuthorityProxy.deployed(); + this.tokenIOERC20Proxy = await TokenIOERC20Proxy.deployed(); + }); + + describe("Should ensure the AUTHORITY_ACCOUNT cannot receive deposited funds on behalf of an account until the account is KYC'd", function () { + it("Should pass", async function () { + try { + const { receipt: { status, logs } } = await this.tokenIOCurrencyAuthorityProxy.deposit(CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, FIRM_NAME) + assert.equal(status, "0x0", "Transaction should fail."); + } catch (error) { + assert.equal(error.message.match(RegExp('revert')).length, 1, "Expect transaction to revert due to KYC approval not met"); + } + }) + }) + + describe("Should ensure the AUTHORITY_ACCOUNT can approve and deposit funds for an account", function () { + it("Should pass", async function () { + const { receipt: { status } } = await this.tokenIOCurrencyAuthorityProxy.approveKYCAndDeposit(CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, LIMIT_AMOUNT, FIRM_NAME) + assert.equal(status, "0x1", "Transaction receipt status should be 0x1 successful."); + + const BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(DEPOSIT_TO_ACCOUNT)).toString() + const TOTAL_SUPPLY = +(await this.tokenIOERC20Proxy.totalSupply()).toString() + + assert.equal(TOTAL_SUPPLY, DEPOSIT_AMOUNT, "Total supply should equal the amount deposited.") + assert.equal(BALANCE, DEPOSIT_AMOUNT, "Account balance should equal the amount deposited.") + }) + }) + + describe("Should ensure the AUTHORITY_ACCOUNT can withdraw funds from an approved account", function () { + it("Should pass", async function () { + + const { receipt: { status, logs } } = await this.tokenIOCurrencyAuthorityProxy.withdraw(CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, FIRM_NAME) + assert.equal(status, "0x1", "Transaction receipt status should be 0x1 successful."); + + const BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(DEPOSIT_TO_ACCOUNT)).toString() + const TOTAL_SUPPLY = +(await this.tokenIOERC20Proxy.totalSupply()).toString() + + assert.equal(TOTAL_SUPPLY, 0, "Total supply should equal 0 after amount is withdrawn.") + assert.equal(BALANCE, 0, "Account balance should equal 0 after amount is withdrawn.") + }) + }) + + describe("Should ensure the AUTHORITY_ACCOUNT can freeze account and disallow depositing funds to an account", function () { + it("Should pass", async function () { + const KYC_TX_RESULT = await this.tokenIOCurrencyAuthorityProxy.freezeAccount(DEPOSIT_TO_ACCOUNT, true, FIRM_NAME); + assert.equal(KYC_TX_RESULT.receipt.status, "0x1", "Transaction receipt status should be 0x1 successful."); + + try { + const { receipt: { status, logs } } = await this.tokenIOCurrencyAuthorityProxy.deposit(CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, FIRM_NAME) + assert.equal(status, "0x1", "Transaction receipt status should be 0x1 successful."); + + // const TX_FEES = +(await erc20.calculateFees(DEPOSIT_AMOUNT)).toString() + const BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(DEPOSIT_TO_ACCOUNT)).toString() + const TOTAL_SUPPLY = +(await this.tokenIOERC20Proxy.totalSupply()).toString() + + assert.equal(TOTAL_SUPPLY, DEPOSIT_AMOUNT, "Total supply should equal the amount deposited.") + assert.equal(BALANCE, DEPOSIT_AMOUNT, "Account balance should equal the amount deposited.") + } catch (error) { + assert.equal(error.message.match(RegExp('revert')).length, 1, "Expect transaction to revert due to KYC approval not met"); + } + }) + }); + + + + + + + +}); diff --git a/test/TokenIOERC20.js b/test/TokenIOERC20.js deleted file mode 100644 index 5aa2b74..0000000 --- a/test/TokenIOERC20.js +++ /dev/null @@ -1,206 +0,0 @@ -const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); -const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") -const TokenIOERC20 = artifacts.require("./TokenIOERC20.sol") -const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") -const { mode, development, production } = require('../token.config.js') -const { utils } = require('ethers') - -const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode - == 'production' ? production : development //set stage - -contract("TokenIOERC20", function(accounts) { - // pull in usdx params - const USDx = TOKEN_DETAILS['USDx'] - - // create test accounts - const TEST_ACCOUNT_1 = accounts[0] - const TEST_ACCOUNT_2 = accounts[1] - const TEST_ACCOUNT_3 = accounts[2] - - const DEPOSIT_AMOUNT = 10000e2 - const LIMIT_AMOUNT = (DEPOSIT_AMOUNT/2) - const TRANSFER_AMOUNT = (DEPOSIT_AMOUNT/4) - - /* PARAMETERS */ - - it(`TOKEN_PARAMS - :should correctly set parameters according to c 'token.config.js' - [name, symbol, tla, decimals]`, async () => { - const TOKEN_NAME = USDx.tokenName; - const TOKEN_SYMBOL = USDx.tokenSymbol - const TOKEN_TLA = USDx.tokenTLA - const TOKEN_VERSION = USDx.tokenVersion - const TOKEN_DECIMALS = USDx.tokenDecimals - - - const erc20 = await TokenIOERC20.deployed() - const name = await erc20.name() - const symbol = await erc20.symbol() - const tla = await erc20.tla() - const version = await erc20.version() - const decimals = await erc20.decimals() - - assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") - assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") - assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") - assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") - assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") - }) - - - it(`FEE_PARAMS - :should correctly set fee parameters according to config file 'token.config.js' - [bps, min, max, flat, account]`, async () => { - const TOKEN_FEE_BPS = FEE_PARAMS.feeBps - const TOKEN_FEE_MIN = FEE_PARAMS.feeMin - const TOKEN_FEE_MAX = FEE_PARAMS.feeMax - const TOKEN_FEE_FLAT = FEE_PARAMS.feeFlat - const TOKEN_FEE_MSG = FEE_PARAMS.feeMsg - const TOKEN_FEE_ACCOUNT = (await TokenIOFeeContract.deployed()).address - - const erc20 = await TokenIOERC20.deployed() - const feeParams = await erc20.getFeeParams() - const feeBps = feeParams[0] - const feeMin = feeParams[1] - const feeMax = feeParams[2] - const feeFlat = feeParams[3] - const feeMsg = feeParams[4] - const feeAccount = feeParams[5] - - assert.equal(feeBps, TOKEN_FEE_BPS, "Token feeBps should be set in the storage contract.") - assert.equal(feeMin, TOKEN_FEE_MIN, "Token feeMin should be set in the storage contract.") - assert.equal(feeMax, TOKEN_FEE_MAX, "Token feeMax should be set in the storage contract.") - assert.equal(feeFlat, TOKEN_FEE_FLAT, "Token feeFlat should be set in the storage contract.") - assert.equal(feeMsg, TOKEN_FEE_MSG, "Token feeMsg should be set in the storage contract.") - assert.equal(feeAccount, TOKEN_FEE_ACCOUNT, "Token feeAccount should be set in the storage contract.") - }) - - /* GETTERS */ - - it(`BALANCE_OF - :should get balance of account1`, async () => { - const erc20 = await TokenIOERC20.deployed() - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - - const balance = await erc20.balanceOf(TEST_ACCOUNT_1) - assert.equal(balance, 0) - }) - - it(`ALLOWANCE - :should return allowance of account2 on behalf of account 1`, async () => { - const erc20 = await TokenIOERC20.deployed() - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - - const allowance = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) - assert.equal(allowance, 0) - }) - - /* PUBLIC FUNCTIONS */ - - it(`TRANSFER - :should supply uints, debiting the sender and crediting the receiver`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - const kycReceipt1 = await CA.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") - const kycReceipt2= await CA.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") - const kycReceipt3= await CA.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") - - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - await storage.allowOwnership(erc20.address) - const tokenSymbol = await erc20.symbol() - const depositReceipt = await CA.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") - - const balance1 = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const balance2 = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - - assert.equal(balance1, DEPOSIT_AMOUNT) - assert.equal(balance2, 0) - - const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) - const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const balance2b = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - - // calc fees - const TX_FEES = +(await erc20.calculateFees(TRANSFER_AMOUNT)).toString() - - // check spending limit remaining - const SPENDING_LIMIT = +(await CA.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() - const SPENDING_REMAINING = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - - assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT - TRANSFER_AMOUNT), - "Remaining spending amount should equal the spending limit minus the transfer amount") - - // calculate correct current balance - assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT-TX_FEES)) - assert.equal(balance2b, TRANSFER_AMOUNT) - }) - - - it(`APPROVE - :should give allowance of remaining balance of account 1 to account 2 - allowances[account1][account2]: 0 --> 100`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - const balance1a = +(await erc20.balanceOf(TEST_ACCOUNT_1)) - const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_2)) - - const approveReceipt = await erc20.approve(TEST_ACCOUNT_2, balance1a) - const allowance = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() - - assert.notEqual(allowance, 0, "Allowance should not equal zero.") - assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") - }) - - it(`TRANSFER_FROM - :account 2 should spend funds transfering from account1 to account 3 on behalf of account1`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - - const TEST_ACT_1_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const TEST_ACT_2_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - const TEST_ACT_3_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() - - assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") - assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") - - const BEG_ALLOWANCE = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) - assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) - - const TRANSFER_FROM_AMOUNT = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - const transferFromReceipt = await erc20.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) - - const TX_FEES = +(await erc20.calculateFees(TRANSFER_FROM_AMOUNT)).toString() - const TEST_ACT_1_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)) - assert.equal(TEST_ACT_1_END_BALANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT-TX_FEES), "Ending balance should be net of transfer amount and fees") - - const TEST_ACT_3_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() - assert.equal(TEST_ACT_3_END_BALANCE, TRANSFER_FROM_AMOUNT, "TEST_ACCOUNT_3 Balance should equal transfer amount"); - - const END_ALLOWANCE = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() - assert.equal(END_ALLOWANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT), "Allowance should be reduced by amount transferred") - - }) - - it("Should attempt to transfer more than the daily limit for the account and fail", async () => { - const erc20 = await TokenIOERC20.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - const SPENDING_REMAINING = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - assert.equal(0, SPENDING_REMAINING, "Expect daily spending limit to be zero") - - try { - const TRANSFER_AMOUNT = 100e2 - const TRANSFER_TX = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) - } catch (error) { - assert.equal(error.message.match(RegExp('revert')).length, 1, "Expect transaction to revert due to excessive spending limit"); - } - }) - - -}) diff --git a/test/TokenIOERC20FeesApply.js b/test/TokenIOERC20FeesApply.js deleted file mode 100644 index ffe7893..0000000 --- a/test/TokenIOERC20FeesApply.js +++ /dev/null @@ -1,166 +0,0 @@ -const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); -const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") -const TokenIOERC20FeesApply = artifacts.require("./TokenIOERC20FeesApply.sol") -const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") -const { mode, development, production } = require('../token.config.js') -const { utils } = require('ethers') - -const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode - == 'production' ? production : development //set stage - -contract("TokenIOERC20FeesApply", function(accounts) { - // pull in usdx params - const USDx = TOKEN_DETAILS['USDx'] - - // create test accounts - const TEST_ACCOUNT_1 = accounts[0] - const TEST_ACCOUNT_2 = accounts[1] - const TEST_ACCOUNT_3 = accounts[2] - - const DEPOSIT_AMOUNT = 10000e2 - const LIMIT_AMOUNT = (DEPOSIT_AMOUNT/2) - const TRANSFER_AMOUNT = (DEPOSIT_AMOUNT/4) - - /* PARAMETERS */ - - it(`TOKEN_PARAMS - :should correctly set parameters according to c 'token.config.js' - [name, symbol, tla, decimals]`, async () => { - const TOKEN_NAME = USDx.tokenName; - const TOKEN_SYMBOL = USDx.tokenSymbol - const TOKEN_TLA = USDx.tokenTLA - const TOKEN_VERSION = USDx.tokenVersion - const TOKEN_DECIMALS = USDx.tokenDecimals - - - const erc20 = await TokenIOERC20FeesApply.deployed() - const name = await erc20.name() - const symbol = await erc20.symbol() - const tla = await erc20.tla() - const version = await erc20.version() - const decimals = await erc20.decimals() - - assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") - assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") - assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") - assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") - assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") - }) - - /* GETTERS */ - - it(`BALANCE_OF - :should get balance of account1`, async () => { - const erc20 = await TokenIOERC20FeesApply.deployed() - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - - const balance = await erc20.balanceOf(TEST_ACCOUNT_1) - assert.equal(balance, 0) - }) - - it(`ALLOWANCE - :should return allowance of account2 on behalf of account 1`, async () => { - const erc20 = await TokenIOERC20FeesApply.deployed() - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - - const allowance = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) - assert.equal(allowance, 0) - }) - - /* PUBLIC FUNCTIONS */ - - it(`TRANSFER - :should supply uints, debiting the sender and crediting the receiver`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20FeesApply.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - const kycReceipt1 = await CA.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") - const kycReceipt2= await CA.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") - const kycReceipt3= await CA.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") - - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - await storage.allowOwnership(erc20.address) - const tokenSymbol = await erc20.symbol() - assert.equal(tokenSymbol, 'USDx', "Incorrect token symbol") - const depositReceipt = await CA.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") - - const balance1 = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const balance2 = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - - assert.equal(balance1, DEPOSIT_AMOUNT, "first account should contain all the deposit initially") - assert.equal(balance2, 0, "Second account should have zero balance") - - const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT, TEST_ACCOUNT_1) - - const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const balance2b = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - - // calc fees - const TX_FEES = +(await erc20.calculateFees(TRANSFER_AMOUNT)).toString() - - // check spending limit remaining - // Spending limit should remain unchanged! - const SPENDING_LIMIT = +(await CA.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() - const SPENDING_REMAINING = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - - assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT), - "Remaining spending amount should remain equal to set limit amount") - - // calculate correct current balance - assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT-TX_FEES)) - assert.equal(balance2b, TRANSFER_AMOUNT) - }) - - - it(`APPROVE - :should give allowance of remaining balance of account 1 to account 2 - allowances[account1][account2]: 0 --> 100`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20FeesApply.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - const balance1a = +(await erc20.balanceOf(TEST_ACCOUNT_1)) - const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_2)) - - const approveReceipt = await erc20.approve(TEST_ACCOUNT_2, balance1a, TEST_ACCOUNT_1) - const allowance = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() - - assert.notEqual(allowance, 0, "Allowance should not equal zero.") - assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") - }) - - it(`TRANSFER_FROM - :account 2 should spend funds transfering from account1 to account 3 on behalf of account1`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20FeesApply.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - - const TEST_ACT_1_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const TEST_ACT_2_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - const TEST_ACT_3_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() - - assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") - assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") - - const BEG_ALLOWANCE = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) - assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) - - const TRANSFER_FROM_AMOUNT = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - const transferFromReceipt = await erc20.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) - - const TX_FEES = +(await erc20.calculateFees(TRANSFER_FROM_AMOUNT)).toString() - const TEST_ACT_1_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)) - assert.equal(TEST_ACT_1_END_BALANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT-TX_FEES), "Ending balance should be net of transfer amount and fees") - - const TEST_ACT_3_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() - assert.equal(TEST_ACT_3_END_BALANCE, TRANSFER_FROM_AMOUNT, "TEST_ACCOUNT_3 Balance should equal transfer amount"); - - const END_ALLOWANCE = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() - assert.equal(END_ALLOWANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT-TX_FEES), "Allowance should be reduced by amount transferred") - - }) - - -}) diff --git a/test/TokenIOERC20FeesApplyProxy.js b/test/TokenIOERC20FeesApplyProxy.js index 1df2d2a..997d411 100644 --- a/test/TokenIOERC20FeesApplyProxy.js +++ b/test/TokenIOERC20FeesApplyProxy.js @@ -1,9 +1,8 @@ -const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); +const TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") -const TokenIOERC20FeesApply = artifacts.require("./TokenIOERC20FeesApply.sol") const TokenIOERC20FeesApplyProxy = artifacts.require("./TokenIOERC20FeesApplyProxy.sol") -const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") const { mode, development, production } = require('../token.config.js') +const encodeCall = require('./helpers/encodeCall.js') const { utils } = require('ethers') const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode @@ -29,26 +28,29 @@ contract("TokenIOERC20FeesApplyProxy", function(accounts) { const FEE_CONTRACT = USDx.feeContract const TOKEN_DECIMALS = USDx.tokenDecimals - beforeEach(async function () { + before(async function () { this.tokenIOStorage = await TokenIOStorage.deployed() - this.tokenIOERC20FeesApply = await TokenIOERC20FeesApply.deployed() - this.tokenIOCurrencyAuthority = await TokenIOCurrencyAuthority.deployed(); - this.tokenIOERC20FeesApplyProxy = await TokenIOERC20FeesApplyProxy.new(this.tokenIOERC20FeesApply.address); - await this.tokenIOERC20FeesApply.allowOwnership(this.tokenIOERC20FeesApplyProxy.address); - await this.tokenIOERC20FeesApply.initProxy(this.tokenIOERC20FeesApplyProxy.address); + this.tokenIOCurrencyAuthorityProxy = await TokenIOCurrencyAuthorityProxy.deployed(); + this.tokenIOERC20FeesApplyProxy = await TokenIOERC20FeesApplyProxy.deployed(); }); + /* PARAMETERS */ + describe('TOKEN_PARAMS:should correctly set parameters according to token.config.js [name, symbol, tla, decimals]', function () { + it(`should pass`, async function () { + assert.equal(await this.tokenIOERC20FeesApplyProxy.name(), TOKEN_NAME, "Token name should be set in the storage contract.") + assert.equal(await this.tokenIOERC20FeesApplyProxy.symbol(), TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") + assert.equal(await this.tokenIOERC20FeesApplyProxy.tla(), TOKEN_TLA, "Token tla should be set in the storage contract.") + assert.equal(await this.tokenIOERC20FeesApplyProxy.version(), TOKEN_VERSION, "Token version should be set in the storage contract.") + assert.equal(await this.tokenIOERC20FeesApplyProxy.decimals(), TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") + }) + }); - describe('transfer', function () { + describe('TRANSFER:should supply uints, debiting the sender and crediting the receiver', function () { it('Should pass', async function () { - const kycReceipt1 = await this.tokenIOCurrencyAuthority.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") - const kycReceipt2 = await this.tokenIOCurrencyAuthority.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") - const kycReceipt3 = await this.tokenIOCurrencyAuthority.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") - - await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); - const tokenSymbol = await this.tokenIOERC20FeesApplyProxy.symbol() - assert.equal(tokenSymbol, 'USDx', "Incorrect token symbol") - const depositReceipt = await this.tokenIOCurrencyAuthority.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") + await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") + await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") + await this.tokenIOCurrencyAuthorityProxy.deposit(await this.tokenIOERC20FeesApplyProxy.symbol(), TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc."); const balance1 = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString() const balance2 = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() @@ -66,41 +68,33 @@ contract("TokenIOERC20FeesApplyProxy", function(accounts) { // check spending limit remaining // Spending limit should remain unchanged! - const SPENDING_LIMIT = +(await this.tokenIOCurrencyAuthority.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() - const SPENDING_REMAINING = +(await this.tokenIOCurrencyAuthority.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + const SPENDING_LIMIT = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() + const SPENDING_REMAINING = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT), "Remaining spending amount should remain equal to set limit amount") // calculate correct current balance - console.log("BALANCE: " + balance1b) assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT-TX_FEES)) assert.equal(balance2b, TRANSFER_AMOUNT) }); }); - describe('approve', function () { + describe('APPROVE: should give allowance of remaining balance of account 1 to account 2', function () { it('Should pass', async function () { - const kycReceipt1 = await this.tokenIOCurrencyAuthority.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") - await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); - const tokenSymbol = await this.tokenIOERC20FeesApplyProxy.symbol() - assert.equal(tokenSymbol, 'USDx', "Incorrect token symbol") - const depositReceipt = await this.tokenIOCurrencyAuthority.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") - const balance1a = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)) - const balance1b = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)) - console.log(balance1a) const approveReceipt = await this.tokenIOERC20FeesApplyProxy.approve(TEST_ACCOUNT_2, balance1a) - const allowance = +(await this.tokenIOERC20FeesApply.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + const allowance = +(await this.tokenIOERC20FeesApplyProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() assert.notEqual(allowance, 0, "Allowance should not equal zero.") assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") }); }); - describe('transferFrom', function () { + describe('TRANSFER_FROM: account 2 should spend funds transfering from account1 to account 3 on behalf of account1', function () { it('Should pass', async function () { + const TEST_ACT_1_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString() const TEST_ACT_2_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() const TEST_ACT_3_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_3)).toString() @@ -109,11 +103,11 @@ contract("TokenIOERC20FeesApplyProxy", function(accounts) { assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") const BEG_ALLOWANCE = await this.tokenIOERC20FeesApplyProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) - const TRANSFER_FROM_AMOUNT = +(await this.tokenIOCurrencyAuthority.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + const TRANSFER_FROM_AMOUNT = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() const transferFromReceipt = await this.tokenIOERC20FeesApplyProxy.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) - const TX_FEES = +(await this.tokenIOERC20FeesApplyProxy.calculateFees(TRANSFER_FROM_AMOUNT)).toString() const TEST_ACT_1_END_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)) @@ -134,70 +128,22 @@ contract("TokenIOERC20FeesApplyProxy", function(accounts) { }); }); - describe('balanceOf', function () { + describe('BALANCE_OF: should get balance of account1', function () { it('Should pass', async function () { + const TEST_ACT_1_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACT_2_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() + const TEST_ACT_3_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_3)).toString() + const balance = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() assert.equal(balance, TRANSFER_AMOUNT, "first account should contain all the deposit initially") }); }); - describe('allowance', function () { + describe('ALLOWANCE: should return allowance of account2 on behalf of account 1', function () { it('Should pass', async function () { const allowance = await this.tokenIOERC20FeesApplyProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) assert.equal(allowance.toNumber(), 249848) }); }); - describe('setParams', function () { - it('Should pass', async function () { - await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); - - let decimals = await this.tokenIOERC20FeesApplyProxy.decimals(); - assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") - }); - }); - - describe('name', function () { - it('Should pass', async function () { - await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); - - let name = await this.tokenIOERC20FeesApplyProxy.name(); - assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") - }); - }); - - describe('symbol', function () { - it('Should pass', async function () { - await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); - - let symbol = await this.tokenIOERC20FeesApplyProxy.symbol(); - assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") - }); - }); - - describe('version', function () { - it('Should pass', async function () { - await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); - - let version = await this.tokenIOERC20FeesApplyProxy.version(); - assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") - }); - }); - - describe('tla', function () { - it('Should pass', async function () { - await this.tokenIOERC20FeesApplyProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, FEE_CONTRACT, 0); - - let tla = await this.tokenIOERC20FeesApplyProxy.tla(); - assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") - }); - }); - - describe('Total Supply', function () { - it('Should pass', async function () { - let totalSupply = await this.tokenIOERC20FeesApplyProxy.totalSupply(); - assert.equal(totalSupply.toNumber(), DEPOSIT_AMOUNT, "Token name should be set in the storage contract.") - }); - }); - }) \ No newline at end of file diff --git a/test/TokenIOERC20Proxy.js b/test/TokenIOERC20Proxy.js new file mode 100644 index 0000000..55a1f72 --- /dev/null +++ b/test/TokenIOERC20Proxy.js @@ -0,0 +1,194 @@ +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); +const TokenIOERC20Proxy = artifacts.require("./TokenIOERC20Proxy.sol") +const TokenIOFeeContractProxy = artifacts.require("./TokenIOFeeContractProxy.sol") +const { mode, development, production } = require('../token.config.js') +const { utils } = require('ethers') + +const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode + == 'production' ? production : development //set stage + +contract("TokenIOERC20Proxy", function(accounts) { + // pull in usdx params + const USDx = TOKEN_DETAILS['USDx'] + + // create test accounts + const TEST_ACCOUNT_1 = accounts[0] + const TEST_ACCOUNT_2 = accounts[1] + const TEST_ACCOUNT_3 = accounts[2] + + const DEPOSIT_AMOUNT = 10000e2 + const LIMIT_AMOUNT = (DEPOSIT_AMOUNT/2) + const TRANSFER_AMOUNT = (DEPOSIT_AMOUNT/4) + + const TOKEN_NAME = USDx.tokenName + const TOKEN_SYMBOL = USDx.tokenSymbol + const TOKEN_TLA = USDx.tokenTLA + const TOKEN_VERSION = USDx.tokenVersion + const TOKEN_DECIMALS = USDx.tokenDecimals + + const TOKEN_FEE_BPS = FEE_PARAMS.feeBps + const TOKEN_FEE_MIN = FEE_PARAMS.feeMin + const TOKEN_FEE_MAX = FEE_PARAMS.feeMax + const TOKEN_FEE_FLAT = FEE_PARAMS.feeFlat + const TOKEN_FEE_MSG = FEE_PARAMS.feeMsg + + before(async function () { + this.tokenIOERC20Proxy = await TokenIOERC20Proxy.deployed(); + this.tokenIOFeeContractProxy = await TokenIOFeeContractProxy.deployed(); + this.tokenIOStorage = await TokenIOStorage.deployed(); + this.tokenIOCurrencyAuthorityProxy = await TokenIOCurrencyAuthorityProxy.deployed(); + + await this.tokenIOERC20Proxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, this.tokenIOFeeContractProxy.address, 10000); + await this.tokenIOFeeContractProxy.setFeeParams(TOKEN_FEE_BPS, TOKEN_FEE_MIN, TOKEN_FEE_MAX, TOKEN_FEE_FLAT, TOKEN_FEE_MSG); + }); + + /* PARAMETERS */ + + describe("TOKEN_PARAMS: should correctly set parameters according to c 'token.config.js' [name, symbol, tla, decimals]", function () { + it("Should pass", async function () { + + const name = await this.tokenIOERC20Proxy.name() + const symbol = await this.tokenIOERC20Proxy.symbol() + const tla = await this.tokenIOERC20Proxy.tla() + const version = await this.tokenIOERC20Proxy.version() + const decimals = await this.tokenIOERC20Proxy.decimals() + + assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") + assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") + assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") + assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") + assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") + }) + }) + + describe("FEE_PARAMS: should correctly set fee parameters according to config file 'token.config.js' [bps, min, max, flat, account]", function () { + it("Should pass", async function () { + const TOKEN_FEE_ACCOUNT = this.tokenIOFeeContractProxy.address + + const feeParams = await this.tokenIOERC20Proxy.getFeeParams() + const feeBps = feeParams[0] + const feeMin = feeParams[1] + const feeMax = feeParams[2] + const feeFlat = feeParams[3] + const feeMsg = feeParams[4] + const feeAccount = feeParams[5] + + assert.equal(feeBps, TOKEN_FEE_BPS, "Token feeBps should be set in the storage contract.") + assert.equal(feeMin, TOKEN_FEE_MIN, "Token feeMin should be set in the storage contract.") + assert.equal(feeMax, TOKEN_FEE_MAX, "Token feeMax should be set in the storage contract.") + assert.equal(feeFlat, TOKEN_FEE_FLAT, "Token feeFlat should be set in the storage contract.") + assert.equal(feeMsg, TOKEN_FEE_MSG, "Token feeMsg should be set in the storage contract.") + assert.equal(feeAccount, TOKEN_FEE_ACCOUNT, "Token feeAccount should be set in the storage contract.") + }) + }) + + /* GETTERS */ + + describe("BALANCE_OF: should get balance of account1", function () { + it("Should pass", async function () { + const balance = await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_1) + assert.equal(balance, 0) + }) + }) + + describe("ALLOWANCE: should return allowance of account2 on behalf of account 1", function () { + it("Should pass", async function () { + const allowance = await this.tokenIOERC20Proxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(allowance, 0) + }) + }) + + /* PUBLIC FUNCTIONS */ + describe("TRANSFER: should supply uints, debiting the sender and crediting the receiver", function () { + it("Should pass", async function () { + const kycReceipt1 = await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt2= await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt3= await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") + + await this.tokenIOStorage.allowOwnership(this.tokenIOERC20Proxy.address) + const tokenSymbol = await this.tokenIOERC20Proxy.symbol() + const depositReceipt = await this.tokenIOCurrencyAuthorityProxy.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + + const balance1 = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2 = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_2)).toString() + + assert.equal(balance1, DEPOSIT_AMOUNT) + assert.equal(balance2, 0) + + const transferReceipt = await this.tokenIOERC20Proxy.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + const balance1b = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2b = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_2)).toString() + + // calc fees + const TX_FEES = +(await this.tokenIOERC20Proxy.calculateFees(TRANSFER_AMOUNT)).toString() + + // check spending limit remaining + const SPENDING_LIMIT = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() + const SPENDING_REMAINING = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + + assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT - TRANSFER_AMOUNT), + "Remaining spending amount should equal the spending limit minus the transfer amount") + + // calculate correct current balance + assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT-TX_FEES)) + assert.equal(balance2b, TRANSFER_AMOUNT) + }) + }) + + describe("APPROVE:should give allowance of remaining balance of account 1 to account 2 allowances[account1][account2]: 0 --> 100", function () { + it("Should pass", async function () { + const balance1a = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_1)) + const balance1b = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_2)) + + const approveReceipt = await this.tokenIOERC20Proxy.approve(TEST_ACCOUNT_2, balance1a) + const allowance = +(await this.tokenIOERC20Proxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + + assert.notEqual(allowance, 0, "Allowance should not equal zero.") + assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") + }) + }) + + describe("TRANSFER_FROM: account 2 should spend funds transfering from account1 to account 3 on behalf of account1", function () { + it("Should pass", async function () { + const TEST_ACT_1_BEG_BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACT_2_BEG_BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_2)).toString() + const TEST_ACT_3_BEG_BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_3)).toString() + + assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") + assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") + + const BEG_ALLOWANCE = await this.tokenIOERC20Proxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) + + const TRANSFER_FROM_AMOUNT = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + const transferFromReceipt = await this.tokenIOERC20Proxy.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) + + const TX_FEES = +(await this.tokenIOERC20Proxy.calculateFees(TRANSFER_FROM_AMOUNT)).toString() + const TEST_ACT_1_END_BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_1)) + assert.equal(TEST_ACT_1_END_BALANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT-TX_FEES), "Ending balance should be net of transfer amount and fees") + + const TEST_ACT_3_END_BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(TEST_ACT_3_END_BALANCE, TRANSFER_FROM_AMOUNT, "TEST_ACCOUNT_3 Balance should equal transfer amount"); + + const END_ALLOWANCE = +(await this.tokenIOERC20Proxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + assert.equal(END_ALLOWANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT), "Allowance should be reduced by amount transferred") + }) + }) + + describe("Should attempt to transfer more than the daily limit for the account and fail", function () { + it("Should pass", async function () { + const SPENDING_REMAINING = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + assert.equal(0, SPENDING_REMAINING, "Expect daily spending limit to be zero") + + try { + const TRANSFER_AMOUNT = 100e2 + const TRANSFER_TX = await this.tokenIOERC20Proxy.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + } catch (error) { + assert.equal(error.message.match(RegExp('revert')).length, 1, "Expect transaction to revert due to excessive spending limit"); + } + }) + }) + + +}) diff --git a/test/TokenIOERC20Unlimited.js b/test/TokenIOERC20Unlimited.js deleted file mode 100644 index 09659e4..0000000 --- a/test/TokenIOERC20Unlimited.js +++ /dev/null @@ -1,163 +0,0 @@ -const TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); -const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") -const TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol") -const TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol") -const { mode, development, production } = require('../token.config.js') -const { utils } = require('ethers') - -const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode - == 'production' ? production : development //set stage - -contract("TokenIOERC20Unlimited", function(accounts) { - // pull in usdx params - const USDx = TOKEN_DETAILS['USDx'] - - // create test accounts - const TEST_ACCOUNT_1 = accounts[0] - const TEST_ACCOUNT_2 = accounts[1] - const TEST_ACCOUNT_3 = accounts[2] - - const DEPOSIT_AMOUNT = 10000e2 - const LIMIT_AMOUNT = (DEPOSIT_AMOUNT/2) - const TRANSFER_AMOUNT = (DEPOSIT_AMOUNT/4) - - /* PARAMETERS */ - - it(`TOKEN_PARAMS - :should correctly set parameters according to c 'token.config.js' - [name, symbol, tla, decimals]`, async () => { - const TOKEN_NAME = USDx.tokenName; - const TOKEN_SYMBOL = USDx.tokenSymbol - const TOKEN_TLA = USDx.tokenTLA - const TOKEN_VERSION = USDx.tokenVersion - const TOKEN_DECIMALS = USDx.tokenDecimals - - - const erc20 = await TokenIOERC20Unlimited.deployed() - const name = await erc20.name() - const symbol = await erc20.symbol() - const tla = await erc20.tla() - const version = await erc20.version() - const decimals = await erc20.decimals() - - assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") - assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") - assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") - assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") - assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") - }) - - /* GETTERS */ - - it(`BALANCE_OF - :should get balance of account1`, async () => { - const erc20 = await TokenIOERC20Unlimited.deployed() - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - - const balance = await erc20.balanceOf(TEST_ACCOUNT_1) - assert.equal(balance, 0) - }) - - it(`ALLOWANCE - :should return allowance of account2 on behalf of account 1`, async () => { - const erc20 = await TokenIOERC20Unlimited.deployed() - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - - const allowance = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) - assert.equal(allowance, 0) - }) - - /* PUBLIC FUNCTIONS */ - - it(`TRANSFER - :should supply uints, debiting the sender and crediting the receiver`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20Unlimited.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - const kycReceipt1 = await CA.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") - const kycReceipt2= await CA.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") - const kycReceipt3= await CA.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") - - await erc20.setParams(...Object.values(TOKEN_DETAILS['USDx']).map((v) => { return v })) - await storage.allowOwnership(erc20.address) - const tokenSymbol = await erc20.symbol() - const depositReceipt = await CA.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") - - const balance1 = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const balance2 = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - - assert.equal(balance1, DEPOSIT_AMOUNT) - assert.equal(balance2, 0) - - const transferReceipt = await erc20.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) - const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const balance2b = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - - // calc fees - // const TX_FEES = +(await erc20.calculateFees(TRANSFER_AMOUNT)).toString() - - // check spending limit remaining - // Spending limit should remain unchanged! - const SPENDING_LIMIT = +(await CA.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() - const SPENDING_REMAINING = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - - assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT), - "Remaining spending amount should remain equal to set limit amount") - - // calculate correct current balance - assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT)) - assert.equal(balance2b, TRANSFER_AMOUNT) - }) - - - it(`APPROVE - :should give allowance of remaining balance of account 1 to account 2 - allowances[account1][account2]: 0 --> 100`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20Unlimited.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - const balance1a = +(await erc20.balanceOf(TEST_ACCOUNT_1)) - const balance1b = +(await erc20.balanceOf(TEST_ACCOUNT_2)) - - const approveReceipt = await erc20.approve(TEST_ACCOUNT_2, balance1a) - const allowance = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() - - assert.notEqual(allowance, 0, "Allowance should not equal zero.") - assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") - }) - - it(`TRANSFER_FROM - :account 2 should spend funds transfering from account1 to account 3 on behalf of account1`, async () => { - const storage = await TokenIOStorage.deployed() - const erc20 = await TokenIOERC20Unlimited.deployed() - const CA = await TokenIOCurrencyAuthority.deployed(); - - - const TEST_ACT_1_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)).toString() - const TEST_ACT_2_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_2)).toString() - const TEST_ACT_3_BEG_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() - - assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") - assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") - - const BEG_ALLOWANCE = await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) - assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) - - const TRANSFER_FROM_AMOUNT = +(await CA.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() - const transferFromReceipt = await erc20.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) - - // const TX_FEES = +(await erc20.calculateFees(TRANSFER_FROM_AMOUNT)).toString() - const TEST_ACT_1_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_1)) - assert.equal(TEST_ACT_1_END_BALANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT), "Ending balance should be net of transfer amount and fees") - - const TEST_ACT_3_END_BALANCE = +(await erc20.balanceOf(TEST_ACCOUNT_3)).toString() - assert.equal(TEST_ACT_3_END_BALANCE, TRANSFER_FROM_AMOUNT, "TEST_ACCOUNT_3 Balance should equal transfer amount"); - - const END_ALLOWANCE = +(await erc20.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() - assert.equal(END_ALLOWANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT), "Allowance should be reduced by amount transferred") - - }) - -}) diff --git a/test/TokenIOERC20UnlimitedProxy.js b/test/TokenIOERC20UnlimitedProxy.js new file mode 100644 index 0000000..836db91 --- /dev/null +++ b/test/TokenIOERC20UnlimitedProxy.js @@ -0,0 +1,159 @@ +const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") +const TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); +const TokenIOERC20UnlimitedProxy = artifacts.require("./TokenIOERC20UnlimitedProxy.sol") +const TokenIOFeeContractProxy = artifacts.require("./TokenIOFeeContractProxy.sol") +const { mode, development, production } = require('../token.config.js') +const { utils } = require('ethers') + +const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode + == 'production' ? production : development //set stage + +contract("TokenIOERC20UnlimitedProxy", function(accounts) { + // pull in usdx params + const USDx = TOKEN_DETAILS['USDx'] + + // create test accounts + const TEST_ACCOUNT_1 = accounts[0] + const TEST_ACCOUNT_2 = accounts[1] + const TEST_ACCOUNT_3 = accounts[2] + + const DEPOSIT_AMOUNT = 10000e2 + const LIMIT_AMOUNT = (DEPOSIT_AMOUNT/2) + const TRANSFER_AMOUNT = (DEPOSIT_AMOUNT/4) + + const TOKEN_NAME = USDx.tokenName + const TOKEN_SYMBOL = USDx.tokenSymbol + const TOKEN_TLA = USDx.tokenTLA + const TOKEN_VERSION = USDx.tokenVersion + const TOKEN_DECIMALS = USDx.tokenDecimals + + before(async function () { + this.tokenIOERC20UnlimitedProxy = await TokenIOERC20UnlimitedProxy.deployed(); + this.tokenIOFeeContractProxy = await TokenIOFeeContractProxy.deployed(); + this.tokenIOStorage = await TokenIOStorage.deployed(); + this.tokenIOCurrencyAuthorityProxy = await TokenIOCurrencyAuthorityProxy.deployed(); + + await this.tokenIOERC20UnlimitedProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, this.tokenIOFeeContractProxy.address, 10000); + }); + + /* PARAMETERS */ + + describe("TOKEN_PARAMS:should correctly set parameters according to c 'token.config.js' [name, symbol, tla, decimals]", function () { + it("Should pass", async function () { + + const name = await this.tokenIOERC20UnlimitedProxy.name() + const symbol = await this.tokenIOERC20UnlimitedProxy.symbol() + const tla = await this.tokenIOERC20UnlimitedProxy.tla() + const version = await this.tokenIOERC20UnlimitedProxy.version() + const decimals = await this.tokenIOERC20UnlimitedProxy.decimals() + + assert.equal(name, TOKEN_NAME, "Token name should be set in the storage contract.") + assert.equal(symbol, TOKEN_SYMBOL, "Token symbol should be set in the storage contract.") + assert.equal(tla, TOKEN_TLA, "Token tla should be set in the storage contract.") + assert.equal(version, TOKEN_VERSION, "Token version should be set in the storage contract.") + assert.equal(decimals, TOKEN_DECIMALS, "Token decimals should be set in the storage contract.") + }) + }) + + /* GETTERS */ + + describe("BALANCE_OF:should get balance of account1", function () { + it("Should pass", async function () { + const balance = await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_1) + assert.equal(balance, 0) + }) + }) + + describe("ALLOWANCE:should return allowance of account2 on behalf of account 1", function () { + it("Should pass", async function () { + const allowance = await this.tokenIOERC20UnlimitedProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(allowance, 0) + }) + }) + + /* PUBLIC FUNCTIONS */ + + describe("TRANSFER:should supply uints, debiting the sender and crediting the receiver", function () { + it("Should pass", async function () { + const kycReceipt1 = await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt2= await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_2, true, LIMIT_AMOUNT, "Token, Inc.") + const kycReceipt3= await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_3, true, LIMIT_AMOUNT, "Token, Inc.") + + await this.tokenIOStorage.allowOwnership(this.tokenIOERC20UnlimitedProxy.address) + const tokenSymbol = await this.tokenIOERC20UnlimitedProxy.symbol() + const depositReceipt = await this.tokenIOCurrencyAuthorityProxy.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + + const balance1 = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2 = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_2)).toString() + + assert.equal(balance1, DEPOSIT_AMOUNT) + assert.equal(balance2, 0) + + const transferReceipt = await this.tokenIOERC20UnlimitedProxy.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + const balance1b = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_1)).toString() + const balance2b = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_2)).toString() + + // calc fees + // const TX_FEES = +(await erc20.calculateFees(TRANSFER_AMOUNT)).toString() + + // check spending limit remaining + // Spending limit should remain unchanged! + const SPENDING_LIMIT = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingLimit(TEST_ACCOUNT_1)).toString() + const SPENDING_REMAINING = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + + assert.equal(SPENDING_REMAINING, (SPENDING_LIMIT), + "Remaining spending amount should remain equal to set limit amount") + + // calculate correct current balance + assert.equal(balance1b, (DEPOSIT_AMOUNT-TRANSFER_AMOUNT)) + assert.equal(balance2b, TRANSFER_AMOUNT) + }) + }) + + describe("APPROVE:should give allowance of remaining balance of account 1 to account 2 allowances[account1][account2]: 0 --> 100", function () { + it("Should pass", async function () { + const kycReceipt1 = await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_1, true, LIMIT_AMOUNT, "Token, Inc.") + + await this.tokenIOStorage.allowOwnership(this.tokenIOERC20UnlimitedProxy.address) + const tokenSymbol = await this.tokenIOERC20UnlimitedProxy.symbol() + const depositReceipt = await this.tokenIOCurrencyAuthorityProxy.deposit(tokenSymbol, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + + const balance1a = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_1)) + const balance1b = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_2)) + + const approveReceipt = await this.tokenIOERC20UnlimitedProxy.approve(TEST_ACCOUNT_2, balance1a) + const allowance = +(await this.tokenIOERC20UnlimitedProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + + assert.notEqual(allowance, 0, "Allowance should not equal zero.") + assert.equal(allowance, balance1a, "Allowance should be the same value as the balance of account 1") + }) + }) + + describe("TRANSFER_FROM:account 2 should spend funds transfering from account1 to account 3 on behalf of account1", function () { + it("Should pass", async function () { + const TEST_ACT_1_BEG_BALANCE = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACT_2_BEG_BALANCE = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_2)).toString() + const TEST_ACT_3_BEG_BALANCE = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_3)).toString() + + assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") + assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") + console.log("Debug") + const BEG_ALLOWANCE = await this.tokenIOERC20UnlimitedProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) + assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) + + const TRANSFER_FROM_AMOUNT = +(await this.tokenIOCurrencyAuthorityProxy.getAccountSpendingRemaining(TEST_ACCOUNT_1)).toString() + const transferFromReceipt = await this.tokenIOERC20UnlimitedProxy.transferFrom(TEST_ACCOUNT_1, TEST_ACCOUNT_3, TRANSFER_FROM_AMOUNT, { from: TEST_ACCOUNT_2 }) + + // const TX_FEES = +(await erc20.calculateFees(TRANSFER_FROM_AMOUNT)).toString() + const TEST_ACT_1_END_BALANCE = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_1)) + assert.equal(TEST_ACT_1_END_BALANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT), "Ending balance should be net of transfer amount and fees") + + const TEST_ACT_3_END_BALANCE = +(await this.tokenIOERC20UnlimitedProxy.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(TEST_ACT_3_END_BALANCE, TRANSFER_FROM_AMOUNT, "TEST_ACCOUNT_3 Balance should equal transfer amount"); + + const END_ALLOWANCE = +(await this.tokenIOERC20UnlimitedProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2)).toString() + assert.equal(END_ALLOWANCE, (TEST_ACT_1_BEG_BALANCE-TRANSFER_FROM_AMOUNT), "Allowance should be reduced by amount transferred") + }) + }) + +}) diff --git a/test/TokenIOFX.js b/test/TokenIOFXProxy.js similarity index 72% rename from test/TokenIOFX.js rename to test/TokenIOFXProxy.js index 4a3af7e..7bc8a5f 100644 --- a/test/TokenIOFX.js +++ b/test/TokenIOFXProxy.js @@ -1,9 +1,12 @@ -var { Wallet, utils, SigningKey } = require('ethers'); +/*var { Wallet, utils, SigningKey } = require('ethers'); var Promise = require('bluebird') var TokenIOERC20 = artifacts.require("./TokenIOERC20.sol"); var TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); var TokenIOStorage = artifacts.require("./TokenIOStorage.sol"); var TokenIOFX = artifacts.require("./TokenIOFX.sol"); +var TokenIOERC20Proxy = artifacts.require("./TokenIOERC20Proxy.sol"); +var TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); +var TokenIOFXProxy = artifacts.require("./TokenIOFXProxy.sol"); const { mode, development, production } = require('../token.config.js'); const { @@ -15,7 +18,7 @@ const USDx = TOKEN_DETAILS['USDx'] const EURx = TOKEN_DETAILS['EURx'] -contract("TokenIOFX", function(accounts) { +contract("TokenIOFXProxy", function(accounts) { // Globals const coder = new utils.AbiCoder() @@ -34,8 +37,8 @@ contract("TokenIOFX", function(accounts) { before(async () => { const storage = await TokenIOStorage.deployed() - TOKEN_A = await TokenIOERC20.new(storage.address) - TOKEN_B = await TokenIOERC20.new(storage.address) + TOKEN_A = await TokenIOERC20Proxy.new(await TokenIOERC20.new(storage.address).address) + TOKEN_B = await TokenIOERC20Proxy.new(await TokenIOERC20.new(storage.address).address) await storage.allowOwnership(TOKEN_A.address) await storage.allowOwnership(TOKEN_B.address) @@ -45,23 +48,26 @@ contract("TokenIOFX", function(accounts) { REQUESTER_WALLET = await Wallet.createRandom() }) - it("Should ensure token symbols are correctly set", async () => { + describe("Should ensure token symbols are correctly set", function () { + it("Should pass", async function () { TOKEN_A_SYMBOL = await TOKEN_A.symbol() TOKEN_B_SYMBOL = await TOKEN_B.symbol() assert.equal(TOKEN_A_SYMBOL, "USDx", "Initiated Token should be USDx") assert.equal(TOKEN_B_SYMBOL, "EURx", "Initiated Token should be EURx") - + }) }) - it("Should Deposit EURx into REQUESTER_WALLET account", async () => { + describe("Should Deposit EURx into REQUESTER_WALLET account", function () { + it("Should pass", async function () { const CA = await TokenIOCurrencyAuthority.deployed(); + const CAProxy = await TokenIOCurrencyAuthorityProxy.new(CA.address, "0x00"); - const APPROVE_REQUESTER = await CA.approveKYC(REQUESTER_WALLET.address, true, SPENDING_LIMIT, "Token, Inc.") - const APPROVE_FULFILLER = await CA.approveKYC(TEST_ACCOUNT_1, true, SPENDING_LIMIT, "Token, Inc.") + const APPROVE_REQUESTER = await CAProxy.approveKYC(REQUESTER_WALLET.address, true, SPENDING_LIMIT, "Token, Inc.") + const APPROVE_FULFILLER = await CAProxy.approveKYC(TEST_ACCOUNT_1, true, SPENDING_LIMIT, "Token, Inc.") - const DEPOSIT_REQUESTER_AMOUNT_TX = await CA.deposit(TOKEN_B_SYMBOL, REQUESTER_WALLET.address, REQUESTER_OFFERED_AMOUNT, "Token, Inc.") - const DEPOSIT_FULFILLER_AMOUNT_TX = await CA.deposit(TOKEN_A_SYMBOL, TEST_ACCOUNT_1, REQUESTER_DESIRED_AMOUNT, "Token, Inc.") + const DEPOSIT_REQUESTER_AMOUNT_TX = await CAProxy.deposit(TOKEN_B_SYMBOL, REQUESTER_WALLET.address, REQUESTER_OFFERED_AMOUNT, "Token, Inc.") + const DEPOSIT_FULFILLER_AMOUNT_TX = await CAProxy.deposit(TOKEN_A_SYMBOL, TEST_ACCOUNT_1, REQUESTER_DESIRED_AMOUNT, "Token, Inc.") assert.equal(DEPOSIT_REQUESTER_AMOUNT_TX['receipt']['status'], "0x1", "Transaction should be successful") assert.equal(DEPOSIT_FULFILLER_AMOUNT_TX['receipt']['status'], "0x1", "Transaction should be successful") @@ -72,11 +78,13 @@ contract("TokenIOFX", function(accounts) { const FULFILLER_BALANCE = +(await TOKEN_A.balanceOf(TEST_ACCOUNT_1)).toString() assert.equal(FULFILLER_BALANCE, REQUESTER_DESIRED_AMOUNT, "Fulfiller balance should equal the requester desired amount") + }) + }) - }) - - it("Should allow the swap between the requester and the fulfiller", async () => { + describe("Should allow the swap between the requester and the fulfiller", function () { + it("Should pass", async function () { const FX = await TokenIOFX.deployed(); + const FXProxy = await TokenIOERC20Proxy.new(FX.address) const expiration = ((new Date().getTime() * 1000) + 86400 ); @@ -95,7 +103,7 @@ contract("TokenIOFX", function(accounts) { assert.equal(+(await TOKEN_A.balanceOf(TEST_ACCOUNT_1)).toString(), REQUESTER_DESIRED_AMOUNT, "Fulfiller balance should equal the requester desired amount") assert.equal(+(await TOKEN_B.balanceOf(TEST_ACCOUNT_1)).toString(), 0, "Fulfiller balance for token B should be zero") - const SWAP_TX = await FX.swap( + const SWAP_TX = await FXProxy.swap( REQUESTER_WALLET.address.toLowerCase(), TOKEN_A_SYMBOL, TOKEN_B_SYMBOL, REQUESTER_DESIRED_AMOUNT, REQUESTER_OFFERED_AMOUNT, @@ -108,7 +116,7 @@ contract("TokenIOFX", function(accounts) { assert.equal(+(await TOKEN_B.balanceOf(REQUESTER_WALLET.address)).toString(), 0, "Requester balance for token B should be zero after swap") assert.equal(+(await TOKEN_B.balanceOf(TEST_ACCOUNT_1)).toString(), REQUESTER_OFFERED_AMOUNT, "Requester balance should equal desired amount") assert.equal(+(await TOKEN_A.balanceOf(TEST_ACCOUNT_1)).toString(), 0, "Fulfiller balance for token A should be zero after swap") + }) + }) - }) - -}); +});*/ diff --git a/test/TokenIOFeeContract.js b/test/TokenIOFeeContract.js deleted file mode 100644 index 4a753f2..0000000 --- a/test/TokenIOFeeContract.js +++ /dev/null @@ -1,70 +0,0 @@ -var { utils } = require('ethers'); -var Promise = require('bluebird') -var TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol"); -var TokenIOERC20 = artifacts.require("./TokenIOERC20.sol"); -var TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); - -const { mode, development, production } = require('../token.config.js'); - -const { - AUTHORITY_DETAILS: { firmName, authorityAddress }, - TOKEN_DETAILS -} = mode == 'production' ? production : development; - -const USDx = TOKEN_DETAILS['USDx'] - - -contract("TokenIOFeeContract", function(accounts) { - - const TEST_ACCOUNT_1 = accounts[0] - const TEST_ACCOUNT_2 = accounts[1] - const TEST_ACCOUNT_3 = accounts[2] - const DEPOSIT_AMOUNT = 10000e2 // 1 million USD; 2 decimal representation - const TRANSFER_AMOUNT = DEPOSIT_AMOUNT/4 - const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 - - it("Should transfer an amount of funds and send the fees to the fee contract", async () => { - const CA = await TokenIOCurrencyAuthority.deployed() - const token = await TokenIOERC20.deployed() - const feeContract = await TokenIOFeeContract.deployed() - - const APPROVE_ACCOUNT_1_TX = await CA.approveKYC(TEST_ACCOUNT_1, true, SPENDING_LIMIT, "Token, Inc.") - const APPROVE_ACCOUNT_2_TX = await CA.approveKYC(TEST_ACCOUNT_2, true, SPENDING_LIMIT, "Token, Inc.") - const APPROVE_ACCOUNT_3_TX = await CA.approveKYC(TEST_ACCOUNT_3, true, SPENDING_LIMIT, "Token, Inc.") - - assert.equal(APPROVE_ACCOUNT_1_TX['receipt']['status'], "0x1", "Transaction should succeed.") - assert.equal(APPROVE_ACCOUNT_2_TX['receipt']['status'], "0x1", "Transaction should succeed.") - - const DEPOSIT_TX = await CA.deposit('USDx', TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") - assert.equal(DEPOSIT_TX['receipt']['status'], "0x1", "Transaction should succeed.") - - const TRANSFER_TX = await token.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) - assert.equal(TRANSFER_TX['receipt']['status'], "0x1", "Transaction should succeed.") - - const FEE_CONTRACT_BALANCE = +(await token.balanceOf(feeContract.address)).toString(); - const TX_FEES = +(await token.calculateFees(TRANSFER_AMOUNT)).toString() - assert.equal(FEE_CONTRACT_BALANCE, TX_FEES, "Fee contract should have a balance equal to the transaction fees") - - }) - - it("Should allow the fee contract to transfer an amount of tokens", async () => { - const feeContract = await TokenIOFeeContract.deployed() - const token = await TokenIOERC20.deployed() - - const TEST_ACCOUNT_3_BALANCE_BEG = +(await token.balanceOf(TEST_ACCOUNT_3)).toString() - assert.equal(0, TEST_ACCOUNT_3_BALANCE_BEG, "TEST_ACCOUNT_3 should have a starting balance of zero.") - - const FEE_BALANCE = +(await feeContract.getTokenBalance('USDx')).toString() - const TRANSFER_COLLECTED_FEES_TX = await feeContract.transferCollectedFees('USDx', TEST_ACCOUNT_3, FEE_BALANCE, "0x") - - assert.equal(TRANSFER_COLLECTED_FEES_TX['receipt']['status'], "0x1", "Transaction should succeed.") - - const TEST_ACCOUNT_3_BALANCE_END = +(await token.balanceOf(TEST_ACCOUNT_3)).toString() - assert.equal(FEE_BALANCE, TEST_ACCOUNT_3_BALANCE_END, "TEST_ACCOUNT_3 should have successfully received the amount of the fee balance.") - - }) - - - - -}) diff --git a/test/TokenIOFeeContractProxy.js b/test/TokenIOFeeContractProxy.js new file mode 100644 index 0000000..4b53218 --- /dev/null +++ b/test/TokenIOFeeContractProxy.js @@ -0,0 +1,78 @@ +var { utils } = require('ethers'); +var Promise = require('bluebird') +var TokenIOERC20Proxy = artifacts.require("./TokenIOERC20Proxy.sol"); +var TokenIOFeeContractProxy = artifacts.require("./TokenIOFeeContractProxy.sol"); +var TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); + +const { mode, development, production } = require('../token.config.js'); + +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS +} = mode == 'production' ? production : development; + +const USDx = TOKEN_DETAILS['USDx'] + + +contract("TokenIOFeeContractProxy", function(accounts) { + + const TEST_ACCOUNT_1 = accounts[0] + const TEST_ACCOUNT_2 = accounts[1] + const TEST_ACCOUNT_3 = accounts[2] + const DEPOSIT_AMOUNT = 10000e2 // 1 million USD; 2 decimal representation + const TRANSFER_AMOUNT = DEPOSIT_AMOUNT/4 + const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 + + const TOKEN_NAME = USDx.tokenName; + const TOKEN_SYMBOL = USDx.tokenSymbol + const TOKEN_TLA = USDx.tokenTLA + const TOKEN_VERSION = USDx.tokenVersion + const TOKEN_DECIMALS = USDx.tokenDecimals + + before(async function () { + this.tokenIOERC20Proxy = await TokenIOERC20Proxy.deployed(); + this.tokenIOFeeContractProxy = await TokenIOFeeContractProxy.deployed(); + this.tokenIOCurrencyAuthorityProxy = await TokenIOCurrencyAuthorityProxy.deployed(); + + await this.tokenIOERC20Proxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, this.tokenIOFeeContractProxy.address, 0); + }); + + describe('Should transfer an amount of funds and send the fees to the fee contract', function () { + it("Should pass", async function () { + const APPROVE_ACCOUNT_1_TX = await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_1, true, SPENDING_LIMIT, "Token, Inc.") + const APPROVE_ACCOUNT_2_TX = await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_2, true, SPENDING_LIMIT, "Token, Inc.") + const APPROVE_ACCOUNT_3_TX = await this.tokenIOCurrencyAuthorityProxy.approveKYC(TEST_ACCOUNT_3, true, SPENDING_LIMIT, "Token, Inc.") + + assert.equal(APPROVE_ACCOUNT_1_TX['receipt']['status'], "0x1", "Transaction should succeed.") + assert.equal(APPROVE_ACCOUNT_2_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const DEPOSIT_TX = await this.tokenIOCurrencyAuthorityProxy.deposit('USDx', TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + assert.equal(DEPOSIT_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const TRANSFER_TX = await this.tokenIOERC20Proxy.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + assert.equal(TRANSFER_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const FEE_CONTRACT_BALANCE = +(await this.tokenIOERC20Proxy.balanceOf(this.tokenIOFeeContractProxy.address)).toString(); + const TX_FEES = +(await this.tokenIOERC20Proxy.calculateFees(TRANSFER_AMOUNT)).toString() + assert.equal(FEE_CONTRACT_BALANCE, TX_FEES, "Fee contract should have a balance equal to the transaction fees") + + }) + }); + + describe('Should allow the fee contract to transfer an amount of tokens', function () { + it("Should pass", async function () { + const TEST_ACCOUNT_3_BALANCE_BEG = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(0, TEST_ACCOUNT_3_BALANCE_BEG, "TEST_ACCOUNT_3 should have a starting balance of zero.") + + const FEE_BALANCE = +(await this.tokenIOFeeContractProxy.getTokenBalance('USDx')).toString() + const TRANSFER_COLLECTED_FEES_TX = await this.tokenIOFeeContractProxy.transferCollectedFees('USDx', TEST_ACCOUNT_3, FEE_BALANCE, "0x") + + assert.equal(TRANSFER_COLLECTED_FEES_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const TEST_ACCOUNT_3_BALANCE_END = +(await this.tokenIOERC20Proxy.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(FEE_BALANCE, TEST_ACCOUNT_3_BALANCE_END, "TEST_ACCOUNT_3 should have successfully received the amount of the fee balance.") + + }) + }) + +}) diff --git a/test/TokenIOMerchant.js b/test/TokenIOMerchant.js deleted file mode 100644 index d86c5b3..0000000 --- a/test/TokenIOMerchant.js +++ /dev/null @@ -1,78 +0,0 @@ -var { utils } = require('ethers'); -var Promise = require('bluebird') -var TokenIOFeeContract = artifacts.require("./TokenIOFeeContract.sol"); -var TokenIOMerchant = artifacts.require("./TokenIOMerchant.sol"); -var TokenIOERC20 = artifacts.require("./TokenIOERC20.sol"); -var TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); - -const { mode, development, production } = require('../token.config.js'); - -const { - AUTHORITY_DETAILS: { firmName, authorityAddress }, - TOKEN_DETAILS -} = mode == 'production' ? production : development; - -const USDx = TOKEN_DETAILS['USDx'] - - -contract("TokenIOFeeContract", function(accounts) { - - const TEST_ACCOUNT_1 = accounts[0] - const TEST_ACCOUNT_2 = accounts[1] - const MERCHANT_ACCOUNT = TEST_ACCOUNT_2 - const TEST_ACCOUNT_3 = accounts[2] - const DEPOSIT_AMOUNT = 10000e2 // 1 million USD; 2 decimal representation - const TRANSFER_AMOUNT = DEPOSIT_AMOUNT/4 - const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 - const CURRENCY_SYMBOL = 'USDx' - const MERCHANT_PAYS_FEES = true; - - it("Should transfer an amount of funds to merchant and send the fees to the fee contract", async () => { - const CA = await TokenIOCurrencyAuthority.deployed() - const merchant = await TokenIOMerchant.deployed() - const token = await TokenIOERC20.deployed() - const feeContract = await TokenIOFeeContract.deployed() - - const APPROVE_ACCOUNT_1_TX = await CA.approveKYC(TEST_ACCOUNT_1, true, SPENDING_LIMIT, "Token, Inc.") - const APPROVE_ACCOUNT_2_TX = await CA.approveKYC(TEST_ACCOUNT_2, true, SPENDING_LIMIT, "Token, Inc.") - const APPROVE_ACCOUNT_3_TX = await CA.approveKYC(TEST_ACCOUNT_3, true, SPENDING_LIMIT, "Token, Inc.") - - assert.equal(APPROVE_ACCOUNT_1_TX['receipt']['status'], "0x1", "Transaction should succeed.") - assert.equal(APPROVE_ACCOUNT_2_TX['receipt']['status'], "0x1", "Transaction should succeed.") - - const DEPOSIT_TX = await CA.deposit(CURRENCY_SYMBOL, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") - assert.equal(DEPOSIT_TX['receipt']['status'], "0x1", "Transaction should succeed.") - - const TRANSFER_TX = await merchant.pay(CURRENCY_SYMBOL, MERCHANT_ACCOUNT, TRANSFER_AMOUNT, MERCHANT_PAYS_FEES, "0x0") - assert.equal(TRANSFER_TX['receipt']['status'], "0x1", "Transaction should succeed.") - - const FEE_CONTRACT_BALANCE = +(await token.balanceOf(feeContract.address)).toString(); - const TX_FEES = +(await merchant.calculateFees(TRANSFER_AMOUNT)).toString() - assert.equal(FEE_CONTRACT_BALANCE, TX_FEES, "Fee contract should have a balance equal to the transaction fees") - - const MERCHANT_ACCOUNT_BALANCE = +(await token.balanceOf(MERCHANT_ACCOUNT)).toString(); - assert.equal(MERCHANT_ACCOUNT_BALANCE, (TRANSFER_AMOUNT-TX_FEES), "Merchant account should have a balance equal to the transaction amount minus fees") - - }) - - it("Should allow the fee contract to transfer an amount of tokens", async () => { - const feeContract = await TokenIOFeeContract.deployed() - const token = await TokenIOERC20.deployed() - - const TEST_ACCOUNT_3_BALANCE_BEG = +(await token.balanceOf(TEST_ACCOUNT_3)).toString() - assert.equal(0, TEST_ACCOUNT_3_BALANCE_BEG, "TEST_ACCOUNT_3 should have a starting balance of zero.") - - const FEE_BALANCE = +(await feeContract.getTokenBalance(CURRENCY_SYMBOL)).toString() - const TRANSFER_COLLECTED_FEES_TX = await feeContract.transferCollectedFees(CURRENCY_SYMBOL, TEST_ACCOUNT_3, FEE_BALANCE, "0x") - - assert.equal(TRANSFER_COLLECTED_FEES_TX['receipt']['status'], "0x1", "Transaction should succeed.") - - const TEST_ACCOUNT_3_BALANCE_END = +(await token.balanceOf(TEST_ACCOUNT_3)).toString() - assert.equal(FEE_BALANCE, TEST_ACCOUNT_3_BALANCE_END, "TEST_ACCOUNT_3 should have successfully received the amount of the fee balance.") - - }) - - - - -}) diff --git a/test/TokenIOMerchantProxy.js b/test/TokenIOMerchantProxy.js new file mode 100644 index 0000000..259d348 --- /dev/null +++ b/test/TokenIOMerchantProxy.js @@ -0,0 +1,88 @@ +var { utils } = require('ethers'); +var Promise = require('bluebird') +var TokenIOFeeContractProxy = artifacts.require("./TokenIOFeeContractProxy.sol"); +var TokenIOMerchantProxy = artifacts.require("./TokenIOMerchantProxy.sol"); +var TokenIOERC20Proxy = artifacts.require("./TokenIOERC20Proxy.sol"); +var TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); + +const { mode, development, production } = require('../token.config.js'); + +const { + AUTHORITY_DETAILS: { firmName, authorityAddress }, + TOKEN_DETAILS +} = mode == 'production' ? production : development; + +const USDx = TOKEN_DETAILS['USDx'] + + +contract("TokenIOMerchantProxy", function(accounts) { + + const TEST_ACCOUNT_1 = accounts[0] + const TEST_ACCOUNT_2 = accounts[1] + const MERCHANT_ACCOUNT = TEST_ACCOUNT_2 + const TEST_ACCOUNT_3 = accounts[2] + const DEPOSIT_AMOUNT = 10000e2 // 1 million USD; 2 decimal representation + const TRANSFER_AMOUNT = DEPOSIT_AMOUNT/4 + const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 + const MERCHANT_PAYS_FEES = true; + + const TOKEN_NAME = USDx.tokenName + const TOKEN_SYMBOL = USDx.tokenSymbol + const TOKEN_TLA = USDx.tokenTLA + const TOKEN_VERSION = USDx.tokenVersion + const TOKEN_DECIMALS = USDx.tokenDecimals + + it("Should transfer an amount of funds to merchant and send the fees to the fee contract", async () => { + const CAProxy = await TokenIOCurrencyAuthorityProxy.deployed() + const merchantProxy = await TokenIOMerchantProxy.deployed() + const tokenProxy = await TokenIOERC20Proxy.deployed() + const feeContractProxy = await TokenIOFeeContractProxy.deployed(); + + await merchantProxy.setParams(feeContractProxy.address) + await tokenProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, feeContractProxy.address, 10000); + + const APPROVE_ACCOUNT_1_TX = await CAProxy.approveKYC(TEST_ACCOUNT_1, true, SPENDING_LIMIT, "Token, Inc.") + const APPROVE_ACCOUNT_2_TX = await CAProxy.approveKYC(TEST_ACCOUNT_2, true, SPENDING_LIMIT, "Token, Inc.") + const APPROVE_ACCOUNT_3_TX = await CAProxy.approveKYC(TEST_ACCOUNT_3, true, SPENDING_LIMIT, "Token, Inc.") + + assert.equal(APPROVE_ACCOUNT_1_TX['receipt']['status'], "0x1", "Transaction should succeed.") + assert.equal(APPROVE_ACCOUNT_2_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const DEPOSIT_TX = await CAProxy.deposit(TOKEN_SYMBOL, TEST_ACCOUNT_1, DEPOSIT_AMOUNT, "Token, Inc.") + assert.equal(DEPOSIT_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const TRANSFER_TX = await merchantProxy.pay(TOKEN_SYMBOL, MERCHANT_ACCOUNT, TRANSFER_AMOUNT, MERCHANT_PAYS_FEES, "0x0") + assert.equal(TRANSFER_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const FEE_CONTRACT_BALANCE = +(await tokenProxy.balanceOf(feeContractProxy.address)).toString(); + const TX_FEES = +(await merchantProxy.calculateFees(TRANSFER_AMOUNT)).toString() + assert.equal(FEE_CONTRACT_BALANCE, TX_FEES, "Fee contract should have a balance equal to the transaction fees") + + const MERCHANT_ACCOUNT_BALANCE = +(await tokenProxy.balanceOf(MERCHANT_ACCOUNT)).toString(); + assert.equal(MERCHANT_ACCOUNT_BALANCE, (TRANSFER_AMOUNT-TX_FEES), "Merchant account should have a balance equal to the transaction amount minus fees") + + }) + + it("Should allow the fee contract to transfer an amount of tokens", async () => { + const tokenProxy = await TokenIOERC20Proxy.deployed() + const feeContractProxy = await TokenIOFeeContractProxy.deployed() + + await tokenProxy.setParams(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_TLA, TOKEN_VERSION, TOKEN_DECIMALS, feeContractProxy.address, 10000); + + const TEST_ACCOUNT_3_BALANCE_BEG = +(await tokenProxy.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(0, TEST_ACCOUNT_3_BALANCE_BEG, "TEST_ACCOUNT_3 should have a starting balance of zero.") + + const FEE_BALANCE = +(await feeContractProxy.getTokenBalance(TOKEN_SYMBOL)).toString() + const TRANSFER_COLLECTED_FEES_TX = await feeContractProxy.transferCollectedFees(TOKEN_SYMBOL, TEST_ACCOUNT_3, FEE_BALANCE, "0x") + + assert.equal(TRANSFER_COLLECTED_FEES_TX['receipt']['status'], "0x1", "Transaction should succeed.") + + const TEST_ACCOUNT_3_BALANCE_END = +(await tokenProxy.balanceOf(TEST_ACCOUNT_3)).toString() + assert.equal(FEE_BALANCE, TEST_ACCOUNT_3_BALANCE_END, "TEST_ACCOUNT_3 should have successfully received the amount of the fee balance.") + + }) + + + + +}) diff --git a/test/TokenIOStableSwap.js b/test/TokenIOStableSwapProxy.js similarity index 56% rename from test/TokenIOStableSwap.js rename to test/TokenIOStableSwapProxy.js index 19b5d65..b98b8f1 100644 --- a/test/TokenIOStableSwap.js +++ b/test/TokenIOStableSwapProxy.js @@ -3,8 +3,9 @@ var Promise = require('bluebird') var TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol"); var TokenIOStorage = artifacts.require("./TokenIOStorage.sol"); -var TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); -var TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol"); +var TokenIOERC20UnlimitedProxy = artifacts.require("./TokenIOERC20UnlimitedProxy.sol"); +var TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); +var TokenIOStableSwapProxy = artifacts.require("./TokenIOStableSwapProxy.sol"); const { mode, development, production } = require('../token.config.js'); const { @@ -16,7 +17,7 @@ const { const USDc = TOKEN_DETAILS['USDc'] -contract("TokenIOStableSwap", function(accounts) { +contract("TokenIOStableSwapProxy", function(accounts) { // Globals const DEPOSIT_AMOUNT = 100e6; @@ -32,48 +33,54 @@ contract("TokenIOStableSwap", function(accounts) { before(async () => { const storage = await TokenIOStorage.deployed() - CA = await TokenIOCurrencyAuthority.deployed(); - SWAP = await TokenIOStableSwap.deployed(); + CA = await TokenIOCurrencyAuthorityProxy.deployed(); + SWAP = await TokenIOStableSwapProxy.deployed(); - USDX = await TokenIOERC20Unlimited.deployed() + USDX = await TokenIOERC20UnlimitedProxy.deployed() USDC = await TokenIOERC20Unlimited.new(storage.address) await storage.allowOwnership(USDC.address) - await USDC.setParams(...Object.values(USDc).map((v) => { return v })) + + USDCproxy = await TokenIOERC20UnlimitedProxy.new(USDC.address) + USDC.allowOwnership(USDCproxy.address) + USDC.initProxy(USDCproxy.address) + + await USDCproxy.setParams(...Object.values(USDc).map((v) => { return v })) await SWAP.setTokenXCurrency(USDX.address, 'USD'); // feeBps, feeMin, feeMax, feeFlat - await SWAP.allowAsset(USDC.address, 'USD', 10, 0, 1e12, 0); + await SWAP.allowAsset(USDCproxy.address, 'USD', 10, 0, 1e12, 0); }) it("Should Deposit USDc into TEST_ACCOUNT_1 account", async () => { const APPROVE_REQUESTER = await CA.approveKYC(TEST_ACCOUNT_1, true, DEPOSIT_AMOUNT, firmName) - const DEPOSIT_REQUESTER_AMOUNT_TX = await CA.deposit((await USDC.symbol()), TEST_ACCOUNT_1, DEPOSIT_AMOUNT, firmName) + const DEPOSIT_REQUESTER_AMOUNT_TX = await CA.deposit((await USDCproxy.symbol()), TEST_ACCOUNT_1, DEPOSIT_AMOUNT, firmName) assert.equal(DEPOSIT_REQUESTER_AMOUNT_TX['receipt']['status'], "0x1", "Transaction should be successful") - const TEST_ACCOUNT_1_BALANCE = +(await USDC.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACCOUNT_1_BALANCE = +(await USDCproxy.balanceOf(TEST_ACCOUNT_1)).toString() assert.equal(TEST_ACCOUNT_1_BALANCE, DEPOSIT_AMOUNT, "Requester balance should equal deposit amount") - await USDC.approve(SWAP.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) - assert.equal(+(await USDC.allowance(TEST_ACCOUNT_1, SWAP.address)), SWAP_AMOUNT, "Allowance of swap contract should equal requester deposit amount"); + await USDCproxy.approve(SWAP.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) + assert.equal(+(await USDCproxy.allowance(TEST_ACCOUNT_1, SWAP.address)), SWAP_AMOUNT, "Allowance of swap contract should equal requester deposit amount"); }) it("Should allow the swap between the requester and the contract", async () => { - await SWAP.convert(USDC.address, USDX.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) - + console.log("Debug1") + await SWAP.convert(USDCproxy.address, USDX.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) + console.log("Debug2") // const FEES = +(await USDC.calculateFees(SWAP_AMOUNT)) // NOTE: These fees only apply in testing due to Token X ERC20 dummy asset - const SWAP_FEES = +(await SWAP.calcAssetFees(USDC.address, SWAP_AMOUNT)); + const SWAP_FEES = +(await SWAP.calcAssetFees(USDCproxy.address, SWAP_AMOUNT)); const NET_AMOUNT = (SWAP_AMOUNT-SWAP_FEES); const CONVERTED_AMOUNT = (NET_AMOUNT * (10 ** 2)) / (10 ** 6) - const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDC.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDCproxy.balanceOf(TEST_ACCOUNT_1)).toString() assert.equal(TEST_ACCOUNT_1_USDC_BALANCE, (DEPOSIT_AMOUNT-SWAP_AMOUNT), "Requester balance should be reduced by swap amount") - const SWAP_CONTRACT_USDC_BALANCE = +(await USDC.balanceOf(SWAP.address)).toString() + const SWAP_CONTRACT_USDC_BALANCE = +(await USDCproxy.balanceOf(SWAP.address)).toString() assert.equal(SWAP_CONTRACT_USDC_BALANCE, (SWAP_AMOUNT), "Swap Balance of USDC should be equal to the swamp amount.") const TEST_ACCOUNT_1_USDX_BALANCE = +(await USDX.balanceOf(TEST_ACCOUNT_1)).toString() @@ -83,21 +90,24 @@ contract("TokenIOStableSwap", function(accounts) { it("Should allow the swap between the requester and the contract in reverse", async () => { const SWAP_AMOUNT_2 = +(await USDX.balanceOf(TEST_ACCOUNT_1)); - await SWAP.convert(USDX.address, USDC.address, SWAP_AMOUNT_2, { from: TEST_ACCOUNT_1 }) + await SWAP.convert(USDX.address, USDCproxy.address, SWAP_AMOUNT_2, { from: TEST_ACCOUNT_1 }) const CONVERTED_AMOUNT = (SWAP_AMOUNT_2 / (10 ** 2)) * (10 ** 6) - const SWAP_FEES = +(await SWAP.calcAssetFees(USDC.address, CONVERTED_AMOUNT)); + const SWAP_FEES = +(await SWAP.calcAssetFees(USDCproxy.address, CONVERTED_AMOUNT)); const TEST_ACCOUNT_1_USDX_BALANCE = +(await USDX.balanceOf(TEST_ACCOUNT_1)).toString() assert.equal(TEST_ACCOUNT_1_USDX_BALANCE, 0, "Requester balance should be reduced by swap amount") - const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDC.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDCproxy.balanceOf(TEST_ACCOUNT_1)).toString() + console.log("TEST_ACCOUNT_1_USDC_BALANCE: " + TEST_ACCOUNT_1_USDC_BALANCE) + console.log("CONVERTED_AMOUNT: " + CONVERTED_AMOUNT) + console.log("SWAP_FEES: " + SWAP_FEES) assert.equal(TEST_ACCOUNT_1_USDC_BALANCE, CONVERTED_AMOUNT-SWAP_FEES, "Requester balance should equal requester deposit amount for USDC contract") - const SWAP_CONTRACT_USDC_BALANCE = +(await USDC.balanceOf(SWAP.address)).toString() + const SWAP_CONTRACT_USDC_BALANCE = +(await USDCproxy.balanceOf(SWAP.address)).toString() assert.equal(SWAP_CONTRACT_USDC_BALANCE, ( - +(await SWAP.calcAssetFees(USDC.address, SWAP_AMOUNT)) + - +(await SWAP.calcAssetFees(USDC.address, CONVERTED_AMOUNT)) + +(await SWAP.calcAssetFees(USDCproxy.address, SWAP_AMOUNT)) + + +(await SWAP.calcAssetFees(USDCproxy.address, CONVERTED_AMOUNT)) ), "Swap Balance of USDC should be equal to the swamp amount.") }) diff --git a/test/TokenIOStorage.js b/test/TokenIOStorage.js index 09f3ace..724b851 100644 --- a/test/TokenIOStorage.js +++ b/test/TokenIOStorage.js @@ -24,7 +24,7 @@ contract("TokenIOStorage", function(accounts) { const TEST_ACCOUNT_1 = accounts[0] const TEST_ACCOUNT_2 = accounts[1] const DEPOSIT_AMOUNT = 10000e2 - const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 + const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 it("Should get the token details directly from the storage contract", async () => { const storage = await TokenIOStorage.deployed() @@ -46,7 +46,7 @@ contract("TokenIOStorage", function(accounts) { const storage = await TokenIOStorage.deployed() const token = await TokenIOERC20.deployed() - const APPROVE_AND_DEPOSIT = await CA.approveKYCAndDeposit('USDx', TEST_ACCOUNT_2, DEPOSIT_AMOUNT, SPENDING_LIMIT, "Token, Inc.") + const APPROVE_AND_DEPOSIT = await CA.approveKYCAndDeposit('USDx', TEST_ACCOUNT_2, DEPOSIT_AMOUNT, SPENDING_LIMIT, "Token, Inc.", TEST_ACCOUNT_1) assert.equal(APPROVE_AND_DEPOSIT['receipt']['status'], "0x1", "Transaction should succeed.") const TOKEN_SUPPLY = +(await CA.getTokenSupply('USDx')).toString() From a63b9f1eba7759536c9e48a3fb29d61195419934 Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Sat, 2 Mar 2019 17:54:36 +0200 Subject: [PATCH 37/40] fixes in proxy implementation + tests --- contracts/TokenIOERC20FeesApplyProxy.sol | 47 ++++++++++++++---------- contracts/TokenIOStableSwap.sol | 2 +- migrations/12_deploy_TokenIOFeesApply.js | 2 +- test/TokenIOERC20FeesApplyProxy.js | 39 +++++++++++++++++++- test/TokenIOStableSwapProxy.js | 26 +++++++------ 5 files changed, 81 insertions(+), 35 deletions(-) diff --git a/contracts/TokenIOERC20FeesApplyProxy.sol b/contracts/TokenIOERC20FeesApplyProxy.sol index ccfe471..3f3b67b 100644 --- a/contracts/TokenIOERC20FeesApplyProxy.sol +++ b/contracts/TokenIOERC20FeesApplyProxy.sol @@ -36,13 +36,16 @@ interface TokenIOERC20FeesApplyI { function deprecateInterface() external returns (bool deprecated); } -contract TokenIOERC20FeesApplyProxy is Ownable, UpgradableProxy { +contract TokenIOERC20FeesApplyProxy is Ownable { - constructor(address _tokenIOERC20FeesApplyImpl, bytes memory _data) UpgradableProxy(_tokenIOERC20FeesApplyImpl, _data) public { + address implementationInstance; + + constructor(address _tokenIOERC20FeesApplyImpl) public { + implementationInstance = _tokenIOERC20FeesApplyImpl; } function upgradeTo(address _newTokenIOERC20FeesApplyImpl) onlyOwner external { - _upgradeTo(_newTokenIOERC20FeesApplyImpl); + implementationInstance = _newTokenIOERC20FeesApplyImpl; } function setParams( @@ -54,74 +57,80 @@ contract TokenIOERC20FeesApplyProxy is Ownable, UpgradableProxy { address _feeContract, uint256 _fxUSDBPSRate ) onlyOwner public returns(bool) { - require(TokenIOERC20FeesApplyI(_implementation()).setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + require(TokenIOERC20FeesApplyI(implementationInstance).setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Unable to execute setParams"); return true; } - function delegateCall() external { - _delegate(_implementation()); + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); } function transfer(address to, uint256 amount) external returns(bool) { - require(TokenIOERC20FeesApplyI(_implementation()).transfer(to, amount, msg.sender), + require(TokenIOERC20FeesApplyI(implementationInstance).transfer(to, amount, msg.sender), "Unable to execute transfer"); return true; } function transferFrom(address from, address to, uint256 amount) external returns(bool) { - require(TokenIOERC20FeesApplyI(_implementation()).transferFrom(from, to, amount, msg.sender), + require(TokenIOERC20FeesApplyI(implementationInstance).transferFrom(from, to, amount, msg.sender), "Unable to execute transferFrom"); return true; } function approve(address spender, uint256 amount) external returns (bool) { - require(TokenIOERC20FeesApplyI(_implementation()).approve(spender, amount, msg.sender), + require(TokenIOERC20FeesApplyI(implementationInstance).approve(spender, amount, msg.sender), "Unable to execute approve"); return true; } function name() external view returns (string memory) { - return TokenIOERC20FeesApplyI(_implementation()).name(); + return TokenIOERC20FeesApplyI(implementationInstance).name(); } function symbol() external view returns (string memory) { - return TokenIOERC20FeesApplyI(_implementation()).symbol(); + return TokenIOERC20FeesApplyI(implementationInstance).symbol(); } function tla() external view returns (string memory) { - return TokenIOERC20FeesApplyI(_implementation()).tla(); + return TokenIOERC20FeesApplyI(implementationInstance).tla(); } function version() external view returns (string memory) { - return TokenIOERC20FeesApplyI(_implementation()).version(); + return TokenIOERC20FeesApplyI(implementationInstance).version(); } function decimals() external view returns (uint) { - return TokenIOERC20FeesApplyI(_implementation()).decimals(); + return TokenIOERC20FeesApplyI(implementationInstance).decimals(); } function totalSupply() external view returns (uint256) { - return TokenIOERC20FeesApplyI(_implementation()).totalSupply(); + return TokenIOERC20FeesApplyI(implementationInstance).totalSupply(); } function allowance(address account, address spender) external view returns (uint256) { - return TokenIOERC20FeesApplyI(_implementation()).allowance(account, spender); + return TokenIOERC20FeesApplyI(implementationInstance).allowance(account, spender); } function balanceOf(address account) external view returns (uint256) { - return TokenIOERC20FeesApplyI(_implementation()).balanceOf(account); + return TokenIOERC20FeesApplyI(implementationInstance).balanceOf(account); } function calculateFees(uint amount) external view returns (uint256) { - return TokenIOERC20FeesApplyI(_implementation()).calculateFees(amount); + return TokenIOERC20FeesApplyI(implementationInstance).calculateFees(amount); } function deprecateInterface() external onlyOwner returns (bool) { - require(TokenIOERC20FeesApplyI(_implementation()).deprecateInterface(), + require(TokenIOERC20FeesApplyI(implementationInstance).deprecateInterface(), "Unable to execute deprecateInterface"); return true; diff --git a/contracts/TokenIOStableSwap.sol b/contracts/TokenIOStableSwap.sol index 7c63213..502302c 100644 --- a/contracts/TokenIOStableSwap.sol +++ b/contracts/TokenIOStableSwap.sol @@ -230,7 +230,7 @@ contract TokenIOStableSwap is Ownable { /// @dev the amount being transferred must be in the same decimal representation of the asset /// e.g. If decimals = 6 and want to transfer $100.00 the amount passed to this contract should be 100e6 (100 * 10 ** 6) require( - ERC20Interface(fromAsset).transferFrom(sender, proxyInstance, amount), + ERC20Interface(fromAsset).transferFrom(sender, address(this), amount), 'Error: Unable to transferFrom your asset holdings. Please ensure this contract has an approved allowance equal to or greater than the amount called in transferFrom method.' ); diff --git a/migrations/12_deploy_TokenIOFeesApply.js b/migrations/12_deploy_TokenIOFeesApply.js index dc827cb..0caf7bd 100644 --- a/migrations/12_deploy_TokenIOFeesApply.js +++ b/migrations/12_deploy_TokenIOFeesApply.js @@ -19,7 +19,7 @@ const deployContracts = async (deployer, accounts) => { const token = await deployer.deploy(TokenIOERC20FeesApply, storage.address) await storage.allowOwnership(token.address) - const tokenProxy = await deployer.deploy(TokenIOERC20FeesApplyProxy, token.address, "0x00") + const tokenProxy = await deployer.deploy(TokenIOERC20FeesApplyProxy, token.address) await token.allowOwnership(tokenProxy.address) await token.initProxy(tokenProxy.address) diff --git a/test/TokenIOERC20FeesApplyProxy.js b/test/TokenIOERC20FeesApplyProxy.js index 997d411..6b40107 100644 --- a/test/TokenIOERC20FeesApplyProxy.js +++ b/test/TokenIOERC20FeesApplyProxy.js @@ -2,8 +2,6 @@ const TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthor const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOERC20FeesApplyProxy = artifacts.require("./TokenIOERC20FeesApplyProxy.sol") const { mode, development, production } = require('../token.config.js') -const encodeCall = require('./helpers/encodeCall.js') -const { utils } = require('ethers') const { AUTHORITY_DETAILS: { firmName, authorityAddress }, TOKEN_DETAILS, FEE_PARAMS } = mode == 'production' ? production : development //set stage @@ -146,4 +144,41 @@ contract("TokenIOERC20FeesApplyProxy", function(accounts) { }); }); + describe('staticCall', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionSignature('name()') + const encodedResult = await this.tokenIOERC20FeesApplyProxy.staticCall(payload); + const result = web3.eth.abi.decodeParameters(['string'], encodedResult); + assert.equal(result[0], TOKEN_NAME) + }); + }); + + describe('call', function () { + it('Should pass', async function () { + const TEST_ACT_1_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString() + const TEST_ACT_2_BEG_BALANCE = +(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString() + + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'transfer', + type: 'function', + inputs: [{ + type: 'address', + name: 'to' + },{ + type: 'uint256', + name: 'amount' + },{ + type: 'address', + name: 'sender' + }] + }, [TEST_ACCOUNT_2, 1, TEST_ACCOUNT_1]); + + await this.tokenIOERC20FeesApplyProxy.call(payload); + const TX_FEES = +(await this.tokenIOERC20FeesApplyProxy.calculateFees(1)).toString() + assert.equal(+(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString(), TEST_ACT_1_BEG_BALANCE - 1 - TX_FEES) + assert.equal(+(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString(), TEST_ACT_2_BEG_BALANCE + 1) + + }); + }); + }) \ No newline at end of file diff --git a/test/TokenIOStableSwapProxy.js b/test/TokenIOStableSwapProxy.js index b98b8f1..8f1a0c2 100644 --- a/test/TokenIOStableSwapProxy.js +++ b/test/TokenIOStableSwapProxy.js @@ -5,6 +5,7 @@ var TokenIOERC20Unlimited = artifacts.require("./TokenIOERC20Unlimited.sol"); var TokenIOStorage = artifacts.require("./TokenIOStorage.sol"); var TokenIOERC20UnlimitedProxy = artifacts.require("./TokenIOERC20UnlimitedProxy.sol"); var TokenIOCurrencyAuthorityProxy = artifacts.require("./TokenIOCurrencyAuthorityProxy.sol"); +var TokenIOStableSwap = artifacts.require("./TokenIOStableSwap.sol"); var TokenIOStableSwapProxy = artifacts.require("./TokenIOStableSwapProxy.sol"); const { mode, development, production } = require('../token.config.js'); @@ -34,7 +35,12 @@ contract("TokenIOStableSwapProxy", function(accounts) { const storage = await TokenIOStorage.deployed() CA = await TokenIOCurrencyAuthorityProxy.deployed(); - SWAP = await TokenIOStableSwapProxy.deployed(); + SWAP = await TokenIOStableSwap.new(storage.address); + await storage.allowOwnership(SWAP.address) + + SWAPproxy = await TokenIOStableSwapProxy.new(SWAP.address); + SWAP.allowOwnership(SWAPproxy.address) + SWAP.initProxy(SWAPproxy.address) USDX = await TokenIOERC20UnlimitedProxy.deployed() @@ -70,11 +76,10 @@ contract("TokenIOStableSwapProxy", function(accounts) { }) it("Should allow the swap between the requester and the contract", async () => { - console.log("Debug1") - await SWAP.convert(USDCproxy.address, USDX.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) - console.log("Debug2") + await SWAPproxy.convert(USDCproxy.address, USDX.address, SWAP_AMOUNT, { from: TEST_ACCOUNT_1 }) + // const FEES = +(await USDC.calculateFees(SWAP_AMOUNT)) // NOTE: These fees only apply in testing due to Token X ERC20 dummy asset - const SWAP_FEES = +(await SWAP.calcAssetFees(USDCproxy.address, SWAP_AMOUNT)); + const SWAP_FEES = +(await SWAPproxy.calcAssetFees(USDCproxy.address, SWAP_AMOUNT)); const NET_AMOUNT = (SWAP_AMOUNT-SWAP_FEES); const CONVERTED_AMOUNT = (NET_AMOUNT * (10 ** 2)) / (10 ** 6) const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDCproxy.balanceOf(TEST_ACCOUNT_1)).toString() @@ -90,24 +95,21 @@ contract("TokenIOStableSwapProxy", function(accounts) { it("Should allow the swap between the requester and the contract in reverse", async () => { const SWAP_AMOUNT_2 = +(await USDX.balanceOf(TEST_ACCOUNT_1)); - await SWAP.convert(USDX.address, USDCproxy.address, SWAP_AMOUNT_2, { from: TEST_ACCOUNT_1 }) + await SWAPproxy.convert(USDX.address, USDCproxy.address, SWAP_AMOUNT_2, { from: TEST_ACCOUNT_1 }) const CONVERTED_AMOUNT = (SWAP_AMOUNT_2 / (10 ** 2)) * (10 ** 6) - const SWAP_FEES = +(await SWAP.calcAssetFees(USDCproxy.address, CONVERTED_AMOUNT)); + const SWAP_FEES = +(await SWAPproxy.calcAssetFees(USDCproxy.address, CONVERTED_AMOUNT)); const TEST_ACCOUNT_1_USDX_BALANCE = +(await USDX.balanceOf(TEST_ACCOUNT_1)).toString() assert.equal(TEST_ACCOUNT_1_USDX_BALANCE, 0, "Requester balance should be reduced by swap amount") const TEST_ACCOUNT_1_USDC_BALANCE = +(await USDCproxy.balanceOf(TEST_ACCOUNT_1)).toString() - console.log("TEST_ACCOUNT_1_USDC_BALANCE: " + TEST_ACCOUNT_1_USDC_BALANCE) - console.log("CONVERTED_AMOUNT: " + CONVERTED_AMOUNT) - console.log("SWAP_FEES: " + SWAP_FEES) assert.equal(TEST_ACCOUNT_1_USDC_BALANCE, CONVERTED_AMOUNT-SWAP_FEES, "Requester balance should equal requester deposit amount for USDC contract") const SWAP_CONTRACT_USDC_BALANCE = +(await USDCproxy.balanceOf(SWAP.address)).toString() assert.equal(SWAP_CONTRACT_USDC_BALANCE, ( - +(await SWAP.calcAssetFees(USDCproxy.address, SWAP_AMOUNT)) + - +(await SWAP.calcAssetFees(USDCproxy.address, CONVERTED_AMOUNT)) + +(await SWAPproxy.calcAssetFees(USDCproxy.address, SWAP_AMOUNT)) + + +(await SWAPproxy.calcAssetFees(USDCproxy.address, CONVERTED_AMOUNT)) ), "Swap Balance of USDC should be equal to the swamp amount.") }) From 84edbdec52f4836f170c930836a25959b08c530c Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Tue, 5 Mar 2019 03:23:33 +0200 Subject: [PATCH 38/40] tests added --- contracts/Proxy.sol | 67 ---------------- contracts/TokenIOAuthorityProxy.sol | 32 +++++--- contracts/TokenIOCurrencyAuthorityProxy.sol | 48 +++++++----- contracts/TokenIOERC20FeesApplyProxy.sol | 6 +- contracts/TokenIOERC20Proxy.sol | 50 +++++++----- contracts/TokenIOERC20UnlimitedProxy.sol | 48 +++++++----- contracts/TokenIOFX.sol | 14 +++- contracts/TokenIOFXProxy.sol | 53 +++++++++++++ contracts/TokenIOFeeContractProxy.sol | 30 +++++--- contracts/TokenIOLib.sol | 9 ++- contracts/TokenIOMerchantProxy.sol | 28 ++++--- contracts/TokenIONameSpaceProxy.sol | 22 ++++-- contracts/TokenIOStableSwapProxy.sol | 44 ++++++----- contracts/UpgradableProxy.sol | 76 ------------------- .../6_deploy_TokenIOCurrencyAuthority.js | 2 +- migrations/9_deploy_TokenIOFX.js | 5 ++ package.json | 1 - test/TokenIOAuthorityProxy.js | 32 ++++++++ test/TokenIOCurrencyAuthorityProxy.js | 50 +++++++++++- test/TokenIOERC20FeesApplyProxy.js | 1 - test/TokenIOERC20Proxy.js | 32 ++++++++ test/TokenIOERC20UnlimitedProxy.js | 33 +++++++- test/TokenIOFXProxy.js | 24 +++--- test/TokenIOFeeContractProxy.js | 37 ++++++++- test/TokenIOMerchantProxy.js | 47 ++++++++++++ test/TokenIOStableSwapProxy.js | 33 ++++++++ 26 files changed, 541 insertions(+), 283 deletions(-) delete mode 100644 contracts/Proxy.sol create mode 100644 contracts/TokenIOFXProxy.sol delete mode 100644 contracts/UpgradableProxy.sol diff --git a/contracts/Proxy.sol b/contracts/Proxy.sol deleted file mode 100644 index 85de2bf..0000000 --- a/contracts/Proxy.sol +++ /dev/null @@ -1,67 +0,0 @@ -pragma solidity 0.5.2; - -/** - * @title Proxy - * @dev Implements delegation of calls to other contracts, with proper - * forwarding of return values and bubbling of failures. - * It defines a fallback function that delegates all calls to the address - * returned by the abstract _implementation() internal function. - */ -contract Proxy { - /** - * @dev Fallback function. - * Implemented entirely in `_fallback`. - */ - function () payable external { - _fallback(); - } - - /** - * @return The Address of the implementation. - */ - function _implementation() internal view returns (address); - - /** - * @dev Delegates execution to an implementation contract. - * This is a low level function that doesn't return to its internal call site. - * It will return to the external caller whatever the implementation returns. - * @param implementation Address to delegate. - */ - function _delegate(address implementation) internal { - assembly { - // Copy msg.data. We take full control of memory in this inline assembly - // block because it will not return to Solidity code. We overwrite the - // Solidity scratch pad at memory position 0. - calldatacopy(0, 0, calldatasize) - - // Call the implementation. - // out and outsize are 0 because we don't know the size yet. - let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0) - - // Copy the returned data. - returndatacopy(0, 0, returndatasize) - - switch result - // delegatecall returns 0 on error. - case 0 { revert(0, returndatasize) } - default { return(0, returndatasize) } - } - } - - /** - * @dev Function that is run as the first thing in the fallback function. - * Can be redefined in derived contracts to add functionality. - * Redefinitions must call super._willFallback(). - */ - function _willFallback() internal { - } - - /** - * @dev fallback implementation. - * Extracted to enable manual triggering. - */ - function _fallback() internal { - _willFallback(); - _delegate(_implementation()); - } -} diff --git a/contracts/TokenIOAuthorityProxy.sol b/contracts/TokenIOAuthorityProxy.sol index 161b85b..337e7b8 100644 --- a/contracts/TokenIOAuthorityProxy.sol +++ b/contracts/TokenIOAuthorityProxy.sol @@ -20,20 +20,30 @@ interface TokenIOAuthorityI { contract TokenIOAuthorityProxy is Ownable { - TokenIOAuthorityI tokenIOAuthorityImpl; + address implementationInstance; constructor(address _tokenIOAuthorityImpl) public { - tokenIOAuthorityImpl = TokenIOAuthorityI(_tokenIOAuthorityImpl); + implementationInstance = _tokenIOAuthorityImpl; } - function upgradeTokenImplamintation(address _newTokenIOAuthorityImpl) onlyOwner external { + function upgradeTo(address _newTokenIOAuthorityImpl) onlyOwner external { require(_newTokenIOAuthorityImpl != address(0)); - tokenIOAuthorityImpl = TokenIOAuthorityI(_newTokenIOAuthorityImpl); + implementationInstance = _newTokenIOAuthorityImpl; + } + + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); } function setRegisteredFirm(string memory firmName, bool _authorized) public returns (bool success) { require( - tokenIOAuthorityImpl.setRegisteredFirm(firmName, _authorized, msg.sender), + TokenIOAuthorityI(implementationInstance).setRegisteredFirm(firmName, _authorized, msg.sender), "Unable to execute setRegisteredFirm" ); return true; @@ -41,31 +51,31 @@ contract TokenIOAuthorityProxy is Ownable { function setRegisteredAuthority(string memory firmName, address authority, bool _authorized) public returns (bool success) { require( - tokenIOAuthorityImpl.setRegisteredAuthority(firmName, authority, _authorized, msg.sender), + TokenIOAuthorityI(implementationInstance).setRegisteredAuthority(firmName, authority, _authorized, msg.sender), "Unable to execute setRegisteredFirm" ); return true; } function getFirmFromAuthority(address authority) public view returns (string memory firm) { - return tokenIOAuthorityImpl.getFirmFromAuthority(authority); + return TokenIOAuthorityI(implementationInstance).getFirmFromAuthority(authority); } function isRegisteredFirm(string memory firmName) public view returns (bool status) { - return tokenIOAuthorityImpl.isRegisteredFirm(firmName); + return TokenIOAuthorityI(implementationInstance).isRegisteredFirm(firmName); } function isRegisteredToFirm(string memory firmName, address authority) public view returns (bool registered) { - return tokenIOAuthorityImpl.isRegisteredToFirm(firmName, authority); + return TokenIOAuthorityI(implementationInstance).isRegisteredToFirm(firmName, authority); } function isRegisteredAuthority(address authority) public view returns (bool registered) { - return tokenIOAuthorityImpl.isRegisteredAuthority(authority); + return TokenIOAuthorityI(implementationInstance).isRegisteredAuthority(authority); } function setMasterFeeContract(address feeContract) public onlyOwner returns (bool success) { require( - tokenIOAuthorityImpl.setMasterFeeContract(feeContract), + TokenIOAuthorityI(implementationInstance).setMasterFeeContract(feeContract), "Unable to execute setMasterFeeContract" ); return true; diff --git a/contracts/TokenIOCurrencyAuthorityProxy.sol b/contracts/TokenIOCurrencyAuthorityProxy.sol index 5391611..1d61544 100644 --- a/contracts/TokenIOCurrencyAuthorityProxy.sol +++ b/contracts/TokenIOCurrencyAuthorityProxy.sol @@ -1,7 +1,6 @@ pragma solidity 0.5.2; import "./Ownable.sol"; -import "./UpgradableProxy.sol"; interface TokenIOCurrencyAuthorityI { function getTokenBalance(string calldata currency, address account) external view returns (uint balance); @@ -31,26 +30,39 @@ interface TokenIOCurrencyAuthorityI { function withdraw(string calldata currency, address account, uint amount, string calldata issuerFirm, address sender) external returns (bool success); } -contract TokenIOCurrencyAuthorityProxy is Ownable, UpgradableProxy { +contract TokenIOCurrencyAuthorityProxy is Ownable { - constructor(address _tokenIOCurrencyAuthorityImpl, bytes memory _data) UpgradableProxy(_tokenIOCurrencyAuthorityImpl, _data) public { + address implementationInstance; + + constructor(address _tokenIOCurrencyAuthorityImpl) public { + implementationInstance = _tokenIOCurrencyAuthorityImpl; + } + + function upgradeTo(address _newImplementationInstance) external { + implementationInstance = _newImplementationInstance; + } + + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; } - function upgradeTo(address _newTokenIOCurrencyAuthorityImpl) external { - _upgradeTo(_newTokenIOCurrencyAuthorityImpl); + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); } function getTokenBalance(string memory currency, address account) public view returns (uint balance) { - return TokenIOCurrencyAuthorityI(_implementation()).getTokenBalance(currency, account); + return TokenIOCurrencyAuthorityI(implementationInstance).getTokenBalance(currency, account); } function getTokenSupply(string memory currency) public view returns (uint supply) { - return TokenIOCurrencyAuthorityI(_implementation()).getTokenSupply(currency); + return TokenIOCurrencyAuthorityI(implementationInstance).getTokenSupply(currency); } function freezeAccount(address account, bool isAllowed, string memory issuerFirm) public returns (bool success) { require( - TokenIOCurrencyAuthorityI(_implementation()).freezeAccount(account, isAllowed, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(implementationInstance).freezeAccount(account, isAllowed, issuerFirm, msg.sender), "Unable to execute freezeAccount" ); return true; @@ -58,7 +70,7 @@ contract TokenIOCurrencyAuthorityProxy is Ownable, UpgradableProxy { function approveKYC(address account, bool isApproved, uint limit, string memory issuerFirm) public returns (bool success) { require( - TokenIOCurrencyAuthorityI(_implementation()).approveKYC(account, isApproved, limit, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(implementationInstance).approveKYC(account, isApproved, limit, issuerFirm, msg.sender), "Unable to execute approveKYC" ); @@ -67,7 +79,7 @@ contract TokenIOCurrencyAuthorityProxy is Ownable, UpgradableProxy { function approveKYCAndDeposit(string memory currency, address account, uint amount, uint limit, string memory issuerFirm) public returns (bool success) { require( - TokenIOCurrencyAuthorityI(_implementation()).approveKYCAndDeposit(currency, account, amount, limit, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(implementationInstance).approveKYCAndDeposit(currency, account, amount, limit, issuerFirm, msg.sender), "Unable to execute approveKYCAndDeposit" ); @@ -76,35 +88,35 @@ contract TokenIOCurrencyAuthorityProxy is Ownable, UpgradableProxy { function setAccountSpendingLimit(address account, uint limit, string memory issuerFirm) public returns (bool success) { require( - TokenIOCurrencyAuthorityI(_implementation()).setAccountSpendingLimit(account, limit, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(implementationInstance).setAccountSpendingLimit(account, limit, issuerFirm, msg.sender), "Unable to execute setAccountSpendingLimit" ); return true; } function getAccountSpendingRemaining(address account) public view returns (uint spendingRemaining) { - return TokenIOCurrencyAuthorityI(_implementation()).getAccountSpendingRemaining(account); + return TokenIOCurrencyAuthorityI(implementationInstance).getAccountSpendingRemaining(account); } function getAccountSpendingLimit(address account) public view returns (uint spendingLimit) { - return TokenIOCurrencyAuthorityI(_implementation()).getAccountSpendingLimit(account); + return TokenIOCurrencyAuthorityI(implementationInstance).getAccountSpendingLimit(account); } function setFxBpsRate(string memory currency, uint bpsRate, string memory issuerFirm) public returns (bool success) { require( - TokenIOCurrencyAuthorityI(_implementation()).setFxBpsRate(currency, bpsRate, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(implementationInstance).setFxBpsRate(currency, bpsRate, issuerFirm, msg.sender), "Unable to execute setFxBpsRate" ); return true; } function getFxUSDAmount(string memory currency, uint fxAmount) public view returns (uint usdAmount) { - return TokenIOCurrencyAuthorityI(_implementation()).getFxUSDAmount(currency, fxAmount); + return TokenIOCurrencyAuthorityI(implementationInstance).getFxUSDAmount(currency, fxAmount); } function approveForwardedAccount(address originalAccount, address updatedAccount, string memory issuerFirm) public returns (bool success) { require( - TokenIOCurrencyAuthorityI(_implementation()).approveForwardedAccount(originalAccount, updatedAccount, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(implementationInstance).approveForwardedAccount(originalAccount, updatedAccount, issuerFirm, msg.sender), "Unable to execute approveForwardedAccount" ); return true; @@ -112,7 +124,7 @@ contract TokenIOCurrencyAuthorityProxy is Ownable, UpgradableProxy { function deposit(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success) { require( - TokenIOCurrencyAuthorityI(_implementation()).deposit(currency, account, amount, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(implementationInstance).deposit(currency, account, amount, issuerFirm, msg.sender), "Unable to execute deposit" ); return true; @@ -120,7 +132,7 @@ contract TokenIOCurrencyAuthorityProxy is Ownable, UpgradableProxy { function withdraw(string memory currency, address account, uint amount, string memory issuerFirm) public returns (bool success) { require( - TokenIOCurrencyAuthorityI(_implementation()).withdraw(currency, account, amount, issuerFirm, msg.sender), + TokenIOCurrencyAuthorityI(implementationInstance).withdraw(currency, account, amount, issuerFirm, msg.sender), "Unable to execute withdraw" ); return true; diff --git a/contracts/TokenIOERC20FeesApplyProxy.sol b/contracts/TokenIOERC20FeesApplyProxy.sol index 3f3b67b..09a09c0 100644 --- a/contracts/TokenIOERC20FeesApplyProxy.sol +++ b/contracts/TokenIOERC20FeesApplyProxy.sol @@ -1,8 +1,6 @@ pragma solidity 0.5.2; import "./Ownable.sol"; -import "./UpgradableProxy.sol"; - interface TokenIOERC20FeesApplyI { function setParams(string calldata _name, string calldata _symbol, string calldata _tla, string calldata _version, uint _decimals, address _feeContract, uint _fxUSDBPSRate) external returns(bool success); @@ -44,8 +42,8 @@ contract TokenIOERC20FeesApplyProxy is Ownable { implementationInstance = _tokenIOERC20FeesApplyImpl; } - function upgradeTo(address _newTokenIOERC20FeesApplyImpl) onlyOwner external { - implementationInstance = _newTokenIOERC20FeesApplyImpl; + function upgradeTo(address _newImplementationInstance) onlyOwner external { + implementationInstance = _newImplementationInstance; } function setParams( diff --git a/contracts/TokenIOERC20Proxy.sol b/contracts/TokenIOERC20Proxy.sol index 142122e..8f7ae28 100644 --- a/contracts/TokenIOERC20Proxy.sol +++ b/contracts/TokenIOERC20Proxy.sol @@ -36,15 +36,25 @@ interface TokenIOERC20I { contract TokenIOERC20Proxy is Ownable { - TokenIOERC20I tokenIOERC20Impl; + address implementationInstance; constructor(address _tokenIOERC20Impl) public { - tokenIOERC20Impl = TokenIOERC20I(_tokenIOERC20Impl); + implementationInstance = _tokenIOERC20Impl; } - function upgradeTokenImplamintation(address _newTokenIOERC20Impl) onlyOwner external { - require(_newTokenIOERC20Impl != address(0)); - tokenIOERC20Impl = TokenIOERC20I(_newTokenIOERC20Impl); + function upgradeTo(address _newImplementationInstance) onlyOwner external { + require(_newImplementationInstance != address(0)); + implementationInstance = _newImplementationInstance; + } + + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); } function setParams( @@ -56,74 +66,74 @@ contract TokenIOERC20Proxy is Ownable { address _feeContract, uint256 _fxUSDBPSRate ) onlyOwner public returns(bool) { - require(tokenIOERC20Impl.setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + require(TokenIOERC20I(implementationInstance).setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Unable to execute setParams"); return true; } function transfer(address to, uint256 amount) external returns(bool) { - require(tokenIOERC20Impl.transfer(to, amount, msg.sender), + require(TokenIOERC20I(implementationInstance).transfer(to, amount, msg.sender), "Unable to execute transfer"); return true; } function transferFrom(address from, address to, uint256 amount) external returns(bool) { - require(tokenIOERC20Impl.transferFrom(from, to, amount, msg.sender), + require(TokenIOERC20I(implementationInstance).transferFrom(from, to, amount, msg.sender), "Unable to execute transferFrom"); return true; } function approve(address spender, uint256 amount) external returns (bool) { - require(tokenIOERC20Impl.approve(spender, amount, msg.sender), + require(TokenIOERC20I(implementationInstance).approve(spender, amount, msg.sender), "Unable to execute approve"); return true; } function name() external view returns (string memory) { - return tokenIOERC20Impl.name(); + return TokenIOERC20I(implementationInstance).name(); } function symbol() external view returns (string memory) { - return tokenIOERC20Impl.symbol(); + return TokenIOERC20I(implementationInstance).symbol(); } function tla() external view returns (string memory) { - return tokenIOERC20Impl.tla(); + return TokenIOERC20I(implementationInstance).tla(); } function version() external view returns (string memory) { - return tokenIOERC20Impl.version(); + return TokenIOERC20I(implementationInstance).version(); } function decimals() external view returns (uint) { - return tokenIOERC20Impl.decimals(); + return TokenIOERC20I(implementationInstance).decimals(); } function totalSupply() external view returns (uint256) { - return tokenIOERC20Impl.totalSupply(); + return TokenIOERC20I(implementationInstance).totalSupply(); } function allowance(address account, address spender) external view returns (uint256) { - return tokenIOERC20Impl.allowance(account, spender); + return TokenIOERC20I(implementationInstance).allowance(account, spender); } function balanceOf(address account) external view returns (uint256) { - return tokenIOERC20Impl.balanceOf(account); + return TokenIOERC20I(implementationInstance).balanceOf(account); } function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { - return tokenIOERC20Impl.getFeeParams(); + return TokenIOERC20I(implementationInstance).getFeeParams(); } function calculateFees(uint amount) external view returns (uint256) { - return tokenIOERC20Impl.calculateFees(amount); + return TokenIOERC20I(implementationInstance).calculateFees(amount); } function deprecateInterface() external onlyOwner returns (bool) { - require(tokenIOERC20Impl.deprecateInterface(), + require(TokenIOERC20I(implementationInstance).deprecateInterface(), "Unable to execute deprecateInterface"); return true; diff --git a/contracts/TokenIOERC20UnlimitedProxy.sol b/contracts/TokenIOERC20UnlimitedProxy.sol index cd263c1..52de322 100644 --- a/contracts/TokenIOERC20UnlimitedProxy.sol +++ b/contracts/TokenIOERC20UnlimitedProxy.sol @@ -36,15 +36,25 @@ interface TokenIOERC20UnlimitedI { contract TokenIOERC20UnlimitedProxy is Ownable { - TokenIOERC20UnlimitedI tokenIOERC20UnlimitedImpl; + address implementationInstance; constructor(address _tokenIOERC20UnlimitedImpl) public { - tokenIOERC20UnlimitedImpl = TokenIOERC20UnlimitedI(_tokenIOERC20UnlimitedImpl); + implementationInstance = _tokenIOERC20UnlimitedImpl; } - function upgradeTokenImplamintation(address _newTokenIOERC20UnlimitedImpl) onlyOwner external { - require(_newTokenIOERC20UnlimitedImpl != address(0)); - tokenIOERC20UnlimitedImpl = TokenIOERC20UnlimitedI(_newTokenIOERC20UnlimitedImpl); + function upgradeTokenImplamintation(address _newImplementationInstance) onlyOwner external { + require(_newImplementationInstance != address(0)); + implementationInstance = _newImplementationInstance; + } + + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); } function setParams( @@ -56,70 +66,70 @@ contract TokenIOERC20UnlimitedProxy is Ownable { address _feeContract, uint256 _fxUSDBPSRate ) onlyOwner public returns(bool) { - require(tokenIOERC20UnlimitedImpl.setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), + require(TokenIOERC20UnlimitedI(implementationInstance).setParams(_name, _symbol, _tla, _version, _decimals, _feeContract, _fxUSDBPSRate), "Unable to execute setParams"); return true; } function transfer(address to, uint256 amount) external returns(bool) { - require(tokenIOERC20UnlimitedImpl.transfer(to, amount, msg.sender), + require(TokenIOERC20UnlimitedI(implementationInstance).transfer(to, amount, msg.sender), "Unable to execute transfer"); return true; } function transferFrom(address from, address to, uint256 amount) external returns(bool) { - require(tokenIOERC20UnlimitedImpl.transferFrom(from, to, amount, msg.sender), + require(TokenIOERC20UnlimitedI(implementationInstance).transferFrom(from, to, amount, msg.sender), "Unable to execute transferFrom"); return true; } function approve(address spender, uint256 amount) external returns (bool) { - require(tokenIOERC20UnlimitedImpl.approve(spender, amount, msg.sender), + require(TokenIOERC20UnlimitedI(implementationInstance).approve(spender, amount, msg.sender), "Unable to execute approve"); return true; } function name() external view returns (string memory) { - return tokenIOERC20UnlimitedImpl.name(); + return TokenIOERC20UnlimitedI(implementationInstance).name(); } function symbol() external view returns (string memory) { - return tokenIOERC20UnlimitedImpl.symbol(); + return TokenIOERC20UnlimitedI(implementationInstance).symbol(); } function tla() external view returns (string memory) { - return tokenIOERC20UnlimitedImpl.tla(); + return TokenIOERC20UnlimitedI(implementationInstance).tla(); } function version() external view returns (string memory) { - return tokenIOERC20UnlimitedImpl.version(); + return TokenIOERC20UnlimitedI(implementationInstance).version(); } function decimals() external view returns (uint) { - return tokenIOERC20UnlimitedImpl.decimals(); + return TokenIOERC20UnlimitedI(implementationInstance).decimals(); } function totalSupply() external view returns (uint256) { - return tokenIOERC20UnlimitedImpl.totalSupply(); + return TokenIOERC20UnlimitedI(implementationInstance).totalSupply(); } function allowance(address account, address spender) external view returns (uint256) { - return tokenIOERC20UnlimitedImpl.allowance(account, spender); + return TokenIOERC20UnlimitedI(implementationInstance).allowance(account, spender); } function balanceOf(address account) external view returns (uint256) { - return tokenIOERC20UnlimitedImpl.balanceOf(account); + return TokenIOERC20UnlimitedI(implementationInstance).balanceOf(account); } function calculateFees(uint amount) external view returns (uint256) { - return tokenIOERC20UnlimitedImpl.calculateFees(amount); + return TokenIOERC20UnlimitedI(implementationInstance).calculateFees(amount); } function deprecateInterface() external onlyOwner returns (bool) { - require(tokenIOERC20UnlimitedImpl.deprecateInterface(), + require(TokenIOERC20UnlimitedI(implementationInstance).deprecateInterface(), "Unable to execute deprecateInterface"); return true; diff --git a/contracts/TokenIOFX.sol b/contracts/TokenIOFX.sol index caeeb4a..f627ccb 100644 --- a/contracts/TokenIOFX.sol +++ b/contracts/TokenIOFX.sol @@ -35,7 +35,8 @@ contract TokenIOFX is Ownable { using TokenIOLib for TokenIOLib.Data; TokenIOLib.Data lib; - + address public proxyInstance; + /** * @notice Constructor method for TokenIOFX contract * @param _storageContract Address of TokenIOStorage contract @@ -51,6 +52,12 @@ contract TokenIOFX is Ownable { owner[msg.sender] = true; } + function initProxy(address _proxy) public onlyOwner { + require(_proxy != address(0)); + + proxyInstance = _proxy; + lib.proxyInstance = _proxy; + } /** * @notice Accepts a signed fx request to swap currency pairs at a given amount; @@ -76,10 +83,11 @@ contract TokenIOFX is Ownable { uint8 sigV, bytes32 sigR, bytes32 sigS, - uint expiration + uint expiration, + address sender ) public returns (bool success) { require( - lib.execSwap(requester, symbolA, symbolB, valueA, valueB, sigV, sigR, sigS, expiration), + lib.execSwap(requester, symbolA, symbolB, valueA, valueB, sigV, sigR, sigS, expiration, sender), "Error: Unable to perform atomic currency swap. Please check parameters." ); return true; diff --git a/contracts/TokenIOFXProxy.sol b/contracts/TokenIOFXProxy.sol new file mode 100644 index 0000000..62d2e01 --- /dev/null +++ b/contracts/TokenIOFXProxy.sol @@ -0,0 +1,53 @@ +pragma solidity 0.5.2; + +import "./Ownable.sol"; +import "./TokenIOLib.sol"; +import "./TokenIOStorage.sol"; + + +interface TokenIOFXProxyI { + function swap(address requester, string calldata symbolA, string calldata symbolB, uint valueA, uint valueB, uint8 sigV, bytes32 sigR, bytes32 sigS, uint expiration, address sender) external returns (bool success); +} + +contract TokenIOFXProxy is Ownable { + + address implementationInstance; + + constructor(address _tokenIOFx) public { + implementationInstance = _tokenIOFx; + } + + function upgradeTo(address _newImplementationInstance) onlyOwner external { + require(_newImplementationInstance != address(0)); + implementationInstance = _newImplementationInstance; + } + + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); + } + + function swap( + address requester, + string memory symbolA, + string memory symbolB, + uint valueA, + uint valueB, + uint8 sigV, + bytes32 sigR, + bytes32 sigS, + uint expiration + ) public returns (bool success) { + require( + TokenIOFXProxyI(implementationInstance).swap(requester, symbolA, symbolB, valueA, valueB, sigV, sigR, sigS, expiration, msg.sender), + "Error: Unable to perform atomic currency swap. Please check parameters." + ); + return true; + } + +} diff --git a/contracts/TokenIOFeeContractProxy.sol b/contracts/TokenIOFeeContractProxy.sol index daa4899..d90ffa0 100644 --- a/contracts/TokenIOFeeContractProxy.sol +++ b/contracts/TokenIOFeeContractProxy.sol @@ -16,38 +16,48 @@ interface TokenIOFeeContractI { contract TokenIOFeeContractProxy is Ownable { - TokenIOFeeContractI tokenIOFeeContractImpl; + address implementationInstance; constructor(address _tokenIOFeeContractImpl) public { - tokenIOFeeContractImpl = TokenIOFeeContractI(_tokenIOFeeContractImpl); + implementationInstance = _tokenIOFeeContractImpl; } - function upgradeTokenImplamintation(address _newTokenIOFeeContractImpl) onlyOwner external { - require(_newTokenIOFeeContractImpl != address(0)); - tokenIOFeeContractImpl = TokenIOFeeContractI(_newTokenIOFeeContractImpl); + function upgradeTo(address _newImplementationInstance) onlyOwner external { + require(_newImplementationInstance != address(0)); + implementationInstance = _newImplementationInstance; + } + + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); } function setFeeParams(uint feeBps, uint feeMin, uint feeMax, uint feeFlat, bytes memory feeMsg) public returns (bool success) { - require(tokenIOFeeContractImpl.setFeeParams(feeBps, feeMin, feeMax, feeFlat, feeMsg), + require(TokenIOFeeContractI(implementationInstance).setFeeParams(feeBps, feeMin, feeMax, feeFlat, feeMsg), "Unable to execute setFeeParams"); return true; } function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeContract) { - return tokenIOFeeContractImpl.getFeeParams(); + return TokenIOFeeContractI(implementationInstance).getFeeParams(); } function getTokenBalance(string memory currency) public view returns(uint balance) { - return tokenIOFeeContractImpl.getTokenBalance(currency); + return TokenIOFeeContractI(implementationInstance).getTokenBalance(currency); } function calculateFees(uint amount) public view returns (uint fees) { - return tokenIOFeeContractImpl.calculateFees(amount); + return TokenIOFeeContractI(implementationInstance).calculateFees(amount); } function transferCollectedFees(string memory currency, address to, uint amount, bytes memory data) public onlyOwner returns (bool success) { require( - tokenIOFeeContractImpl.transferCollectedFees(currency, to, amount, data), + TokenIOFeeContractI(implementationInstance).transferCollectedFees(currency, to, amount, data), "Unable to execute transferCollectedFees" ); return true; diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index 669b886..be9230c 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -980,7 +980,8 @@ library TokenIOLib { uint8 sigV, bytes32 sigR, bytes32 sigS, - uint expiration + uint expiration, + address sender ) internal returns (bool success) { bytes32 fxTxHash = keccak256(abi.encodePacked(requester, symbolA, symbolB, valueA, valueB, expiration)); @@ -988,7 +989,7 @@ library TokenIOLib { /// @notice check that sender and requester accounts are verified /// @notice Only verified accounts can perform currency swaps require( - verifyAccounts(self, msg.sender, requester), + verifyAccounts(self, sender, requester), "Error: Only verified accounts can perform currency swaps."); /// @dev Immediately set this transaction to be confirmed before updating any params; @@ -1007,11 +1008,11 @@ library TokenIOLib { /// @dev Transfer funds from each account to another. require( - forceTransfer(self, symbolA, msg.sender, requester, valueA, "0x0"), + forceTransfer(self, symbolA, sender, requester, valueA, "0x0"), "Error: Unable to transfer funds to account."); require( - forceTransfer(self, symbolB, requester, msg.sender, valueB, "0x0"), + forceTransfer(self, symbolB, requester, sender, valueB, "0x0"), "Error: Unable to transfer funds to account."); emit FxSwap(symbolA, symbolB, valueA, valueB, expiration, fxTxHash); diff --git a/contracts/TokenIOMerchantProxy.sol b/contracts/TokenIOMerchantProxy.sol index 571873d..e0a750c 100644 --- a/contracts/TokenIOMerchantProxy.sol +++ b/contracts/TokenIOMerchantProxy.sol @@ -14,34 +14,44 @@ interface TokenIOMerchantI { contract TokenIOMerchantProxy is Ownable { - TokenIOMerchantI tokenIOMerchantImpl; + address implementationInstance; constructor(address _tokenIOMerchantImpl) public { - tokenIOMerchantImpl = TokenIOMerchantI(_tokenIOMerchantImpl); + implementationInstance = _tokenIOMerchantImpl; } - function upgradeTokenImplamintation(address _newTokenIOMerchantImpl) onlyOwner external { - require(_newTokenIOMerchantImpl != address(0)); - tokenIOMerchantImpl = TokenIOMerchantI(_newTokenIOMerchantImpl); + function upgradeTo(address _newImplementationInstance) onlyOwner external { + require(_newImplementationInstance != address(0)); + implementationInstance = _newImplementationInstance; + } + + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); } function setParams(address feeContract) public onlyOwner returns (bool success) { - require(tokenIOMerchantImpl.setParams(feeContract), + require(TokenIOMerchantI(implementationInstance).setParams(feeContract), "Unable to execute setParams"); return true; } function getFeeParams() public view returns (uint bps, uint min, uint max, uint flat, bytes memory feeMsg, address feeAccount) { - return tokenIOMerchantImpl.getFeeParams(); + return TokenIOMerchantI(implementationInstance).getFeeParams(); } function calculateFees(uint amount) public view returns (uint fees) { - return tokenIOMerchantImpl.calculateFees(amount); + return TokenIOMerchantI(implementationInstance).calculateFees(amount); } function pay(string memory currency, address merchant, uint amount, bool merchantPaysFees, bytes memory data) public returns (bool success) { - require(tokenIOMerchantImpl.pay(currency, merchant, amount, merchantPaysFees, data, msg.sender), + require(TokenIOMerchantI(implementationInstance).pay(currency, merchant, amount, merchantPaysFees, data, msg.sender), "Unable to execute pay"); return true; diff --git a/contracts/TokenIONameSpaceProxy.sol b/contracts/TokenIONameSpaceProxy.sol index 387ace1..bb0c8c8 100644 --- a/contracts/TokenIONameSpaceProxy.sol +++ b/contracts/TokenIONameSpaceProxy.sol @@ -8,18 +8,28 @@ interface TokenIONameSpaceI { contract TokenIONameSpaceProxy is Ownable { - TokenIONameSpaceI tokenIONameSpaceImpl; + address implementationInstance; constructor(address _tokenIONameSpaceImpl) public { - tokenIONameSpaceImpl = TokenIONameSpaceI(_tokenIONameSpaceImpl); + implementationInstance = _tokenIONameSpaceImpl; } - function upgradeTokenImplamintation(address _newTokenIONameSpaceImpl) onlyOwner external { - require(_newTokenIONameSpaceImpl != address(0)); - tokenIONameSpaceImpl = TokenIONameSpaceI(_newTokenIONameSpaceImpl); + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); + } + + function upgradeTo(address _newImplementationInstance) onlyOwner external { + require(_newImplementationInstance != address(0)); + implementationInstance = _newImplementationInstance; } function getTokenNameSpace(string memory currency) public view returns (address contractAddress) { - return tokenIONameSpaceImpl.getTokenNameSpace(currency); + return TokenIONameSpaceI(implementationInstance).getTokenNameSpace(currency); } } diff --git a/contracts/TokenIOStableSwapProxy.sol b/contracts/TokenIOStableSwapProxy.sol index a26c3d6..68c9396 100644 --- a/contracts/TokenIOStableSwapProxy.sol +++ b/contracts/TokenIOStableSwapProxy.sol @@ -30,20 +30,30 @@ interface TokenIOStableSwapI { contract TokenIOStableSwapProxy is Ownable { - TokenIOStableSwapI tokenIOStableSwapImpl; + address implementationInstance; constructor(address _tokenIOStableSwapImpl) public { - tokenIOStableSwapImpl = TokenIOStableSwapI(_tokenIOStableSwapImpl); + implementationInstance = _tokenIOStableSwapImpl; } - function upgradeTokenImplamintation(address _newTokenIOStableSwapImpl) onlyOwner external { - require(_newTokenIOStableSwapImpl != address(0)); - tokenIOStableSwapImpl = TokenIOStableSwapI(_newTokenIOStableSwapImpl); + function upgradeTo(address _newImplementationInstance) onlyOwner external { + require(_newImplementationInstance != address(0)); + implementationInstance = _newImplementationInstance; + } + + function staticCall(bytes calldata payload) external view returns(bytes memory) { + (bool res, bytes memory result) = implementationInstance.staticcall(payload); + return result; + } + + function call(bytes calldata payload) external { + (bool res, bytes memory result) = implementationInstance.call(payload); + require(res); } function allowAsset(address asset, string memory currency, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner returns (bool success) { require( - tokenIOStableSwapImpl.allowAsset(asset, currency, feeBps, feeMin, feeMax, feeFlat), + TokenIOStableSwapI(implementationInstance).allowAsset(asset, currency, feeBps, feeMin, feeMax, feeFlat), "Unable to execute allowAsset" ); @@ -52,7 +62,7 @@ contract TokenIOStableSwapProxy is Ownable { function removeAsset(address asset) public onlyOwner returns (bool success) { require( - tokenIOStableSwapImpl.removeAsset(asset), + TokenIOStableSwapI(implementationInstance).removeAsset(asset), "Unable to execute removeAsset" ); @@ -66,7 +76,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return {"allowed": "Returns true if the asset is allowed"} */ function isAllowedAsset(address asset, string memory currency) public view returns (bool allowed) { - return tokenIOStableSwapImpl.isAllowedAsset(asset, currency); + return TokenIOStableSwapI(implementationInstance).isAllowedAsset(asset, currency); } /** @@ -77,7 +87,7 @@ contract TokenIOStableSwapProxy is Ownable { */ function setAssetCurrency(address asset, string memory currency) public onlyOwner returns (bool success) { require( - tokenIOStableSwapImpl.setAssetCurrency(asset, currency), + TokenIOStableSwapI(implementationInstance).setAssetCurrency(asset, currency), "Unable to execute setAssetCurrency" ); @@ -90,7 +100,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return {"currency": "Returns the Currency of the asset if the asset has been allowed."} */ function getAssetCurrency(address asset) public view returns (string memory currency) { - return tokenIOStableSwapImpl.getAssetCurrency(asset); + return TokenIOStableSwapI(implementationInstance).getAssetCurrency(asset); } /** @@ -102,7 +112,7 @@ contract TokenIOStableSwapProxy is Ownable { */ function setTokenXCurrency(address asset, string memory currency) public onlyOwner returns (bool success) { require( - tokenIOStableSwapImpl.setTokenXCurrency(asset, currency), + TokenIOStableSwapI(implementationInstance).setTokenXCurrency(asset, currency), "Unable to execute setTokenXCurrency" ); @@ -116,7 +126,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return {"allowed": "Returns true if the asset is allowed"} */ function isTokenXContract(address asset, string memory currency) public view returns (bool isX) { - return tokenIOStableSwapImpl.isTokenXContract(asset, currency); + return TokenIOStableSwapI(implementationInstance).isTokenXContract(asset, currency); } /** @@ -129,7 +139,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return { "success" : "Returns true if successfully called from another contract"} */ function setAssetFeeParams(address asset, uint feeBps, uint feeMin, uint feeMax, uint feeFlat) public onlyOwner returns (bool success) { - require(tokenIOStableSwapImpl.setAssetFeeParams(asset, feeMax, feeMin, feeBps, feeFlat), "Unable to execute setAssetFeeParams"); + require(TokenIOStableSwapI(implementationInstance).setAssetFeeParams(asset, feeMax, feeMin, feeBps, feeFlat), "Unable to execute setAssetFeeParams"); return true; } @@ -141,7 +151,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return { "fees" : "Returns the fees for the amount associated with the asset contract"} */ function calcAssetFees(address asset, uint amount) public view returns (uint fees) { - return tokenIOStableSwapImpl.calcAssetFees(asset, amount); + return TokenIOStableSwapI(implementationInstance).calcAssetFees(asset, amount); } /** @@ -153,7 +163,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return { "success" : "Returns true if successfully called from another contract"} */ function convert(address fromAsset, address toAsset, uint amount) public returns (bool success) { - require(tokenIOStableSwapImpl.convert(fromAsset, toAsset, amount, msg.sender), 'Unable to execute convert'); + require(TokenIOStableSwapI(implementationInstance).convert(fromAsset, toAsset, amount, msg.sender), 'Unable to execute convert'); return true; } @@ -166,7 +176,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return { "success" : "Returns true if successfully called from another contract"} */ function transferCollectedFees(address asset, address to, uint amount) public onlyOwner returns (bool success) { - require(tokenIOStableSwapImpl.transferCollectedFees(asset, to, amount), "Unable to execute convert"); + require(TokenIOStableSwapI(implementationInstance).transferCollectedFees(asset, to, amount), "Unable to execute convert"); return true; } @@ -176,7 +186,7 @@ contract TokenIOStableSwapProxy is Ownable { * @return {"deprecated" : "Returns true if deprecated, false otherwise"} */ function deprecateInterface() public onlyOwner returns (bool deprecated) { - require(tokenIOStableSwapImpl.deprecateInterface(), + require(TokenIOStableSwapI(implementationInstance).deprecateInterface(), "Error: Unable to deprecate contract!"); return true; } diff --git a/contracts/UpgradableProxy.sol b/contracts/UpgradableProxy.sol deleted file mode 100644 index 6a5039b..0000000 --- a/contracts/UpgradableProxy.sol +++ /dev/null @@ -1,76 +0,0 @@ -pragma solidity 0.5.2; - -import './Proxy.sol'; -import 'zeppelin-solidity/contracts/AddressUtils.sol'; - -/** - * @title UpgradeabilityProxy - * @dev This contract implements a proxy that allows to change the - * implementation address to which it will delegate. - * Such a change is called an implementation upgrade. - */ -contract UpgradableProxy is Proxy { - /** - * @dev Emitted when the implementation is upgraded. - * @param implementation Address of the new implementation. - */ - event Upgraded(address indexed implementation); - - /** - * @dev Storage slot with the address of the current implementation. - * This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is - * validated in the constructor. - */ - bytes32 private constant IMPLEMENTATION_SLOT = 0x7e235f0bf3755f015349e092818fe693d19574feacbff657f1086fae31a7bd8f; - - /** - * @dev Contract constructor. - * @param _implementation Address of the initial implementation. - * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. - * It should include the signature and the parameters of the function to be called, as described in - * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. - * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. - */ - constructor(address _implementation, bytes memory _data) public { - assert(IMPLEMENTATION_SLOT == keccak256("org.token.io")); - _setImplementation(_implementation); - if(_data.length > 0) { - (bool success, ) = _implementation.delegatecall(_data); - //require(success); - } - } - - /** - * @dev Returns the current implementation. - * @return Address of the current implementation - */ - function _implementation() internal view returns (address impl) { - bytes32 slot = IMPLEMENTATION_SLOT; - assembly { - impl := sload(slot) - } - } - - /** - * @dev Upgrades the proxy to a new implementation. - * @param newImplementation Address of the new implementation. - */ - function _upgradeTo(address newImplementation) internal { - _setImplementation(newImplementation); - emit Upgraded(newImplementation); - } - - /** - * @dev Sets the implementation address of the proxy. - * @param newImplementation Address of the new implementation. - */ - function _setImplementation(address newImplementation) private { - require(AddressUtils.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); - - bytes32 slot = IMPLEMENTATION_SLOT; - - assembly { - sstore(slot, newImplementation) - } - } -} diff --git a/migrations/6_deploy_TokenIOCurrencyAuthority.js b/migrations/6_deploy_TokenIOCurrencyAuthority.js index d9d052d..18c7d0e 100644 --- a/migrations/6_deploy_TokenIOCurrencyAuthority.js +++ b/migrations/6_deploy_TokenIOCurrencyAuthority.js @@ -13,7 +13,7 @@ const deployContracts = async (deployer, accounts) => { /* authority contracts */ const currencyAuthority = await deployer.deploy(TokenIOCurrencyAuthority, storage.address) await storage.allowOwnership(currencyAuthority.address) - const currencyAuthorityProxy = await deployer.deploy(TokenIOCurrencyAuthorityProxy, currencyAuthority.address, "0x00") + const currencyAuthorityProxy = await deployer.deploy(TokenIOCurrencyAuthorityProxy, currencyAuthority.address) await currencyAuthority.allowOwnership(currencyAuthorityProxy.address) await currencyAuthority.initProxy(currencyAuthorityProxy.address) diff --git a/migrations/9_deploy_TokenIOFX.js b/migrations/9_deploy_TokenIOFX.js index c684556..e7e1827 100644 --- a/migrations/9_deploy_TokenIOFX.js +++ b/migrations/9_deploy_TokenIOFX.js @@ -2,6 +2,7 @@ const { delay } = require('bluebird') const TokenIOStorage = artifacts.require("./TokenIOStorage.sol") const TokenIOFX = artifacts.require("./TokenIOFX.sol") +const TokenIOFXProxy = artifacts.require("./TokenIOFXProxy.sol") const deployContracts = async (deployer, accounts) => { try { @@ -12,6 +13,10 @@ const deployContracts = async (deployer, accounts) => { const fx = await deployer.deploy(TokenIOFX, storage.address) await storage.allowOwnership(fx.address) + const fxProxy = await deployer.deploy(TokenIOFXProxy, fx.address) + fx.allowOwnership(fxProxy.address) + fx.initProxy(fxProxy.address) + return true } catch (err) { console.log('### error deploying contracts', err) diff --git a/package.json b/package.json index 0aeb78b..ccd2b1f 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "ethers": "^3.0.15", "truffle-contract": "^3.0.6", "web3-provider-engine": "^14.0.6", - "zeppelin-solidity": "1.8.0" }, "devDependencies": { "dotenv": "^6.2.0", diff --git a/test/TokenIOAuthorityProxy.js b/test/TokenIOAuthorityProxy.js index 96bd1a2..19e93c5 100644 --- a/test/TokenIOAuthorityProxy.js +++ b/test/TokenIOAuthorityProxy.js @@ -19,6 +19,7 @@ contract("TokenIOAuthorityProxy", function(accounts) { const FIRM_NAME = firmName; const NEW_FIRM_NAME = "Test Firm, L.L.C." const AUTHORITY_ACCOUNT_2 = accounts[2]; + const AUTHORITY_ACCOUNT_3 = accounts[3]; before(async function () { this.tokenIOAuthorityProxy = await TokenIOAuthorityProxy.deployed(); @@ -72,6 +73,37 @@ contract("TokenIOAuthorityProxy", function(accounts) { }) }) + describe('staticCall', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'isRegisteredAuthority', + type: 'function', + inputs: [{ + type: 'address', + name: 'authority' + }] + }, [AUTHORITY_ACCOUNT_3]); + const encodedResult = await this.tokenIOAuthorityProxy.staticCall(payload); + const result = web3.eth.abi.decodeParameters(['bool'], encodedResult); + assert.equal(result[0], false) + }); + }); + + describe('call', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'setMasterFeeContract', + type: 'function', + inputs: [{ + type: 'address', + name: 'feeContract' + }] + }, [accounts[4]]); + + await this.tokenIOAuthorityProxy.call(payload); + }); + }); + }); diff --git a/test/TokenIOCurrencyAuthorityProxy.js b/test/TokenIOCurrencyAuthorityProxy.js index b406109..72f4913 100644 --- a/test/TokenIOCurrencyAuthorityProxy.js +++ b/test/TokenIOCurrencyAuthorityProxy.js @@ -94,10 +94,52 @@ contract("TokenIOCurrencyAuthorityProxy", function(accounts) { }) }); - - - - + describe('staticCall', function () { + it('Should pass', async function () { + const TOTAL_SUPPLY = +(await this.tokenIOERC20Proxy.totalSupply()).toString() + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'getTokenSupply', + type: 'function', + inputs: [{ + type: 'string', + name: 'currency' + }] + }, [CURRENCY_SYMBOL]); + const encodedResult = await this.tokenIOCurrencyAuthorityProxy.staticCall(payload); + const result = web3.eth.abi.decodeParameters(['uint'], encodedResult); + assert.equal(result[0].toString(), TOTAL_SUPPLY) + }); + }); + + describe('call', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'approveKYCAndDeposit', + type: 'function', + inputs: [{ + type: 'string', + name: 'currency' + }, { + type: 'address', + name: 'account' + }, { + type: 'uint256', + name: 'amount' + }, { + type: 'uint256', + name: 'limit' + }, { + type: 'string', + name: 'issuerFirm' + }, { + type: 'address', + name: 'sender' + }] + }, [CURRENCY_SYMBOL, DEPOSIT_TO_ACCOUNT, DEPOSIT_AMOUNT, LIMIT_AMOUNT, FIRM_NAME, AUTHORITY_ACCOUNT]); + + await this.tokenIOCurrencyAuthorityProxy.call(payload); + }); + }); }); diff --git a/test/TokenIOERC20FeesApplyProxy.js b/test/TokenIOERC20FeesApplyProxy.js index 6b40107..8886f38 100644 --- a/test/TokenIOERC20FeesApplyProxy.js +++ b/test/TokenIOERC20FeesApplyProxy.js @@ -177,7 +177,6 @@ contract("TokenIOERC20FeesApplyProxy", function(accounts) { const TX_FEES = +(await this.tokenIOERC20FeesApplyProxy.calculateFees(1)).toString() assert.equal(+(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_1)).toString(), TEST_ACT_1_BEG_BALANCE - 1 - TX_FEES) assert.equal(+(await this.tokenIOERC20FeesApplyProxy.balanceOf(TEST_ACCOUNT_2)).toString(), TEST_ACT_2_BEG_BALANCE + 1) - }); }); diff --git a/test/TokenIOERC20Proxy.js b/test/TokenIOERC20Proxy.js index 55a1f72..1840844 100644 --- a/test/TokenIOERC20Proxy.js +++ b/test/TokenIOERC20Proxy.js @@ -190,5 +190,37 @@ contract("TokenIOERC20Proxy", function(accounts) { }) }) + describe('staticCall', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionSignature('name()') + const encodedResult = await this.tokenIOERC20Proxy.staticCall(payload); + const result = web3.eth.abi.decodeParameters(['string'], encodedResult); + assert.equal(result[0], TOKEN_NAME) + }); + }); + + describe('call', function () { + it('Should pass', async function () { + const tokenSymbol = await this.tokenIOERC20Proxy.symbol() + const depositReceipt = await this.tokenIOCurrencyAuthorityProxy.deposit(tokenSymbol, TEST_ACCOUNT_3, DEPOSIT_AMOUNT, "Token, Inc.") + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'approve', + type: 'function', + inputs: [{ + type: 'address', + name: 'spender' + },{ + type: 'uint256', + name: 'amount' + }, { + type: 'address', + name: 'sender' + }] + }, [TEST_ACCOUNT_2, DEPOSIT_AMOUNT, TEST_ACCOUNT_3]); + + await this.tokenIOERC20Proxy.call(payload, { from: TEST_ACCOUNT_3 }); + }); + }); + }) diff --git a/test/TokenIOERC20UnlimitedProxy.js b/test/TokenIOERC20UnlimitedProxy.js index 836db91..65d2588 100644 --- a/test/TokenIOERC20UnlimitedProxy.js +++ b/test/TokenIOERC20UnlimitedProxy.js @@ -137,7 +137,7 @@ contract("TokenIOERC20UnlimitedProxy", function(accounts) { assert.notEqual(TEST_ACT_1_BEG_BALANCE, 0, "Balance of account 1 should not equal zero.") assert.notEqual(TEST_ACT_2_BEG_BALANCE, 0, "Balance of account 2 should not equal zero.") - console.log("Debug") + const BEG_ALLOWANCE = await this.tokenIOERC20UnlimitedProxy.allowance(TEST_ACCOUNT_1, TEST_ACCOUNT_2) assert.equal(BEG_ALLOWANCE, TEST_ACT_1_BEG_BALANCE) @@ -156,4 +156,35 @@ contract("TokenIOERC20UnlimitedProxy", function(accounts) { }) }) + describe('staticCall', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionSignature('name()') + const encodedResult = await this.tokenIOERC20UnlimitedProxy.staticCall(payload); + const result = web3.eth.abi.decodeParameters(['string'], encodedResult); + assert.equal(result[0], TOKEN_NAME) + }); + }); + + describe('call', function () { + it('Should pass', async function () { + await this.tokenIOCurrencyAuthorityProxy.deposit(await this.tokenIOERC20UnlimitedProxy.symbol(), TEST_ACCOUNT_3, DEPOSIT_AMOUNT, "Token, Inc.") + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'approve', + type: 'function', + inputs: [{ + type: 'address', + name: 'spender' + },{ + type: 'uint256', + name: 'amount' + },{ + type: 'address', + name: 'sender' + }] + }, [TEST_ACCOUNT_2, 1, TEST_ACCOUNT_3]); + + await this.tokenIOERC20UnlimitedProxy.call(payload); + }); + }); + }) diff --git a/test/TokenIOFXProxy.js b/test/TokenIOFXProxy.js index 7bc8a5f..107e667 100644 --- a/test/TokenIOFXProxy.js +++ b/test/TokenIOFXProxy.js @@ -1,4 +1,4 @@ -/*var { Wallet, utils, SigningKey } = require('ethers'); +var { Wallet, utils, SigningKey } = require('ethers'); var Promise = require('bluebird') var TokenIOERC20 = artifacts.require("./TokenIOERC20.sol"); var TokenIOCurrencyAuthority = artifacts.require("./TokenIOCurrencyAuthority.sol"); @@ -37,11 +37,17 @@ contract("TokenIOFXProxy", function(accounts) { before(async () => { const storage = await TokenIOStorage.deployed() - TOKEN_A = await TokenIOERC20Proxy.new(await TokenIOERC20.new(storage.address).address) - TOKEN_B = await TokenIOERC20Proxy.new(await TokenIOERC20.new(storage.address).address) + const token1 = await TokenIOERC20.new(storage.address) + const token2 = await TokenIOERC20.new(storage.address) + await storage.allowOwnership(token1.address) + await storage.allowOwnership(token2.address) + TOKEN_A = await TokenIOERC20Proxy.new(token1.address) + TOKEN_B = await TokenIOERC20Proxy.new(token2.address) + await token1.allowOwnership(TOKEN_A.address) + await token1.initProxy(TOKEN_A.address) + await token2.allowOwnership(TOKEN_B.address) + await token2.initProxy(TOKEN_B.address) - await storage.allowOwnership(TOKEN_A.address) - await storage.allowOwnership(TOKEN_B.address) await TOKEN_A.setParams(...Object.values(USDx).map((v) => { return v })) await TOKEN_B.setParams(...Object.values(EURx).map((v) => { return v })) @@ -60,8 +66,7 @@ contract("TokenIOFXProxy", function(accounts) { describe("Should Deposit EURx into REQUESTER_WALLET account", function () { it("Should pass", async function () { - const CA = await TokenIOCurrencyAuthority.deployed(); - const CAProxy = await TokenIOCurrencyAuthorityProxy.new(CA.address, "0x00"); + const CAProxy = await TokenIOCurrencyAuthorityProxy.deployed(); const APPROVE_REQUESTER = await CAProxy.approveKYC(REQUESTER_WALLET.address, true, SPENDING_LIMIT, "Token, Inc.") const APPROVE_FULFILLER = await CAProxy.approveKYC(TEST_ACCOUNT_1, true, SPENDING_LIMIT, "Token, Inc.") @@ -83,8 +88,7 @@ contract("TokenIOFXProxy", function(accounts) { describe("Should allow the swap between the requester and the fulfiller", function () { it("Should pass", async function () { - const FX = await TokenIOFX.deployed(); - const FXProxy = await TokenIOERC20Proxy.new(FX.address) + const FXProxy = await TokenIOFXProxy.deployed(); const expiration = ((new Date().getTime() * 1000) + 86400 ); @@ -119,4 +123,4 @@ contract("TokenIOFXProxy", function(accounts) { }) }) -});*/ +}); diff --git a/test/TokenIOFeeContractProxy.js b/test/TokenIOFeeContractProxy.js index 4b53218..4422b84 100644 --- a/test/TokenIOFeeContractProxy.js +++ b/test/TokenIOFeeContractProxy.js @@ -21,7 +21,7 @@ contract("TokenIOFeeContractProxy", function(accounts) { const TEST_ACCOUNT_3 = accounts[2] const DEPOSIT_AMOUNT = 10000e2 // 1 million USD; 2 decimal representation const TRANSFER_AMOUNT = DEPOSIT_AMOUNT/4 - const SPENDING_LIMIT = DEPOSIT_AMOUNT/2 + const SPENDING_LIMIT = DEPOSIT_AMOUNT const TOKEN_NAME = USDx.tokenName; const TOKEN_SYMBOL = USDx.tokenSymbol @@ -75,4 +75,39 @@ contract("TokenIOFeeContractProxy", function(accounts) { }) }) + describe('staticCall', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionSignature('name()') + const encodedResult = await this.tokenIOERC20Proxy.staticCall(payload); + const result = web3.eth.abi.decodeParameters(['string'], encodedResult); + assert.equal(result[0], TOKEN_NAME) + }); + }); + + describe('call', function () { + it('Should pass', async function () { + await this.tokenIOERC20Proxy.transfer(TEST_ACCOUNT_2, TRANSFER_AMOUNT) + const FEE_BALANCE = +(await this.tokenIOFeeContractProxy.getTokenBalance('USDx')).toString() + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'transferCollectedFees', + type: 'function', + inputs: [{ + type: 'string', + name: 'currency' + },{ + type: 'address', + name: 'to' + },{ + type: 'uint256', + name: 'amount' + },{ + type: 'bytes', + name: 'data' + }] + }, ['USDx', TEST_ACCOUNT_3, FEE_BALANCE, "0x"]); + + await this.tokenIOFeeContractProxy.call(payload); + }); + }); + }) diff --git a/test/TokenIOMerchantProxy.js b/test/TokenIOMerchantProxy.js index 259d348..8336b7f 100644 --- a/test/TokenIOMerchantProxy.js +++ b/test/TokenIOMerchantProxy.js @@ -82,6 +82,53 @@ contract("TokenIOMerchantProxy", function(accounts) { }) + describe('staticCall', function () { + it('Should pass', async function () { + const merchantProxy = await TokenIOMerchantProxy.deployed() + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'calculateFees', + type: 'function', + inputs: [{ + type: 'uint256', + name: 'amount' + }] + }, [TRANSFER_AMOUNT]); + const encodedResult = await merchantProxy.staticCall(payload); + const result = web3.eth.abi.decodeParameters(['uint256'], encodedResult); + assert.equal(result[0] > 0, true) + }); + }); + + describe('call', function () { + it('Should pass', async function () { + const merchantProxy = await TokenIOMerchantProxy.deployed() + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'pay', + type: 'function', + inputs: [{ + type: 'string', + name: 'currency' + },{ + type: 'address', + name: 'merchant' + },{ + type: 'uint256', + name: 'amount' + },{ + type: 'bool', + name: 'merchantPaysFees' + },{ + type: 'bytes', + name: 'data' + },{ + type: 'address', + name: 'sender' + }] + }, [TOKEN_SYMBOL, MERCHANT_ACCOUNT, TRANSFER_AMOUNT, MERCHANT_PAYS_FEES, "0x0", TEST_ACCOUNT_1]); + + await merchantProxy.call(payload); + }); + }); diff --git a/test/TokenIOStableSwapProxy.js b/test/TokenIOStableSwapProxy.js index 8f1a0c2..c0e6db0 100644 --- a/test/TokenIOStableSwapProxy.js +++ b/test/TokenIOStableSwapProxy.js @@ -113,4 +113,37 @@ contract("TokenIOStableSwapProxy", function(accounts) { ), "Swap Balance of USDC should be equal to the swamp amount.") }) + describe('staticCall', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'calcAssetFees', + type: 'function', + inputs: [{ + type: 'address', + name: 'asset' + },{ + type: 'uint256', + name: 'amount' + }] + }, [USDCproxy.address, (await USDX.balanceOf(TEST_ACCOUNT_1) / (10 ** 2)) * (10 ** 6)]); + const encodedResult = await SWAPproxy.staticCall(payload); + const result = web3.eth.abi.decodeParameters(['uint256'], encodedResult); + }); + }); + + describe('call', function () { + it('Should pass', async function () { + const payload = web3.eth.abi.encodeFunctionCall({ + name: 'initProxy', + type: 'function', + inputs: [{ + type: 'address', + name: '_proxy' + }] + }, [SWAPproxy.address]); + + await SWAPproxy.call(payload); + }); + }); + }); From c8ea85d1a8506a92f3bddb9315feccde3e1f69cb Mon Sep 17 00:00:00 2001 From: RostyslavBortmanAdoria Date: Wed, 6 Mar 2019 22:32:05 +0200 Subject: [PATCH 39/40] remove excess --- contracts/TokenIOLib.sol | 4 ---- 1 file changed, 4 deletions(-) diff --git a/contracts/TokenIOLib.sol b/contracts/TokenIOLib.sol index be9230c..7bf7e73 100644 --- a/contracts/TokenIOLib.sol +++ b/contracts/TokenIOLib.sol @@ -47,8 +47,6 @@ library TokenIOLib { event FxSwap(string tokenASymbol,string tokenBSymbol,uint tokenAValue,uint tokenBValue, uint expiration, bytes32 transactionHash); event AccountForward(address indexed originalAccount, address indexed forwardedAccount); event NewAuthority(address indexed authority, string issuerFirm); - event UpdateAllowance(uint victim); - event USDAmount(uint victim); @@ -607,8 +605,6 @@ library TokenIOLib { setAccountSpendingAmount(self, sender, getFxUSDAmount(self, currency, amount)), "Error: Unable to set spending amount for account."); - emit USDAmount(getFxUSDAmount(self, currency, amount)); - require( forceTransfer(self, currency, sender, to, amount, data), "Error: Unable to transfer funds to account."); From c6ca884980c688d95e9dfb1fae6c2a36ac743096 Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Thu, 21 Mar 2019 10:30:08 -0700 Subject: [PATCH 40/40] Update compiler settings --- package-lock.json | 1674 +++++++++++++++++++++++++++++---------------- package.json | 7 +- truffle.js | 16 +- 3 files changed, 1107 insertions(+), 590 deletions(-) diff --git a/package-lock.json b/package-lock.json index 02ecdf4..c8778a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tokeninc-smart-contracts", - "version": "0.1.0", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -38,6 +38,12 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, + "app-module-path": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", + "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", + "dev": true + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -52,11 +58,11 @@ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "async-eventemitter": { @@ -130,6 +136,11 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -298,12 +309,12 @@ }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=" }, "babel-plugin-syntax-exponentiation-operator": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=" }, "babel-plugin-syntax-trailing-function-commas": { @@ -655,6 +666,11 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -671,7 +687,7 @@ }, "babelify": { "version": "7.3.0", - "resolved": "http://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", + "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=", "requires": { "babel-core": "^6.0.14", @@ -697,29 +713,34 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base-x": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-1.1.0.tgz", - "integrity": "sha1-QtPXF0dPnqAiB/bRqh9CaRPut6w=", - "dev": true + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.5.tgz", + "integrity": "sha512-C3picSgzPSLE+jW3tcBzJoGwitOtazb5B+5YmAxZm2ybmTi9LNgAtDO/jjVEBZwHoXmDBZ9m/IELj3elJVRBcA==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "optional": true, "requires": { "tweetnacl": "^0.14.3" } }, "bignumber.js": { - "version": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", - "from": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", - "dev": true + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" }, "bindings": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", - "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } }, "bip39": { "version": "2.5.0", @@ -743,9 +764,9 @@ } }, "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", + "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==" }, "bn.js": { "version": "4.11.8", @@ -786,12 +807,21 @@ } }, "browserify-sha3": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.1.tgz", - "integrity": "sha1-P/NKMAbvFcD7NWflQbkaI0ASPRE=", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.4.tgz", + "integrity": "sha1-CGxHuMgjFsnUcCLCYYWVRXbdjiY=", "dev": true, "requires": { - "js-sha3": "^0.3.1" + "js-sha3": "^0.6.1", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "js-sha3": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", + "integrity": "sha1-W4n3enR3Z5h39YxKB1JAk0sflcA=", + "dev": true + } } }, "browserslist": { @@ -804,22 +834,23 @@ } }, "bs58": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-3.1.0.tgz", - "integrity": "sha1-1MJjiL9IBMrHFBQbGUWqR+XrJI4=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", "dev": true, "requires": { - "base-x": "^1.1.0" + "base-x": "^3.0.2" } }, "bs58check": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-1.3.4.tgz", - "integrity": "sha1-xSVABzdJEXcU+gQsMEfrj5FRy/g=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dev": true, "requires": { - "bs58": "^3.1.0", - "create-hash": "^1.1.0" + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" } }, "buffer-from": { @@ -832,20 +863,16 @@ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" - }, "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true }, "caniuse-lite": { - "version": "1.0.30000885", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000885.tgz", - "integrity": "sha512-cXKbYwpxBLd7qHyej16JazPoUacqoVuDhvR61U7Fr5vSxMUiodzcYa1rQYRYfZ5GexV03vGZHd722vNPLjPJGQ==" + "version": "1.0.30000951", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000951.tgz", + "integrity": "sha512-eRhP+nQ6YUkIcNQ6hnvdhMkdc7n3zadog0KXNRxAZTT2kHjUb1yGn71OrPhSn8MOvlX97g5CR97kGVj8fMsXWg==" }, "caseless": { "version": "0.12.0", @@ -854,7 +881,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", @@ -862,13 +889,6 @@ "has-ansi": "^2.0.0", "strip-ansi": "^3.0.0", "supports-color": "^2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } } }, "checkpoint-store": { @@ -889,13 +909,31 @@ } }, "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, "clone": { @@ -911,7 +949,8 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true }, "coinstring": { "version": "2.3.0", @@ -970,9 +1009,9 @@ } }, "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" }, "core-util-is": { "version": "1.0.2", @@ -1005,19 +1044,29 @@ } }, "cross-fetch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.2.tgz", - "integrity": "sha1-pH/09/xxLauo9qaVoRyUhEDUVyM=", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.3.tgz", + "integrity": "sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw==", "requires": { "node-fetch": "2.1.2", "whatwg-fetch": "2.0.4" } }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "crypto-js": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", - "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=", - "dev": true + "version": "3.1.9-1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", + "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" }, "dashdash": { "version": "1.14.1", @@ -1028,18 +1077,18 @@ } }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true }, "deep-equal": { "version": "1.0.1", @@ -1098,9 +1147,9 @@ "dev": true }, "dotenv": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.0.0.tgz", - "integrity": "sha512-FlWbnhgjtwD+uNLUGHbMykMOYQaTivdHEmYwAKFjn6GKe/CqY0fNae93ZHTd20snh9ZLr8mTzIL9m0APQ1pjQg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", "dev": true }, "drbg.js": { @@ -1117,21 +1166,20 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "optional": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" } }, "electron-to-chromium": { - "version": "1.3.68", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.68.tgz", - "integrity": "sha512-NHs9Xm6+ZUDkRj7t1tFwizzfMO2XZg0nmHNRRTurXHDUcEoz3Kdjs2mxXsd8drpEDfg5aVL0S8aypUCTA0HJ/Q==" + "version": "1.3.118", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.118.tgz", + "integrity": "sha512-/1FpHvmKmKo2Z6CCza2HfkrKvKhU7Rq4nvyX1FOherdTrdTufhVrJbCrcrIqgqUCI+BG6JC2rlY4z5QA1G0NOw==" }, "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -1170,30 +1218,32 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "requires": { "is-arrayish": "^0.2.1" } }, "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", + "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", "requires": { - "es-to-primitive": "^1.1.1", + "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" } }, "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", "requires": { - "is-callable": "^1.1.1", + "is-callable": "^1.1.4", "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" + "is-symbol": "^1.0.2" } }, "escape-string-regexp": { @@ -1221,9 +1271,9 @@ } }, "eth-json-rpc-infura": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-3.1.2.tgz", - "integrity": "sha512-IuK5Iowfs6taluA/3Okmu6EfZcFMq6MQuyrUL1PrCoJstuuBr3TvVeSy3keDyxfbrjFB34nCo538I8G+qMtsbw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.0.tgz", + "integrity": "sha512-FLcpdxPRVBCUc7yoE+wHGvyYg2lATedP+/q7PsKvaSzQpJbgTG4ZjLnyrLanxDr6M1k/dSNa6V5QnILwjUKJcw==", "requires": { "cross-fetch": "^2.1.1", "eth-json-rpc-middleware": "^1.5.0", @@ -1266,26 +1316,42 @@ "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "requires": { + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2", "ethereumjs-util": "^5.1.1" }, "dependencies": { "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", - "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2", + "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^5.0.0" + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", + "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + } } } } }, "eth-tx-summary": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/eth-tx-summary/-/eth-tx-summary-3.2.3.tgz", - "integrity": "sha512-1gZpA5fKarJOVSb5OUlPnhDQuIazqAkI61zlVvf5LdG47nEgw+/qhyZnuj3CUdE/TLTKuRzPLeyXLjaB4qWTRQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz", + "integrity": "sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg==", "requires": { "async": "^2.1.2", - "bn.js": "^4.11.8", "clone": "^2.0.0", "concat-stream": "^1.5.1", "end-of-stream": "^1.1.0", @@ -1293,85 +1359,8 @@ "ethereumjs-block": "^1.4.1", "ethereumjs-tx": "^1.1.1", "ethereumjs-util": "^5.0.1", - "ethereumjs-vm": "2.3.4", - "through2": "^2.0.3", - "treeify": "^1.0.1", - "web3-provider-engine": "^13.3.2" - }, - "dependencies": { - "eth-block-tracker": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz", - "integrity": "sha512-NamWuMBIl8kmkJFVj8WzGatySTzQPQag4Xr677yFxdVtIxACFbL/dQowk0MzEqIKk93U1TwY3MjVU6mOcwZnKA==", - "requires": { - "async-eventemitter": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c", - "eth-query": "^2.1.0", - "ethereumjs-tx": "^1.3.3", - "ethereumjs-util": "^5.1.3", - "ethjs-util": "^0.1.3", - "json-rpc-engine": "^3.6.0", - "pify": "^2.3.0", - "tape": "^4.6.3" - }, - "dependencies": { - "async-eventemitter": { - "version": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c", - "from": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c", - "requires": { - "async": "^2.4.0" - } - } - } - }, - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==" - }, - "ethereumjs-vm": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.3.4.tgz", - "integrity": "sha512-Y4SlzNDqxrCO58jhp98HdnZVdjOqB+HC0hoU+N/DEp1aU+hFkRX/nru5F7/HkQRPIlA6aJlQp/xIA6xZs1kspw==", - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "ethereum-common": "0.2.0", - "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~1.7.0", - "ethereumjs-util": "^5.1.3", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.1.2", - "rustbn.js": "~0.1.1", - "safe-buffer": "^5.1.1" - } - }, - "web3-provider-engine": { - "version": "13.8.0", - "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-13.8.0.tgz", - "integrity": "sha512-fZXhX5VWwWpoFfrfocslyg6P7cN3YWPG/ASaevNfeO80R+nzgoPUBXcWQekSGSsNDkeRTis4aMmpmofYf1TNtQ==", - "requires": { - "async": "^2.5.0", - "clone": "^2.0.0", - "eth-block-tracker": "^2.2.2", - "eth-sig-util": "^1.4.2", - "ethereumjs-block": "^1.2.2", - "ethereumjs-tx": "^1.2.0", - "ethereumjs-util": "^5.1.1", - "ethereumjs-vm": "^2.0.2", - "fetch-ponyfill": "^4.0.0", - "json-rpc-error": "^2.0.0", - "json-stable-stringify": "^1.0.1", - "promise-to-callback": "^1.0.0", - "readable-stream": "^2.2.9", - "request": "^2.67.0", - "semaphore": "^1.0.3", - "solc": "^0.4.2", - "tape": "^4.4.0", - "xhr": "^2.2.0", - "xtend": "^4.0.1" - } - } + "ethereumjs-vm": "^2.6.0", + "through2": "^2.0.3" } }, "ethereum-common": { @@ -1379,6 +1368,31 @@ "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" }, + "ethereumjs-abi": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.7.tgz", + "integrity": "sha512-EMLOA8ICO5yAaXDhjVEfYjsJIXYutY8ufTE93eEKwsVtp2usQreKwsDTJ9zvam3omYqNuffr8IONIqb2uUslGQ==", + "requires": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", + "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + } + } + }, "ethereumjs-account": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", @@ -1409,9 +1423,9 @@ } }, "ethereumjs-common": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-0.4.1.tgz", - "integrity": "sha512-ywYGsOeGCsMNWso5Y4GhjWI24FJv9FK7+VyVKiQgXg8ZRDPXJ7F/kJ1CnjtkjTvDF4e0yqU+FWswlqR3bmZQ9Q==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.1.0.tgz", + "integrity": "sha512-LUmYkKV/HcZbWRyu3OU9YOevsH3VJDXtI6kEd8VZweQec+JjDGKCmAVKUyzhYUHqxRJu7JNALZ3A/b3NXOP6tA==" }, "ethereumjs-tx": { "version": "1.3.7", @@ -1423,9 +1437,9 @@ } }, "ethereumjs-util": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.1.5.tgz", - "integrity": "sha512-xPaSEATYJpMTCGowIt0oMZwFP4R1bxd6QsWgkcDvFL0JtXsr39p32WEcD14RscCjfP41YXZPCVWA4yAg0nrJmw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", + "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -1437,84 +1451,123 @@ } }, "ethereumjs-vm": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.4.0.tgz", - "integrity": "sha512-MJ4lCWa5c6LhahhhvoDKW+YGjK00ZQn0RHHLh4L+WaH1k6Qv7/q3uTluew6sJGNCZdlO0yYMDXYW9qyxLHKlgQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", + "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", "requires": { "async": "^2.1.2", "async-eventemitter": "^0.2.2", "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~1.7.0", - "ethereumjs-common": "~0.4.0", - "ethereumjs-util": "^5.2.0", + "ethereumjs-block": "~2.2.0", + "ethereumjs-common": "^1.1.0", + "ethereumjs-util": "^6.0.0", "fake-merkle-patricia-tree": "^1.0.1", "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.1.2", + "merkle-patricia-tree": "^2.3.2", "rustbn.js": "~0.2.0", "safe-buffer": "^5.1.1" }, "dependencies": { + "ethereumjs-block": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.0.tgz", + "integrity": "sha512-Ye+uG/L2wrp364Zihdlr/GfC3ft+zG8PdHcRtsBFNNH1CkOhxOwdB8friBU85n89uRZ9eIMAywCq0F4CwT1wAw==", + "requires": { + "async": "^2.0.1", + "ethereumjs-common": "^1.1.0", + "ethereumjs-tx": "^1.2.2", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", + "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "^0.1.3", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + } + } + }, "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", + "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", + "ethjs-util": "0.1.6", "keccak": "^1.0.2", "rlp": "^2.0.0", "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } - }, - "rustbn.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==" } } }, "ethereumjs-wallet": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz", - "integrity": "sha1-gnY7Fpfuenlr5xVdqd+0my+Yz9s=", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.3.tgz", + "integrity": "sha512-qiXPiZOsStem+Dj/CQHbn5qex+FVkuPmGH7SvSnA9F3tdRDt8dLMyvIj3+U05QzVZNPYh4HXEdnzoYI4dZkr9w==", "dev": true, "requires": { - "aes-js": "^0.2.3", - "bs58check": "^1.0.8", - "ethereumjs-util": "^4.4.0", - "hdkey": "^0.7.0", - "scrypt.js": "^0.2.0", - "utf8": "^2.1.1", - "uuid": "^2.0.1" + "aes-js": "^3.1.1", + "bs58check": "^2.1.2", + "ethereumjs-util": "^6.0.0", + "hdkey": "^1.1.0", + "randombytes": "^2.0.6", + "safe-buffer": "^5.1.2", + "scrypt.js": "^0.3.0", + "utf8": "^3.0.0", + "uuid": "^3.3.2" }, "dependencies": { "aes-js": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-0.2.4.tgz", - "integrity": "sha1-lLiBq3FyhtAV+iGeCPtmcJ3aWj0=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", "dev": true }, "ethereumjs-util": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz", - "integrity": "sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", + "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", "dev": true, "requires": { - "bn.js": "^4.8.0", + "bn.js": "^4.11.0", "create-hash": "^1.1.2", - "keccakjs": "^0.2.0", + "ethjs-util": "0.1.6", + "keccak": "^1.0.2", "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } + }, + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true } } }, "ethers": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-3.0.15.tgz", - "integrity": "sha512-d/tiMUavaeaY2GFqjpgfPzT46cEc0cilP3hnlTXR3LR/HR5Qrhv4PfdgW3gxBlR5aBTtUeM/lo8z8ph3JdtFhQ==", + "version": "3.0.29", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-3.0.29.tgz", + "integrity": "sha512-OGyA5pW5xFC5o/ZV5MfIoVp/EdA1QMg2bMJFf7Kznsz8m7IzzbgsPHTCjzSfKQDs/XDphGyRcA7A6bkIeJL4gw==", "requires": { "aes-js": "3.0.0", "bn.js": "^4.4.0", @@ -1543,28 +1596,13 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" } } }, "ethjs-abi": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", - "integrity": "sha1-4KepOn6BFjqUR3utVu3lJKtt5TM=", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.1.8.tgz", + "integrity": "sha1-zSiFg+1ijN+tr4re+juh28vKbBg=", "requires": { "bn.js": "4.11.6", "js-sha3": "0.5.5", @@ -1584,14 +1622,19 @@ } }, "ethjs-util": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.4.tgz", - "integrity": "sha1-HItoeSV0RO9NPz+7rC3tEs2ZfZM=", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", "requires": { "is-hex-prefixed": "1.0.0", "strip-hex-prefix": "1.0.0" } }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" + }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", @@ -1601,6 +1644,21 @@ "safe-buffer": "^5.1.1" } }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -1648,13 +1706,18 @@ } } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "locate-path": "^2.0.0" } }, "for-each": { @@ -1671,29 +1734,20 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "requires": { "asynckit": "^0.4.0", - "combined-stream": "1.0.6", + "combined-stream": "^1.0.6", "mime-types": "^2.1.12" - }, - "dependencies": { - "combined-stream": { - "version": "1.0.6", - "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "~1.0.0" - } - } } }, "fs-extra": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "dev": true, "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^2.1.0", @@ -1718,9 +1772,16 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true }, "getpass": { "version": "0.1.7", @@ -1731,9 +1792,9 @@ } }, "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1758,9 +1819,10 @@ "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true }, "growl": { "version": "1.10.3", @@ -1774,12 +1836,35 @@ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "requires": { - "ajv": "^5.3.0", + "ajv": "^6.5.5", "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + } } }, "has": { @@ -1804,6 +1889,11 @@ "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, "hash-base": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", @@ -1814,21 +1904,22 @@ } }, "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "requires": { "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.1" } }, "hdkey": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-0.7.1.tgz", - "integrity": "sha1-yu5L6BqneSHpCbjSKN0PKayu5jI=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-1.1.1.tgz", + "integrity": "sha512-DvHZ5OuavsfWs5yfVJZestsnc3wzPvLWNk6c2nRUfo6X+OtxypGt20vDDf7Ba+MJzjL3KS1og2nw2eBbLCOUTA==", "dev": true, "requires": { "coinstring": "^2.0.0", + "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } }, @@ -1858,9 +1949,10 @@ } }, "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==" + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true }, "http-signature": { "version": "1.2.0", @@ -1910,20 +2002,14 @@ "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "requires": { - "builtin-modules": "^1.0.0" - } + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, "is-callable": { "version": "1.1.4", @@ -1949,12 +2035,10 @@ "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=" }, "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "is-function": { "version": "1.0.1", @@ -1980,9 +2064,12 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "requires": { + "has-symbols": "^1.0.0" + } }, "is-typedarray": { "version": "1.0.0", @@ -1992,23 +2079,29 @@ "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "js-sha3": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.3.1.tgz", - "integrity": "sha1-hhIoAhQvCChQKg0d7h2V4lO7AkM=", - "dev": true + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" }, "js-tokens": { "version": "3.0.2", @@ -2018,8 +2111,7 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsesc": { "version": "0.5.0", @@ -2027,16 +2119,16 @@ "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" }, "json-rpc-engine": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz", - "integrity": "sha512-+FO3UWu/wafh/+MZ6BXy0HZU+f5plwUn82FgxpC0scJkEh5snOjFrAAtqCITPDfvfLHRUFOG5pQDUx2pspfERQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz", + "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==", "requires": { "async": "^2.0.1", - "babel-preset-env": "^1.3.2", + "babel-preset-env": "^1.7.0", "babelify": "^7.3.0", - "clone": "^2.1.1", "json-rpc-error": "^2.0.0", - "promise-to-callback": "^1.0.0" + "promise-to-callback": "^1.0.0", + "safe-event-emitter": "^1.0.1" } }, "json-rpc-error": { @@ -2084,6 +2176,7 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -2116,19 +2209,20 @@ } }, "keccakjs": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.1.tgz", - "integrity": "sha1-HWM6+QfvMFu/ny+mFtVsRFYd+k0=", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.3.tgz", + "integrity": "sha512-BjLkNDcfaZ6l8HBG9tH0tpmDv3sS2mA7FNQxFHpCdzP3Gb2MVruXBSuoM66SnVxKJpAr5dKGdkHD+bDokt8fTg==", "dev": true, "requires": { - "browserify-sha3": "^0.0.1", - "sha3": "^1.1.0" + "browserify-sha3": "^0.0.4", + "sha3": "^1.2.2" } }, "klaw": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, "requires": { "graceful-fs": "^4.1.9" } @@ -2137,6 +2231,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, "requires": { "invert-kv": "^1.0.0" } @@ -2172,7 +2267,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "requires": { "core-util-is": "~1.0.0", @@ -2209,7 +2304,7 @@ }, "readable-stream": { "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { "core-util-is": "~1.0.0", @@ -2258,6 +2353,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -2266,6 +2362,16 @@ "strip-bom": "^2.0.0" } }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", @@ -2274,7 +2380,8 @@ "lodash.assign": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true }, "loose-envify": { "version": "1.4.0", @@ -2284,18 +2391,38 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" }, "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "requires": { "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" } }, "memdown": { @@ -2324,12 +2451,13 @@ "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true }, "merkle-patricia-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.1.tgz", - "integrity": "sha512-Qp9Mpb3xazznXzzGQBqHbqCpT2AR9joUOHYYPiQjYCarrdCPCnLWXo4BFv77y4xN26KR224xoU1n/qYY7RYYgw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", "requires": { "async": "^1.4.2", "ethereumjs-util": "^5.0.0", @@ -2349,18 +2477,24 @@ } }, "mime-db": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" }, "mime-types": { - "version": "2.1.20", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", - "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "version": "2.1.22", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", + "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", "requires": { - "mime-db": "~1.36.0" + "mime-db": "~1.38.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", @@ -2416,34 +2550,84 @@ "he": "1.1.1", "mkdirp": "0.5.1", "supports-color": "4.4.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" - }, - "node-fetch": { - "version": "2.1.2", - "resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", - "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" - }, + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "nan": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.1.tgz", + "integrity": "sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA==" + }, + "node-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", + "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" + }, "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, "requires": { "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", + "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -2481,9 +2665,9 @@ "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" }, "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", + "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==" }, "once": { "version": "1.4.0", @@ -2505,11 +2689,14 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, "requires": { - "lcid": "^1.0.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "os-tmpdir": { @@ -2517,36 +2704,71 @@ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, "parse-headers": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", - "integrity": "sha1-aug6eqJanZtwCswoaYzR8e1+lTY=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.2.tgz", + "integrity": "sha512-/LypJhzFmyBIDYP9aDVgeyEb5sQfbfY5mnDq4hVhlQ69js87wXfmEI5V3xI6vvXasqebp0oCytYFLxsBVfCzSg==", "requires": { - "for-each": "^0.3.2", - "trim": "0.0.1" + "for-each": "^0.3.3", + "string.prototype.trim": "^1.1.2" } }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, "requires": { "error-ex": "^1.2.0" } }, "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "^2.0.0" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", @@ -2556,6 +2778,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", @@ -2563,9 +2786,9 @@ } }, "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "dev": true, "requires": { "create-hash": "^1.1.2", @@ -2588,12 +2811,14 @@ "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, "requires": { "pinkie": "^2.0.0" } @@ -2632,15 +2857,21 @@ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" }, "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "qs": { "version": "6.5.2", @@ -2648,9 +2879,9 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -2660,6 +2891,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", @@ -2670,14 +2902,36 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + } } }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -2767,11 +3021,6 @@ "uuid": "^3.3.2" }, "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -2782,24 +3031,27 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true }, "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true }, "resolve": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", - "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } }, "resumer": { @@ -2811,46 +3063,49 @@ } }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "requires": { - "hash-base": "^2.0.0", + "hash-base": "^3.0.0", "inherits": "^2.0.1" - }, - "dependencies": { - "hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", - "requires": { - "inherits": "^2.0.1" - } - } } }, "rlp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.0.0.tgz", - "integrity": "sha1-nbOE/0uJqPYVY9kjldhiWxjzr7A=" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.3.tgz", + "integrity": "sha512-l6YVrI7+d2vpW6D6rS05x2Xrmq8oW7v3pieZOJKBEdjuTF4Kz/iwk55Zyh1Zaz+KOB2kC8+2jZlp2u9L4tTzCQ==", + "requires": { + "bn.js": "^4.11.1", + "safe-buffer": "^5.1.1" + } }, "rustbn.js": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.1.2.tgz", - "integrity": "sha512-bAkNqSHYdJdFsBC7Z11JgzYktL31HIpB2o70jZcGiL1U1TVtPyvaVhDrGWwS8uZtaqwW2k6NOPGZCqW/Dgh5Lg==" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==" }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-event-emitter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz", + "integrity": "sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==", + "requires": { + "events": "^3.0.0" + } }, "safer-buffer": { "version": "2.1.2", @@ -2862,6 +3117,7 @@ "resolved": "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz", "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", "dev": true, + "optional": true, "requires": { "nan": "^2.0.8" } @@ -2872,9 +3128,9 @@ "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" }, "scrypt.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.2.0.tgz", - "integrity": "sha1-r40UZbcemZARC+38WTuUeeA6ito=", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.3.0.tgz", + "integrity": "sha512-42LTc1nyFsyv/o0gcHtDztrn+aqpkaCNt5Qh7ATBZfhEZU7IC/0oT/qbBH+uRNoAPvs2fwiOId68FDEoSRA8/A==", "dev": true, "requires": { "scrypt": "^6.0.2", @@ -2891,9 +3147,9 @@ } }, "secp256k1": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.5.0.tgz", - "integrity": "sha512-e5QIJl8W7Y4tT6LHffVcZAxJjvpgE5Owawv6/XCYPQljE9aP2NFFddQ8OYMKhdLshNu88FfL3qCN3/xYkXGRsA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.6.2.tgz", + "integrity": "sha512-90nYt7yb0LmI4A2jJs1grglkTAXrBwxYAjP9bpeKjvJKOjG2fOeH/YI/lchDMIvjrOasd5QXwvV2jwN168xNng==", "requires": { "bindings": "^1.2.1", "bip66": "^1.1.3", @@ -2911,20 +3167,26 @@ "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==" }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -2941,25 +3203,42 @@ "dev": true, "requires": { "nan": "2.10.0" + }, + "dependencies": { + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true + } } }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, - "solc": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", - "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", - "requires": { - "fs-extra": "^0.30.0", - "memorystream": "^0.3.1", - "require-from-string": "^1.1.0", - "semver": "^5.3.0", - "yargs": "^4.7.1" - } - }, "solmd": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/solmd/-/solmd-0.3.0.tgz", @@ -2972,11 +3251,114 @@ "solc": "^0.4.23" }, "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, + "solc": { + "version": "0.4.25", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.25.tgz", + "integrity": "sha512-jU1YygRVy6zatgXrLY2rRm7HW1d7a8CkkEgNJwvH2VLpWhMFsMdWcJn6kUqZwcSz/Vm+w89dy7Z/aB5p6AFTrg==", + "dev": true, + "requires": { + "fs-extra": "^0.30.0", + "memorystream": "^0.3.1", + "require-from-string": "^1.1.0", + "semver": "^5.3.0", + "yargs": "^4.7.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "dev": true, + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" + } } } }, @@ -2994,37 +3376,41 @@ } }, "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", + "dev": true }, "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -3038,13 +3424,30 @@ } }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, "string.prototype.trim": { @@ -3077,10 +3480,17 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, "requires": { "is-utf8": "^0.2.0" } }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, "strip-hex-prefix": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", @@ -3090,29 +3500,25 @@ } }, "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, "tape": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.1.tgz", - "integrity": "sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.10.1.tgz", + "integrity": "sha512-G0DywYV1jQeY3axeYnXUOt6ktnxS9OPJh97FGR3nrua8lhWi1zPflLxcAHavZ7Jf3qUfY7cxcVIVFa4mY2IY1w==", "requires": { "deep-equal": "~1.0.1", "defined": "~1.0.0", "for-each": "~0.3.3", "function-bind": "~1.1.1", - "glob": "~7.1.2", + "glob": "~7.1.3", "has": "~1.0.3", "inherits": "~2.0.3", "minimist": "~1.2.0", "object-inspect": "~1.6.0", - "resolve": "~1.7.1", + "resolve": "~1.10.0", "resumer": "~0.0.0", "string.prototype.trim": "~1.1.2", "through": "~2.3.8" @@ -3120,22 +3526,22 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "requires": { - "readable-stream": "^2.1.5", + "readable-stream": "~2.3.6", "xtend": "~4.0.1" } }, @@ -3151,34 +3557,80 @@ "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } } }, - "treeify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", - "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==" - }, - "trim": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" - }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "truffle": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-4.1.12.tgz", - "integrity": "sha1-9F9LbBzhWGX817v19jNA9eFuKVA=", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.0.8.tgz", + "integrity": "sha512-8Sf9GKD6Y99fcHDYQCE9hRxYWm+rpptye4Ez08G8OsaCSsbEqRzyCZf18FdLLL3iWYJZ9S+tA1P0YZVxGDQ2nw==", "dev": true, "requires": { + "app-module-path": "^2.2.0", "mocha": "^4.1.0", "original-require": "1.0.1", - "solc": "0.4.24" + "solc": "0.5.0" + }, + "dependencies": { + "solc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.5.0.tgz", + "integrity": "sha512-mdLHDl9WeYrN+FIKcMc9PlPfnA9DG9ur5QpCDKcv6VC4RINAsTF4EMuXMZMKoQTvZhtLyJIVH/BZ+KU830Z8Xg==", + "dev": true, + "requires": { + "fs-extra": "^0.30.0", + "keccak": "^1.0.2", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "yargs": "^11.0.0" + } + } + } + }, + "truffle-blockchain-utils": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.5.tgz", + "integrity": "sha1-pOXAZNrdafeCoTfz0nbSEJXaekc=" + }, + "truffle-contract": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/truffle-contract/-/truffle-contract-3.0.7.tgz", + "integrity": "sha512-av4MTJDP29PI3oVh8TrvRzRHt+nZJH8ODSiil/TfcXrKMSes52DTA5LHj00siLvcadkxUgoEZfEZ04qqhNGoiA==", + "requires": { + "ethjs-abi": "0.1.8", + "truffle-blockchain-utils": "^0.0.5", + "truffle-contract-schema": "^2.0.2", + "truffle-error": "^0.0.3", + "web3": "0.20.6" } }, + "truffle-contract-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/truffle-contract-schema/-/truffle-contract-schema-2.0.2.tgz", + "integrity": "sha512-8mYAu0Y7wgMqcIa612dxiN9pzr6rq2YxZCzPizvqyDq+/rGWy8s0irl/T7i92a/4ME1V5ddNFf3+86uIlYbPUg==", + "requires": { + "ajv": "^5.1.1", + "crypto-js": "^3.1.9-1", + "debug": "^3.1.0" + } + }, + "truffle-error": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/truffle-error/-/truffle-error-0.0.3.tgz", + "integrity": "sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o=" + }, "truffle-hdwallet-provider": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/truffle-hdwallet-provider/-/truffle-hdwallet-provider-0.0.5.tgz", @@ -3189,6 +3641,32 @@ "ethereumjs-wallet": "^0.6.0", "web3": "^0.18.2", "web3-provider-engine": "^14.0.5" + }, + "dependencies": { + "bignumber.js": { + "version": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "from": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "dev": true + }, + "crypto-js": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", + "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=", + "dev": true + }, + "web3": { + "version": "0.18.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-0.18.4.tgz", + "integrity": "sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=", + "dev": true, + "requires": { + "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "crypto-js": "^3.1.4", + "utf8": "^2.1.1", + "xhr2": "*", + "xmlhttprequest": "*" + } + } } }, "tunnel-agent": { @@ -3202,8 +3680,7 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "typedarray": { "version": "0.0.6", @@ -3211,16 +3688,23 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "unorm": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz", - "integrity": "sha1-NkIA1fE2RsqLzURJAnEzVhR5IwA=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.5.0.tgz", + "integrity": "sha512-sMfSWoiRaXXeDZSXC+YRZ23H4xchQpwxjpw1tmfR+kgbBCaOgln4NI0LXejJIhnBuKINrB3WRn+ZI8IWssirVw==", "dev": true }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, "utf8": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", - "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=", - "dev": true + "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=" }, "util-deprecate": { "version": "1.0.2", @@ -3228,15 +3712,15 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", - "dev": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" }, "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -3253,22 +3737,32 @@ } }, "web3": { - "version": "0.18.4", - "resolved": "https://registry.npmjs.org/web3/-/web3-0.18.4.tgz", - "integrity": "sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=", - "dev": true, + "version": "0.20.6", + "resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz", + "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "requires": { - "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2": "*", "xmlhttprequest": "*" + }, + "dependencies": { + "bignumber.js": { + "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git" + }, + "crypto-js": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", + "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=" + } } }, "web3-provider-engine": { - "version": "14.0.6", - "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-14.0.6.tgz", - "integrity": "sha512-tr5cGSyxfSC/JqiUpBlJtfZpwQf1yAA8L/zy1C6fDFm0ntR974pobJ4v4676atpZne4Ze5VFy3kPPahHe9gQiQ==", + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-14.2.0.tgz", + "integrity": "sha512-sfLH5VhGjJrJJT5WcF8aGehcIKRUQ553q9tjQkkLaKU2AaLsRcwffnnWvrgeTkmKSf0y9dwkDTa48RVp+GUCSg==", "requires": { "async": "^2.5.0", "backoff": "^2.5.0", @@ -3285,9 +3779,8 @@ "json-stable-stringify": "^1.0.1", "promise-to-callback": "^1.0.0", "readable-stream": "^2.2.9", - "request": "^2.67.0", + "request": "^2.85.0", "semaphore": "^1.0.3", - "tape": "^4.4.0", "ws": "^5.1.1", "xhr": "^2.2.0", "xtend": "^4.0.1" @@ -3295,26 +3788,60 @@ }, "whatwg-fetch": { "version": "2.0.4", - "resolved": "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true }, "window-size": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=" + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } } }, "wrappy": { @@ -3344,8 +3871,7 @@ "xhr2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", - "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=", - "dev": true + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" }, "xmlhttprequest": { "version": "1.8.0", @@ -3360,52 +3886,42 @@ "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true }, "yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, "requires": { - "cliui": "^3.2.0", + "cliui": "^4.0.0", "decamelize": "^1.1.1", + "find-up": "^2.1.0", "get-caller-file": "^1.0.1", - "lodash.assign": "^4.0.3", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "os-locale": "^2.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", - "string-width": "^1.0.1", - "which-module": "^1.0.0", - "window-size": "^0.2.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", "y18n": "^3.2.1", - "yargs-parser": "^2.4.1" + "yargs-parser": "^9.0.2" } }, "yargs-parser": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", - "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", - "requires": { - "camelcase": "^3.0.0", - "lodash.assign": "^4.0.6" - } - }, - "zeppelin-solidity": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/zeppelin-solidity/-/zeppelin-solidity-1.8.0.tgz", - "integrity": "sha512-7Mxq6Y7EES0PSLrRF6v0EVYqBVRRo8hFrr7m3jEs69VbbQ5kpANzizeEdbP1/PWKSOmBOg208qP2vSA0FlzFLA==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, "requires": { - "dotenv": "^4.0.0", - "ethjs-abi": "^0.2.1" - }, - "dependencies": { - "dotenv": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", - "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" - } + "camelcase": "^4.1.0" } } } diff --git a/package.json b/package.json index ccd2b1f..3d1f471 100644 --- a/package.json +++ b/package.json @@ -35,19 +35,18 @@ "license": "SEE LICENSE IN LICENSE.md", "repository": "https://github.com/tokenio/tokeninc-smart-contracts.git", "dependencies": { - "bluebird": "^3.5.1", "bignumber.js": "^7.2.0", + "bluebird": "^3.5.1", "ethereumjs-abi": "^0.6.5", "ethereumjs-util": "^5.1.5", "ethers": "^3.0.15", "truffle-contract": "^3.0.6", - "web3-provider-engine": "^14.0.6", + "web3-provider-engine": "^14.0.6" }, "devDependencies": { "dotenv": "^6.2.0", - "solc": "^0.5.2", "solmd": "^0.3.0", - "truffle": "5.0.2", + "truffle": "^5.0.8", "truffle-hdwallet-provider": "0.0.5" } } diff --git a/truffle.js b/truffle.js index 92dd2df..0bd7538 100644 --- a/truffle.js +++ b/truffle.js @@ -8,7 +8,7 @@ module.exports = { develop: { host: "127.0.0.1", port: 8545, - network_id: "*", // Match any network id + network_id: 0, // Match any network id gas: 6e6 }, poa: { @@ -41,11 +41,13 @@ module.exports = { gasPrice: 10e9 // 10 gwei } }, - solc: { - optimizer: { - enabled: true, - runs: 200 - }, - version: '0.5.2' + compilers: { + solc: { + version: '0.5.2', + optimizer: { + enabled: true, + runs: 200 + } + } } }; \ No newline at end of file